X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FParseIface.y;h=30083ff093ae4bac4110d9e6118471dbd040bde2;hb=f7ecf7234c224489be8a5e63fced903b655d92ee;hp=935c227128f7c5375d0dea3bdf1854b379c322e6;hpb=26741ec416bae2c502ef00a2ba0e79050a32cb67;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/ParseIface.y b/ghc/compiler/rename/ParseIface.y index 935c227..30083ff 100644 --- a/ghc/compiler/rename/ParseIface.y +++ b/ghc/compiler/rename/ParseIface.y @@ -16,10 +16,10 @@ import FiniteMap ( emptyFM, unitFM, addToFM, plusFM, bagToFM, FiniteMap ) import Name ( ExportFlag(..), mkTupNameStr, preludeQual, RdrName(..){-instance Outputable:ToDo:rm-} ) -import Outputable -- ToDo:rm -import PprStyle ( PprStyle(..) ) -- ToDo: rm debugging +--import Outputable -- ToDo:rm +--import PprStyle ( PprStyle(..) ) -- ToDo: rm debugging import SrcLoc ( mkIfaceSrcLoc ) -import Util ( panic, pprPanic{-ToDo:rm-} ) +import Util ( panic{-, pprPanic ToDo:rm-} ) ----------------------------------------------------------------- @@ -230,9 +230,8 @@ class : gtycon VARID { ($1, Unqual $2) } ctype :: { RdrNamePolyType } ctype : FORALL OBRACK tyvars CBRACK context DARROW type { HsForAllTy (map Unqual $3) $5 $7 } - | FORALL OBRACK tyvars CBRACK type { HsForAllTy (map Unqual $3) [] $5 } - | context DARROW type {{-ToDo:rm-} HsPreForAllTy $1 $3 } - | type {{-ToDo:change-} HsPreForAllTy [] $1 } + | FORALL OBRACK tyvars CBRACK type { HsForAllTy (map Unqual $3) [] $5 } + | type { HsForAllTy [] [] $1 } type :: { RdrNameMonoType } type : btype { $1 } @@ -255,7 +254,7 @@ btype : gtyconapp { case $1 of (tc, tys) -> MonoTyApp tc tys } MonoListTy ty -> MonoTyApp (preludeQual SLIT("[]")) (ty:tys); MonoTupleTy ts -> MonoTyApp (preludeQual (mkTupNameStr (length ts))) (ts++tys); - _ -> pprPanic "test:" (ppr PprDebug $1) +-- _ -> pprPanic "test:" (ppr PprDebug $1) }} } @@ -364,10 +363,9 @@ instdecls : instd { unitBag $1 } | instdecls instd { $1 `snocBag` $2 } instd :: { RdrIfaceInst } -instd : INSTANCE FORALL OBRACK tyvars CBRACK context DARROW gtycon restrict_inst SEMI { mk_inst (Just (map Unqual $4)) $6 $8 $9 } - | INSTANCE FORALL OBRACK tyvars CBRACK gtycon general_inst SEMI { mk_inst (Just (map Unqual $4)) [] $6 $7 } - | INSTANCE context DARROW gtycon restrict_inst SEMI {{-ToDo:rm-} mk_inst Nothing $2 $4 $5 } - | INSTANCE gtycon general_inst SEMI {{-ToDo:rm-} mk_inst Nothing [] $2 $3 } +instd : INSTANCE FORALL OBRACK tyvars CBRACK context DARROW gtycon restrict_inst SEMI { mk_inst (map Unqual $4) $6 $8 $9 } + | INSTANCE FORALL OBRACK tyvars CBRACK gtycon general_inst SEMI { mk_inst (map Unqual $4) [] $6 $7 } + | INSTANCE gtycon general_inst SEMI { mk_inst [] [] $2 $3 } restrict_inst :: { RdrNameMonoType } restrict_inst : gtycon { MonoTyApp $1 [] }