summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/Compute
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2014-10-21 19:20:31 +0000
committerhallgren <hallgren@chalmers.se>2014-10-21 19:20:31 +0000
commit391b301881bee7de9580f2c6d819144161e6a51d (patch)
tree11e61e5252bfe6939eee9ef14d19bd7ca6c8bb40 /src/compiler/GF/Compile/Compute
parent3bfcfa157dc291e03bfb4db3baed8b0098d76f50 (diff)
ModuleName and Ident are now distinct types
This makes the documentation clearer, and can potentially catch more programming mistakes.
Diffstat (limited to 'src/compiler/GF/Compile/Compute')
-rw-r--r--src/compiler/GF/Compile/Compute/ConcreteNew.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/GF/Compile/Compute/ConcreteNew.hs b/src/compiler/GF/Compile/Compute/ConcreteNew.hs
index 6bc653983..06d9b0000 100644
--- a/src/compiler/GF/Compile/Compute/ConcreteNew.hs
+++ b/src/compiler/GF/Compile/Compute/ConcreteNew.hs
@@ -7,7 +7,7 @@ module GF.Compile.Compute.ConcreteNew
import GF.Grammar hiding (Env, VGen, VApp, VRecType)
import GF.Grammar.Lookup(lookupResDefLoc,allParamValues)
-import GF.Grammar.Predef(cPredef,cErrorType,cTok,cStr,isPredefCat)
+import GF.Grammar.Predef(cPredef,cErrorType,cTok,cStr)
import GF.Grammar.PatternMatch(matchPattern,measurePatt)
import GF.Grammar.Lockfield(lockLabel,isLockLabel,lockRecType) --unlockRecord
import GF.Compile.Compute.Value hiding (Error)
@@ -38,10 +38,10 @@ apply env = apply' env
-- * Environments
-type ResourceValues = Map.Map Ident (Map.Map Ident (Err Value))
+type ResourceValues = Map.Map ModuleName (Map.Map Ident (Err Value))
-data GlobalEnv = GE SourceGrammar ResourceValues (L Ident)
-data CompleteEnv = CE {srcgr::SourceGrammar,rvs::ResourceValues,
+data GlobalEnv = GE Grammar ResourceValues (L Ident)
+data CompleteEnv = CE {srcgr::Grammar,rvs::ResourceValues,
gloc::L Ident,local::LocalScope}
type LocalScope = [Ident]
type Stack = [Value]
@@ -73,7 +73,7 @@ resource env (m,c) =
if isPredefCat c
then value0 env =<< lockRecType c defLinType -- hmm
else maybe e id $ Map.lookup c =<< Map.lookup m (rvs env)
- where e = fail $ "Not found: "++showIdent m++"."++showIdent c
+ where e = fail $ "Not found: "++render m++"."++showIdent c
-- | Convert operators once, not every time they are looked up
resourceValues :: SourceGrammar -> GlobalEnv