diff options
| author | aarne <unknown> | 2004-09-15 14:36:27 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-09-15 14:36:27 +0000 |
| commit | a25ee154e760a424ef4aef46a6e3d6fdf1079cf1 (patch) | |
| tree | 50315c6fe03325fca09e1a922172de111faa7639 /src/GF/Source/SourceToGrammar.hs | |
| parent | 7697b222d0b7053e4b955a6ab9ba2ad0d6c9c512 (diff) | |
introducing multiple inheritance
Diffstat (limited to 'src/GF/Source/SourceToGrammar.hs')
| -rw-r--r-- | src/GF/Source/SourceToGrammar.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/GF/Source/SourceToGrammar.hs b/src/GF/Source/SourceToGrammar.hs index 31e917469..436ce4503 100644 --- a/src/GF/Source/SourceToGrammar.hs +++ b/src/GF/Source/SourceToGrammar.hs @@ -75,11 +75,11 @@ transModDef x = case x of flags' <- return [f | Right fs <- defs0, f <- fs] return (id',GM.ModMod (GM.Module mtyp' mstat' flags' extends' opens' defs')) MReuse _ -> do - return (id', GM.ModMod (GM.Module mtyp' mstat' [] Nothing [] NT)) + return (id', GM.ModMod (GM.Module mtyp' mstat' [] [] [] NT)) MUnion imps -> do imps' <- mapM transIncluded imps return (id', - GM.ModMod (GM.Module (GM.MTUnion mtyp' imps') mstat' [] Nothing [] NT)) + GM.ModMod (GM.Module (GM.MTUnion mtyp' imps') mstat' [] [] [] NT)) MWith m opens -> do m' <- transIdent m @@ -137,11 +137,10 @@ transTransfer x = case x of TransferIn open -> liftM Left $ transOpen open TransferOut open -> liftM Right $ transOpen open -transExtend :: Extend -> Err (Maybe Ident) +transExtend :: Extend -> Err [Ident] transExtend x = case x of - Ext [id] -> transIdent id >>= return . Just - Ext ids -> Bad "sorry, no support for multiple inheritance yet" - NoExt -> return Nothing + Ext ids -> mapM transIdent ids + NoExt -> return [] transOpens :: Opens -> Err [GM.OpenSpec Ident] transOpens x = case x of |
