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

Refactoring of Generators

parent 765a3e5a
......@@ -28,13 +28,11 @@ import ModuleSummary
-- |Generate AbstractCurry
genTypedAbstractCurry :: CompilerEnv -> CS.Module -> AC.CurryProg
genTypedAbstractCurry env
= GAC.genTypedAbstract (valueEnv env) (tyConsEnv env)
genTypedAbstractCurry = GAC.genTypedAbstract
-- |Generate untyped AbstractCurry
genUntypedAbstractCurry :: CompilerEnv -> CS.Module -> AC.CurryProg
genUntypedAbstractCurry env
= GAC.genUntypedAbstract (valueEnv env) (tyConsEnv env)
genUntypedAbstractCurry = GAC.genUntypedAbstract
-- |Generate FlatCurry
genFlatCurry :: Options -> ModuleSummary -> CompilerEnv -> IL.Module
......
This diff is collapsed.
......@@ -41,7 +41,6 @@ import qualified IL as IL
import qualified ModuleSummary
import Transformations (translType)
-- import Debug.Trace
trace' :: String -> a -> a
trace' _ x = x
......@@ -50,12 +49,11 @@ trace' _ x = x
-- transforms intermediate language code (IL) to FlatCurry code
genFlatCurry :: Options -> ModuleSummary.ModuleSummary -> InterfaceEnv
-> ValueEnv -> TCEnv -> IL.Module -> (Prog, [Message])
genFlatCurry opts modSum mEnv tyEnv tcEnv modul
= (prog', messages)
where (prog, messages)
= run opts modSum mEnv tyEnv tcEnv False (visitModule modul)
prog' = -- eraseTypes $
adjustTypeInfo $ adjustTypeInfo $ patchPreludeFCY prog
genFlatCurry opts modSum mEnv tyEnv tcEnv mdl = (prog', messages)
where
(prog, messages) = run opts modSum mEnv tyEnv tcEnv False (visitModule mdl)
prog' = -- eraseTypes $
adjustTypeInfo $ adjustTypeInfo $ patchPreludeFCY prog
-- transforms intermediate language code (IL) to FlatCurry interfaces
genFlatInterface :: Options -> ModuleSummary.ModuleSummary -> InterfaceEnv -> ValueEnv -> TCEnv
......
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