diff options
| author | aarne <unknown> | 2003-11-11 15:44:24 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2003-11-11 15:44:24 +0000 |
| commit | 54c72f5ab023c0cdac83eb28dd1f81d4cd35aeae (patch) | |
| tree | a2a41040c96a84b2bfadac0e25a9dc450aa41bfb /src/GF/Compile/GrammarToCanon.hs | |
| parent | 9b47b4aa128a5cbee74aa99e5494a0b76890ec4a (diff) | |
Working with interfaces.
Working with interfaces.
Created new place for grammar parsers.
Created new script jgf2+.
Diffstat (limited to 'src/GF/Compile/GrammarToCanon.hs')
| -rw-r--r-- | src/GF/Compile/GrammarToCanon.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/GF/Compile/GrammarToCanon.hs b/src/GF/Compile/GrammarToCanon.hs index ab493f761..786eb5fa5 100644 --- a/src/GF/Compile/GrammarToCanon.hs +++ b/src/GF/Compile/GrammarToCanon.hs @@ -38,7 +38,8 @@ redModInfo (c,info) = do c' <- redIdent c info' <- case info of ModMod m -> do - (e,os) <- redExtOpen m + let isIncompl = mstatus m == MSIncomplete + (e,os) <- if isIncompl then return (Nothing,[]) else redExtOpen m ---- flags <- mapM redFlag $ flags m (a,mt) <- case mtype m of MTConcrete a -> do @@ -51,7 +52,7 @@ redModInfo (c,info) = do MTTransfer x y -> return (c',MTTransfer (om x) (om y)) --- c' not needed ---- this generates empty GFC. Better: none - let js = if mstatus m == MSIncomplete then NT else jments m + let js = if isIncompl then NT else jments m defss <- mapM (redInfo a) $ tree2list $ js defs <- return $ sorted2tree $ concat defss -- sorted, but reduced @@ -62,7 +63,9 @@ redModInfo (c,info) = do e' <- case extends m of Just e -> liftM Just $ redIdent e _ -> return Nothing - os' <- mapM (\ (OQualif q _ i) -> liftM (OSimple q) (redIdent i)) $ opens m + os' <- mapM (\o -> case o of + OQualif q _ i -> liftM (OSimple q) (redIdent i) + _ -> prtBad "cannot translate unqualified open in" c) $ opens m return (e',os') om = oSimple . openedModule --- normalizing away qualif |
