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

exportCheck is now done prior to qualification

parent f5693969
......@@ -159,11 +159,9 @@ checkModule opts env mdl = kindCheck env mdl -- should be only syntax checking ?
>>= uncurry (syntaxCheck opts)
>>= uncurry precCheck
>>= (if withTypeCheck then uncurry typeCheck else return)
>>= return . (uncurry qual)
>>= uncurry exportCheck
>>= return . qualEnv
>>= return . (uncurry (qual opts))
where
qualEnv (e, m) = (qualifyEnv opts e, m)
withTypeCheck = any (`elem` optTargetTypes opts)
[FlatCurry, ExtendedFlatCurry, FlatXml, AbstractCurry]
......
......@@ -24,6 +24,8 @@ import Transformations.Qual as Q (qual)
import Transformations.Simplify as S (simplify)
import CompilerEnv
import CompilerOpts
import Imports (qualifyEnv)
import qualified IL
-- |Add missing case branches
......@@ -50,8 +52,8 @@ lift mdl env = (mdl', env { valueEnv = tyEnv', evalAnnotEnv = eEnv' })
where (mdl', tyEnv', eEnv') = L.lift (valueEnv env) (evalAnnotEnv env) mdl
-- |Fully qualify used constructors and functions
qual :: CompilerEnv -> Module -> (CompilerEnv, Module)
qual env (Module m es is ds) = (env, Module m es is ds')
qual :: Options -> CompilerEnv -> Module -> (CompilerEnv, Module)
qual opts env (Module m es is ds) = (qualifyEnv opts env, Module m es is ds')
where ds' = Q.qual (moduleIdent env) (tyConsEnv env) (valueEnv env) ds
-- |Simplify the source code
......
Supports Markdown
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