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

small refactoring

parent 2aeb3b59
...@@ -27,21 +27,21 @@ import Env.Value ...@@ -27,21 +27,21 @@ import Env.Value
-- compilation. -- compilation.
data CompilerEnv = CompilerEnv data CompilerEnv = CompilerEnv
{ moduleIdent :: ModuleIdent -- ^ identifier of the module { moduleIdent :: ModuleIdent -- ^ identifier of the module
, aliasEnv :: AliasEnv -- ^ aliases for imported modules
, evalAnnotEnv :: EvalEnv -- ^ evaluation annotations
, interfaceEnv :: InterfaceEnv -- ^ declarations of imported interfaces , interfaceEnv :: InterfaceEnv -- ^ declarations of imported interfaces
, opPrecEnv :: PEnv -- ^ operator precedences , aliasEnv :: AliasEnv -- ^ aliases for imported modules
, tyConsEnv :: TCEnv -- ^ type constructors , tyConsEnv :: TCEnv -- ^ type constructors
, valueEnv :: ValueEnv -- ^ functions and data constructors , valueEnv :: ValueEnv -- ^ functions and data constructors
, opPrecEnv :: PEnv -- ^ operator precedences
, evalAnnotEnv :: EvalEnv -- ^ evaluation annotations
} deriving Show } deriving Show
initCompilerEnv :: ModuleIdent -> CompilerEnv initCompilerEnv :: ModuleIdent -> CompilerEnv
initCompilerEnv mid = CompilerEnv initCompilerEnv mid = CompilerEnv
{ moduleIdent = mid { moduleIdent = mid
, aliasEnv = initAliasEnv
, evalAnnotEnv = initEEnv
, interfaceEnv = initInterfaceEnv , interfaceEnv = initInterfaceEnv
, opPrecEnv = initPEnv , aliasEnv = initAliasEnv
, tyConsEnv = initTCEnv , tyConsEnv = initTCEnv
, valueEnv = initDCEnv , valueEnv = initDCEnv
, opPrecEnv = initPEnv
, evalAnnotEnv = initEEnv
} }
...@@ -28,7 +28,7 @@ import Base.TopEnv ...@@ -28,7 +28,7 @@ import Base.TopEnv
import Base.Types import Base.Types
import Env.Interface import Env.Interface
import Env.ModuleAlias import Env.ModuleAlias (importAliases)
import Env.OpPrec import Env.OpPrec
import Env.TypeConstructors import Env.TypeConstructors
import Env.Value import Env.Value
......
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