Started with unions.

This commit is contained in:
aarne
2004-02-27 07:43:52 +00:00
parent b32c3081a1
commit b790008b19
14 changed files with 1324 additions and 1182 deletions

View File

@@ -76,6 +76,11 @@ transModDef x = case x of
return (id',GM.ModMod (GM.Module mtyp' mstat' flags' extends' opens' defs'))
MReuse _ -> do
return (id', GM.ModMod (GM.Module mtyp' mstat' [] Nothing [] NT))
MUnion imps -> do
imps' <- mapM transIncluded imps
return (id',
GM.ModMod (GM.Module (GM.MTUnion mtyp' imps') mstat' [] Nothing [] NT))
MWith m opens -> do
m' <- transIdent m
opens' <- mapM transOpen opens
@@ -154,6 +159,12 @@ transQualOpen x = case x of
QOInterface -> return GM.OQInterface
QOIncompl -> return GM.OQIncomplete
transIncluded :: Included -> Err (Ident,[Ident])
transIncluded x = case x of
IAll i -> liftM (flip (curry id) []) $ transIdent i
ISome i ids -> liftM2 (curry id) (transIdent i) (mapM transIdent ids)
transAbsDef :: TopDef -> Err (Either [(Ident, G.Info)] [GO.Option])
transAbsDef x = case x of
DefCat catdefs -> do