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

Resolved bug of type constructor renaming

parent da1c1277
......@@ -38,7 +38,7 @@ data CompilerEnv = CompilerEnv
, opPrecEnv :: PEnv -- ^ operator precedences
, tyConsEnv :: TCEnv -- ^ type constructors
, valueEnv :: ValueEnv -- ^ functions and data constructors
}
} deriving Show
initCompilerEnv :: ModuleIdent -> CompilerEnv
initCompilerEnv mid = CompilerEnv
......
......@@ -97,7 +97,7 @@ code are obsolete and commented out.
> -- generate target code
> let intf = exportInterface env modul
> let modSum = summarizeModule (tyConsEnv env2) intf modul
> writeFlat opts fn env2 modSum il
> writeFlat opts fn (qualifyEnv opts env2) modSum il
> where
> withFlat = any (`elem` optTargetTypes opts)
> [FlatCurry, FlatXml, ExtendedFlatCurry]
......@@ -176,18 +176,16 @@ Haskell and original MCC where a module obtains \texttt{main}).
-- ---------------------------------------------------------------------------
> checkModule :: Options -> CompilerEnv -> CS.Module -> (CompilerEnv, CS.Module)
> checkModule opts env mdl = qualifyEnvs
> $ expand
> checkModule opts env mdl = expand
> $ uncurry qual
> $ (if withFlat then uncurry typeCheck else id)
> $ uncurry precCheck
> $ uncurry (syntaxCheck opts)
> $ kindCheck env mdl
> where
> expand (e, m) = if withFlat then (e, expandInterface e m) else (e, m)
> qualifyEnvs (e, m) = (qualifyEnv opts e, m)
> withFlat = any (`elem` optTargetTypes opts)
> [FlatCurry, FlatXml, ExtendedFlatCurry]
> expand (e, m) = if withFlat then (e, expandInterface e m) else (e, m)
> withFlat = any (`elem` optTargetTypes opts)
> [FlatCurry, FlatXml, ExtendedFlatCurry]
-- ---------------------------------------------------------------------------
-- Translating a module
......
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