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

Small corrections

parent 589bb685
......@@ -6,11 +6,11 @@ Completed
import CompilerOpts -- okay, works
import CompilerOpts (Options) -- okay, but no field labels imported
import CompilerOpts (Options (..)) -- fails: Options is not a data type
- Checked correctness of created FlatCurry files by comparison with the old
frontend
Still to do
===========
- !!! Check correctness of created FlatCurry files by comparison
!!! with the old frontend
- Module pragmas
- type classes
- option to disable nondeterminism by overlapping
......
......@@ -63,7 +63,7 @@ typingParse paths fn src = genFullCurrySyntax checkModule paths fn $ parse fn sr
genCurrySyntax :: FilePath -> Module -> MsgMonad Module
genCurrySyntax fn mod1
| null hdrErrs = return mdl
| otherwise = failWith $ head hdrErrs
| otherwise = failWith $ show $ head hdrErrs
where (mdl, hdrErrs) = checkModuleHeader defaultOptions fn mod1
--
......
......@@ -85,7 +85,7 @@ compileModule opts fn = do
-- types of the newly introduced functions are not inferred (hsi)
let (env2, il, dumps) = transModule opts env modul
-- dump intermediate results
mapM_ (dump opts) dumps
mapM_ (doDump opts) dumps
-- generate target code
let intf = exportInterface env2 modul
let modSum = summarizeModule (tyConsEnv env2) intf modul
......@@ -287,8 +287,8 @@ showWarnings opts msgs = when (optWarn opts)
$ putErrsLn $ map showWarning msgs
-- |The 'dump' function writes the selected information to standard output.
dump :: Options -> Dump -> IO ()
dump opts (level, env, dump) = when (level `elem` optDumps opts) $ do
doDump :: Options -> Dump -> IO ()
doDump opts (level, env, dump) = when (level `elem` optDumps opts) $ do
when (optDumpEnv opts) $ putStrLn $ showCompilerEnv env
putStrLn $ unlines [header, replicate (length header) '=', dump]
where header = dumpHeader level
......
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