From c3f4c3eba7b7d98f48cfe56711eb18611bb89515 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 28 May 2010 14:15:15 +0000 Subject: refactoring in GF.Grammar.Grammar --- src/compiler/GF/Compile/SubExOpt.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compiler/GF/Compile/SubExOpt.hs') 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 -- cgit v1.2.3