Commit ce2237ac authored by Jan Rasmus Tikovsky 's avatar Jan Rasmus Tikovsky
Browse files

Merge remote-tracking branch 'origin/new-gfc' into records

Conflicts:
	src/Generators/GenFlatCurry.hs
	src/ModuleSummary.hs
parents db2dfc03 90adc354
This diff is collapsed.
...@@ -32,18 +32,18 @@ qual :: CompEnv Module -> CompEnv Module ...@@ -32,18 +32,18 @@ qual :: CompEnv Module -> CompEnv Module
qual (env, mdl) = (qualifyEnv env, mdl') qual (env, mdl) = (qualifyEnv env, mdl')
where mdl' = Q.qual (moduleIdent env) (tyConsEnv env) (valueEnv env) mdl where mdl' = Q.qual (moduleIdent env) (tyConsEnv env) (valueEnv env) mdl
-- |Remove syntactic sugar -- |Remove any syntactic sugar, changes the value environment.
desugar :: Bool -> CompEnv Module -> CompEnv Module desugar :: Bool -> CompEnv Module -> CompEnv Module
desugar dsfp (env, mdl) = (env { valueEnv = tyEnv' }, mdl') desugar dsfp (env, mdl) = (env { valueEnv = tyEnv' }, mdl')
where (mdl', tyEnv') = DS.desugar dsfp (extensions env) (valueEnv env) where (mdl', tyEnv') = DS.desugar dsfp (extensions env) (valueEnv env)
(tyConsEnv env) mdl (tyConsEnv env) mdl
-- |Simplify the source code. -- |Simplify the source code, changes the value environment.
simplify :: CompEnv Module -> CompEnv Module simplify :: CompEnv Module -> CompEnv Module
simplify (env, mdl) = (env { valueEnv = tyEnv' }, mdl') simplify (env, mdl) = (env { valueEnv = tyEnv' }, mdl')
where (mdl', tyEnv') = S.simplify (valueEnv env) mdl where (mdl', tyEnv') = S.simplify (valueEnv env) mdl
-- |Lift local declarations -- |Lift local declarations, changes the value environment.
lift :: CompEnv Module -> CompEnv Module lift :: CompEnv Module -> CompEnv Module
lift (env, mdl) = (env { valueEnv = tyEnv' }, mdl') lift (env, mdl) = (env { valueEnv = tyEnv' }, mdl')
where (mdl', tyEnv') = L.lift (valueEnv env) mdl where (mdl', tyEnv') = L.lift (valueEnv env) mdl
......
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