Commit 7cb0f6ef authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Use of hierarchical modules -> Haskell 2010

parent d7403114
import qualified Char
import qualified Data.Char as Char
import qualified Curry.Debugger.ShowTerm as ST
instance DI.GenTerm Float where
......
......@@ -2,7 +2,7 @@ module Main where
import System.FilePath
import System.Directory
import Monad
import Control.Monad
import Data.List
import Distribution.Simple
......
......@@ -28,8 +28,8 @@ module AnsiCodes(
) where
import Char
import List
import Data.Char
import Data.List
-- escape character
esc = chr 27
......
......@@ -4,7 +4,7 @@ import DebuggerMonad
import Store
import Term
import Control.Monad.State (liftIO)
import Char
import Data.Char
--------------------------------------
-- the logic part called from outside
......
......@@ -33,7 +33,7 @@ import Term
import Data.IORef
import System.Process
import PartCalls
import Char (isDigit)
import Data.Char (isDigit)
import AnsiCodes
import Store
import FunLogStrict
......@@ -268,7 +268,7 @@ getDepth = do
loadStepfile - eine Orakeldatei laden
traceProgram - ein instrumentiertes Programm
mit einer bergebenen Orakelliste
mit einer übergebenen Orakelliste
debuggen
traceFunCall - einen Funktionsaufruf debuggen
......@@ -315,9 +315,9 @@ initState isIO name
{-
traceProgram verwendet die bergebenen Orakel-Informationen,
um ein instrumentiertes Programm auszufhren. Das Programm
wird interaktiv ausgefhrt und dabei so lange wiederholt,
traceProgram verwendet die bergebenen Orakel-Informationen,
um ein instrumentiertes Programm auszufhren. Das Programm
wird interaktiv ausgefhrt und dabei so lange wiederholt,
bis alle Funktionsaufrufe bewertet sind oder ein Bug
gefunden wurde.
-}
......
module Term where
import Maybe
import Data.Maybe
import Text.PrettyPrint
import Store
import Debug.Trace
import AnsiCodes
import Char
import Data.Char
trace' x = trace (show x) x
......
import Monad
import Control.Monad
path="/home/bbr/kics/src/lib/"
prelude="StrictPrelude.hs"
......
module Curry.Compiler.Brace where
import List
import Data.List
separate :: [a] -> [[a]] -> [a]
separate :: [a] -> [[a]] -> [a]
separate s xs = concat (intersperse s (filter (not . null) xs))
brace :: [a] -> [a] -> [a] -> [[a]] -> [a]
......
......@@ -5,7 +5,7 @@ module Curry.Compiler.Config (
import System.FilePath
import System.Process
import System.Time (ClockTime)
import Char
import Data.Char
import System.Environment (getEnvironment,getArgs)
import System.Directory hiding (executable)
import System.Time
......@@ -13,7 +13,7 @@ import GHC.Paths
import Data.List
import Data.Maybe (isJust)
import Data.Version
import Monad
import Control.Monad
import Curry.Compiler.SafeCalls
import Curry.FlatCurry.Type (readFlat,Prog)
......@@ -162,7 +162,7 @@ defaultOpts = Opts {filename="", mainFunc= "main", mainModule="Main",
frontend="cymake",
stdLibDir = "",
userlibpath=[],
ghcOpts=" -fglasgow-exts -fcontext-stack=50 ",
ghcOpts=" -fcontext-stack=50 ",
done=[],
make=True,
binary=Nothing,
......
module Curry.Compiler.CurryToHaskell where
import List
import Char
import Maybe
import Monad
import System
import System.FilePath
import Data.List
import Data.Char
import Data.Maybe
import Control.Monad
import System.FilePath
import Curry.FlatCurry.Type
import Curry.FlatCurry.Goodies hiding (consName)
......
......@@ -4,7 +4,7 @@ import System.Directory
import System.FilePath
import System.Time (ClockTime)
import Control.Monad (when)
import List (intersperse,nubBy)
import Data.List (intersperse,nubBy)
curDirPath :: FilePath
curDirPath = "."
......
module Curry.Compiler.Names where
import Char
import List
import Data.Char
import Data.List
import System.FilePath
import Curry.Compiler.ShowFunctionalProg (isTuple,isInfixOpName)
......
......@@ -4,8 +4,8 @@
--------------------------------
module Curry.Compiler.PreTrans where
import Maybe
import List hiding (nub)
import Data.Maybe
import Data.List hiding (nub)
import Curry.FlatCurry.Type
import Curry.FlatCurry.Goodies
......
......@@ -9,8 +9,10 @@ import Control.OldException
import Control.Exception
#endif
import System.Exit
import System.Process
import Prelude hiding (catch)
import System
--------------------
-- safe calls
......
......@@ -22,8 +22,8 @@ module Curry.Compiler.ShowFlatCurry(showFlatProg,showFlatType,showFlatFunc,
showCurryType,showCurryExpr,showCurryId,showCurryVar)
where
import List
import Char
import Data.List
import Data.Char
import Curry.FlatCurry.Type
import Curry.Compiler.Brace
......
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE PatternGuards #-}
-- uses pattern guards to recognize strings and lists
------------------------------------------------------------------------------
--- A pretty printer for AbstractHaskell, adapted from AbstractCurryPrinter
......@@ -26,10 +26,10 @@ module Curry.Compiler.ShowFunctionalProg(
showExpr,showPattern,
isInfixOpName,isTuple) where
import List
import Char(isDigit,ord)
import Maybe (isJust)
import Monad (ap)
import Data.List
import Data.Char (isDigit,ord)
import Data.Maybe (isJust)
import Control.Monad (ap)
import Curry.Compiler.FunctionalProg
import Curry.Compiler.Brace
......@@ -390,9 +390,3 @@ isTuple (c:cs) = c=='(' && dropWhile (==',') cs == ")"
infixIDs :: String
infixIDs = "~!@#$%^&*+-=<>?./|\\:"
......@@ -7,7 +7,7 @@ import Curry.FlatCurry.Type
import Curry.FlatCurry.Goodies hiding ( freeVars )
import qualified Curry.FlatCurry.Goodies as FCG
import List ( sortBy, groupBy, partition )
import Data.List ( sortBy, groupBy, partition )
data Int' = Neg Nat | Zero | Pos Nat
......
......@@ -158,7 +158,7 @@ chainInStore r@(Equality fromMin fromMax from toMin toMax to) =
foldChain :: [Int] -> [Int] -> Store -> Maybe Store
foldChain xs@(x:_) ys@(y:_) st = foldl (>>=) (Just st) $
foldChain xs@(x:_) ys@(y:_) st = Prelude.foldl (>>=) (Just st) $
case compare x y of
EQ -> [Just]
LT -> zipWith insertChain xs ys
......
import System
module Main where
import Control.Monad (when)
import System.Cmd
import System.Environment
import Monad
import Curry.Compiler.Config
import Curry.Compiler.CurryToHaskell
import Curry.Compiler.SafeCalls
-------------------------------
-- the kics compiler
-------------------------------
......
module Main where
import Maybe
import Data.Maybe
import Data.List
import Data.Char
import System hiding (getEnv)
import System.Cmd
import System.IO
import System.Directory (doesFileExist)
import Control.Monad (unless,when)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment