diff options
| author | krasimir <krasimir@chalmers.se> | 2009-01-31 10:49:01 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-01-31 10:49:01 +0000 |
| commit | ff0c0085cf9a3f2b02f31fdb7472b36547f055f9 (patch) | |
| tree | eff676c93875e167e071b83f4e8a4791883ed522 /src/GF/Source | |
| parent | 241e13247d4520fedabbc41fead3054d4d95114f (diff) | |
bug fix in the module dependencies checker
Diffstat (limited to 'src/GF/Source')
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 11cec4898..a52c6c2be 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -110,7 +110,7 @@ transModDef x = case x of defs' <- U.buildAnyTree [(i,d) | Left ds <- defs0, (i,_,d) <- ds] flags' <- return $ concatOptions [o | Right o <- defs0] let poss1 = buildPosTree id' poss0 - return (id', GM.ModInfo mtyp' mstat' flags' extends' Nothing opens' defs' poss1) + return (id', GM.ModInfo mtyp' mstat' flags' extends' Nothing opens' [] defs' poss1) MWith m insts -> mkBody xx $ MWithEBody [] m insts NoOpens [] MWithBody m insts opens defs -> mkBody xx $ MWithEBody [] m insts opens defs @@ -118,14 +118,14 @@ transModDef x = case x of MWithEBody extends m insts opens defs -> do extends' <- mapM transIncludedExt extends m' <- transIncludedExt m - insts' <- mapM transOpen insts + insts' <- mapM transInst insts opens' <- transOpens opens defs0 <- mapM trDef $ getTopDefs defs poss0 <- return [(i,p) | Left ds <- defs0, (i,p,_) <- ds] defs' <- U.buildAnyTree [(i,d) | Left ds <- defs0, (i,_,d) <- ds] flags' <- return $ concatOptions [o | Right o <- defs0] let poss1 = buildPosTree id' poss0 - return (id', GM.ModInfo mtyp' mstat' flags' extends' (Just (fst m',snd m',insts')) opens' defs' poss1) + return (id', GM.ModInfo mtyp' mstat' flags' extends' (Just (fst m',snd m',insts')) opens' [] defs' poss1) mkModRes id mtyp body = do id' <- transIdent id @@ -178,6 +178,11 @@ transOpen x = case x of OQualQO q id -> liftM GM.OSimple (transIdent id) OQual q id m -> liftM2 GM.OQualif (transIdent id) (transIdent m) +transInst :: Open -> Err (Ident,Ident) +transInst x = case x of + OQual q id m -> liftM2 (,) (transIdent id) (transIdent m) + _ -> Bad "qualified open expected" + transIncluded :: Included -> Err (Ident,[Ident]) transIncluded x = case x of IAll i -> liftM (flip (curry id) []) $ transIdent i |
