From cea181aace80a75e17638fc37c15fdcb94faf120 Mon Sep 17 00:00:00 2001 From: sof Date: Thu, 5 Jun 1997 20:34:11 +0000 Subject: [PATCH] [project @ 1997-06-05 20:32:25 by sof] Correctly add kinds on tyvars (BoxedTypeKinds instead of TypeKind) --- ghc/compiler/rename/ParseIface.y | 14 +++++--------- ghc/compiler/rename/ParseType.y | 4 ++-- ghc/compiler/rename/ParseUnfolding.y | 6 +++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/ghc/compiler/rename/ParseIface.y b/ghc/compiler/rename/ParseIface.y index ce0739f..9d26262 100644 --- a/ghc/compiler/rename/ParseIface.y +++ b/ghc/compiler/rename/ParseIface.y @@ -4,8 +4,6 @@ module ParseIface ( parseIface ) where IMP_Ubiq(){-uitous-} -import CmdLineOpts ( opt_IgnoreIfacePragmas ) - import HsSyn -- quite a bit of stuff import RdrHsSyn -- oodles of synonyms import HsDecls ( HsIdInfo(..) ) @@ -13,11 +11,9 @@ import HsTypes ( mkHsForAllTy ) import HsCore import Literal import BasicTypes ( Fixity(..), FixityDirection(..), NewOrData(..), Version(..) ) -import HsPragmas ( noGenPragmas, noDataPragmas, noClassPragmas, noClassOpPragmas, noInstancePragmas ) -import IdInfo ( exactArity, mkStrictnessInfo, mkBottomStrictnessInfo, - ArgUsageInfo, FBTypeInfo, ArityInfo, StrictnessInfo - ) -import Kind ( Kind, mkArrowKind, mkTypeKind ) +import HsPragmas ( noDataPragmas, noClassPragmas ) +import Kind ( Kind, mkArrowKind, mkBoxedTypeKind ) +import IdInfo ( ArgUsageInfo, FBTypeInfo ) import Lex import RnMonad ( SYN_IE(ImportVersion), SYN_IE(LocalVersion), ParsedIface(..), @@ -27,7 +23,7 @@ import Bag ( emptyBag, unitBag, snocBag ) import FiniteMap ( emptyFM, unitFM, addToFM, plusFM, bagToFM, FiniteMap ) import Name ( OccName(..), isTCOcc, Provenance, SYN_IE(Module) ) import SrcLoc ( mkIfaceSrcLoc ) -import Util ( panic{-, pprPanic ToDo:rm-} ) +--import Util ( panic{-, pprPanic ToDo:rm-} ) import ParseType ( parseType ) import ParseUnfolding ( parseUnfolding ) import Maybes @@ -426,7 +422,7 @@ kind :: { Kind } | akind RARROW kind { mkArrowKind $1 $3 } akind :: { Kind } - : VARSYM { mkTypeKind {- ToDo: check that it's "*" -} } + : VARSYM { mkBoxedTypeKind {- ToDo: check that it's "*" -} } | OPAREN kind CPAREN { $2 -------------------------------------------------------------------------- } diff --git a/ghc/compiler/rename/ParseType.y b/ghc/compiler/rename/ParseType.y index 0042399..850f042 100644 --- a/ghc/compiler/rename/ParseType.y +++ b/ghc/compiler/rename/ParseType.y @@ -14,7 +14,7 @@ import HsPragmas ( noGenPragmas, noDataPragmas, noClassPragmas, noClassOpPragmas import IdInfo ( exactArity, mkStrictnessInfo, mkBottomStrictnessInfo, ArgUsageInfo, FBTypeInfo ) -import Kind ( Kind, mkArrowKind, mkTypeKind ) +import Kind ( Kind, mkArrowKind, mkBoxedTypeKind ) import Lex import RnMonad ( SYN_IE(ImportVersion), SYN_IE(LocalVersion), ParsedIface(..), @@ -123,7 +123,7 @@ kind :: { Kind } | akind RARROW kind { mkArrowKind $1 $3 } akind :: { Kind } - : VARSYM { mkTypeKind {- ToDo: check that it's "*" -} } + : VARSYM { mkBoxedTypeKind {- ToDo: check that it's "*" -} } | OPAREN kind CPAREN { $2 } tv_name :: { RdrName } diff --git a/ghc/compiler/rename/ParseUnfolding.y b/ghc/compiler/rename/ParseUnfolding.y index 61da1ee..56330d9 100644 --- a/ghc/compiler/rename/ParseUnfolding.y +++ b/ghc/compiler/rename/ParseUnfolding.y @@ -15,7 +15,7 @@ import HsPragmas ( noGenPragmas, noDataPragmas, noClassPragmas, noClassOpPragmas import IdInfo ( exactArity, mkStrictnessInfo, mkBottomStrictnessInfo, ArgUsageInfo, FBTypeInfo, ArityInfo, StrictnessInfo ) -import Kind ( Kind, mkArrowKind, mkTypeKind ) +import Kind ( Kind, mkArrowKind, mkBoxedTypeKind ) import Lex import RnMonad ( SYN_IE(ImportVersion), SYN_IE(LocalVersion), ParsedIface(..), @@ -232,7 +232,7 @@ core_val_bndrs : { [] } core_tv_bndr :: { UfBinder RdrName } core_tv_bndr : tv_name DCOLON akind { UfTyBinder $1 $3 } - | tv_name { UfTyBinder $1 mkTypeKind } + | tv_name { UfTyBinder $1 mkBoxedTypeKind } core_tv_bndrs :: { [UfBinder RdrName] } core_tv_bndrs : { [] } @@ -334,7 +334,7 @@ kind :: { Kind } | akind RARROW kind { mkArrowKind $1 $3 } akind :: { Kind } - : VARSYM { mkTypeKind {- ToDo: check that it's "*" -} } + : VARSYM { mkBoxedTypeKind {- ToDo: check that it's "*" -} } | OPAREN kind CPAREN { $2 } tv_name :: { RdrName } -- 1.7.10.4