diff options
| author | hallgren <hallgren@chalmers.se> | 2014-10-21 19:20:31 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-10-21 19:20:31 +0000 |
| commit | 391b301881bee7de9580f2c6d819144161e6a51d (patch) | |
| tree | 11e61e5252bfe6939eee9ef14d19bd7ca6c8bb40 /src/compiler/GF/Compile/SubExOpt.hs | |
| parent | 3bfcfa157dc291e03bfb4db3baed8b0098d76f50 (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/SubExOpt.hs')
| -rw-r--r-- | src/compiler/GF/Compile/SubExOpt.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/SubExOpt.hs b/src/compiler/GF/Compile/SubExOpt.hs index 56e41d55c..d1c7842ad 100644 --- a/src/compiler/GF/Compile/SubExOpt.hs +++ b/src/compiler/GF/Compile/SubExOpt.hs @@ -68,7 +68,7 @@ type TermList = Map Term (Int,Int) -- number of occs, id type TermM a = State (TermList,Int) a addSubexpConsts :: - Ident -> Map Term (Int,Int) -> [(Ident,Info)] -> [(Ident,Info)] + ModuleName -> Map Term (Int,Int) -> [(Ident,Info)] -> [(Ident,Info)] addSubexpConsts mo tree lins = do let opers = [oper id trm | (trm,(_,id)) <- list] map mkOne $ opers ++ lins @@ -90,7 +90,7 @@ addSubexpConsts mo tree lins = do oper id trm = (operIdent id, ResOper (Just (L NoLoc (EInt 8))) (Just (L NoLoc trm))) --- impossible type encoding generated opers -getSubtermsMod :: Ident -> [(Ident,Info)] -> TermM (Map Term (Int,Int)) +getSubtermsMod :: ModuleName -> [(Ident,Info)] -> TermM (Map Term (Int,Int)) getSubtermsMod mo js = do mapM (getInfo (collectSubterms mo)) js (tree0,_) <- get @@ -105,7 +105,7 @@ getSubtermsMod mo js = do return $ fi _ -> return fi -collectSubterms :: Ident -> Term -> TermM Term +collectSubterms :: ModuleName -> Term -> TermM Term collectSubterms mo t = case t of App f a -> do collect f |
