Commit ab985fb9 authored by Bernd Brassel's avatar Bernd Brassel
Browse files

intermediate state

parent 8c4a596d
......@@ -69,4 +69,4 @@ Executable kicsi
MyReadline
Library
Exposed-Modules: Curry.Libs.Prelude
\ No newline at end of file
Exposed-Modules: Curry.Module.Prelude
\ No newline at end of file
......@@ -103,7 +103,8 @@ data Options = Opts{ cm :: ChoiceMode,
extCons,hasData :: Bool,
pm :: PresentationMode,
extData, extFuncs :: [String],
extInsts :: [(String,[ProvidedInstance])]} deriving Show
extInsts :: [(String,[ProvidedInstance])],
toInclude :: String} deriving Show
data ConsUse = DataDef | InstanceDef | FunctionDef deriving (Eq,Show)
......@@ -157,7 +158,8 @@ defaultOpts curDir = Opts {cm=CTC,filename="", mainFunc= "main", mainModule="Mai
pm=Interactive DF,
extData=[],
extInsts=[],
extFuncs=[]}
extFuncs=[],
toInclude=""}
kicsrc home = unpath [home,".kicsrc"]
......@@ -414,7 +416,8 @@ readExternalSpec opts p = do
else do
spec <- warning "" "" specs >>= safeIO . readModule
put 5 opts "reading external specification"
let newOpts = foldr insertP opts (read spec)
let [(specs,stringToInclude)] = reads spec
newOpts = foldr insertP opts{toInclude=stringToInclude} specs
safeIO (seq newOpts (return ()))
put 5 opts "external specification read"
return newOpts
......
......@@ -60,7 +60,9 @@ elimInfix name = "op_"++concat (intersperse "_" (map (show . ord) name))
insertName :: String -> FilePath -> FilePath
insertName s xs = replaceFileName xs (s++takeFileName xs)
modName s = insertName "Curry" s
modName s = insertName "Curry.Module." s
dataMName = "Data"
instMName = "Instances"
......@@ -84,13 +86,13 @@ extFuncModName = insertName extFuncMName
dataHsName s = replaceExtension (dataModName s) ".hs"
instHsName s = replaceExtension (instModName s) ".hs"
funcHsName s = replaceExtension (modName s) ".hs"
funcHsName s = replaceExtension s ".hs"
extDataHsName s = replaceExtension (extDataModName s) ".hs"
extInstHsName s = replaceExtension (extInstModName s) ".hs"
extFuncHsName s = replaceExtension (extFuncModName s) ".hs"
externalSpecName s = replaceExtension (external s) ".spec"
externalSpecName s = replaceExtension s ".hs.include"
strictPrefix = "S"
......
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