summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/SubExOpt.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-05-28 14:15:15 +0000
committerkrasimir <krasimir@chalmers.se>2010-05-28 14:15:15 +0000
commitc3f4c3eba7b7d98f48cfe56711eb18611bb89515 (patch)
tree42dafb392663e9a92238fd6b2f4dfa289b468f0e /src/compiler/GF/Compile/SubExOpt.hs
parentb3d6f01f403dbf86207079b214b75c2445ad55b7 (diff)
refactoring in GF.Grammar.Grammar
Diffstat (limited to 'src/compiler/GF/Compile/SubExOpt.hs')
-rw-r--r--src/compiler/GF/Compile/SubExOpt.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/SubExOpt.hs b/src/compiler/GF/Compile/SubExOpt.hs
index 73c349881..42824845e 100644
--- a/src/compiler/GF/Compile/SubExOpt.hs
+++ b/src/compiler/GF/Compile/SubExOpt.hs
@@ -58,8 +58,8 @@ unsubexpModule sm@(i,mo)
ResOper pty (Just (L loc t)) -> [(c, ResOper pty (Just (L loc (unparTerm t))))]
_ -> [(c,info)]
unparTerm t = case t of
- Q m c | isOperIdent c -> --- name convention of subexp opers
- errVal t $ liftM unparTerm $ lookupResDef gr m c
+ Q (m,c) | isOperIdent c -> --- name convention of subexp opers
+ errVal t $ liftM unparTerm $ lookupResDef gr (m,c)
_ -> C.composSafeOp unparTerm t
gr = M.MGrammar [sm]
rebuild = buildTree . concat
@@ -84,7 +84,7 @@ addSubexpConsts mo tree lins = do
return (f,ResOper ty (Just (L loc trm')))
_ -> return (f,def)
recomp f t = case Map.lookup t tree of
- Just (_,id) | operIdent id /= f -> return $ Q mo (operIdent id)
+ Just (_,id) | operIdent id /= f -> return $ Q (mo, operIdent id)
_ -> C.composOp (recomp f) t
list = Map.toList tree