From: Adam Megacz Date: Sun, 2 Oct 2011 02:40:02 +0000 (-0700) Subject: swap <[]> and <{}> syntax X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=c5b178be60a5a44abd2f4ddf8c399857678326e2 swap <[]> and <{}> syntax --- diff --git a/compiler/hetmet b/compiler/hetmet index 7523e50..025c2de 160000 --- a/compiler/hetmet +++ b/compiler/hetmet @@ -1 +1 @@ -Subproject commit 7523e5094db5e00224ba034b00aa243e69211c9f +Subproject commit 025c2de2effdd7177ca875998b65f51236c8c7c6 diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 5bf9800..9666012 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -1625,9 +1625,9 @@ setSrcLoc :: RealSrcLoc -> P () setSrcLoc new_loc = P $ \s -> POk s{loc=new_loc} () incrBracketDepth :: P () -incrBracketDepth = P $ \s -> POk (s{code_type_bracket_depth = LambdaFlavor:(code_type_bracket_depth s)}) () +incrBracketDepth = P $ \s -> POk (s{code_type_bracket_depth = KappaFlavor:(code_type_bracket_depth s)}) () incrBracketDepth1 :: P () -incrBracketDepth1 = P $ \s -> POk (s{code_type_bracket_depth = KappaFlavor:(code_type_bracket_depth s)}) () +incrBracketDepth1 = P $ \s -> POk (s{code_type_bracket_depth = LambdaFlavor:(code_type_bracket_depth s)}) () decrBracketDepth :: P () decrBracketDepth = P $ \s -> POk (s{code_type_bracket_depth = tail (code_type_bracket_depth s)}) () pushBracketDepth :: P () diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp index bd93101..0604d22 100644 --- a/compiler/parser/Parser.y.pp +++ b/compiler/parser/Parser.y.pp @@ -1032,7 +1032,7 @@ atype :: { LHsType RdrName } | '(' ctype ',' comma_types1 ')' { LL $ HsTupleTy Boxed ($2:$4) } | '(#' comma_types1 '#)' { LL $ HsTupleTy Unboxed $2 } | '[' ctype ']' { LL $ HsListTy $2 } - | '<[' ctype ']>' '@' tyvar { LL $ HsModalBoxType (unLoc $5) $2 } + | '<{' ctype '}>' '@' tyvar { LL $ HsModalBoxType (unLoc $5) $2 } | '[:' ctype ':]' { LL $ HsPArrTy $2 } | '(' ctype ')' { LL $ HsParTy $2 } | '(' ctype '::' kind ')' { LL $ HsKindSig $2 (unLoc $4) } diff --git a/compiler/prelude/TysWiredIn.lhs b/compiler/prelude/TysWiredIn.lhs index e420d7b..21e51c4 100644 --- a/compiler/prelude/TysWiredIn.lhs +++ b/compiler/prelude/TysWiredIn.lhs @@ -175,10 +175,10 @@ parrDataConName = mkWiredInDataConName UserSyntax gHC_PARR' (fsLit "PArr") parrDataConKey parrDataCon hetMetCodeTypeTyConName :: Name -hetMetCodeTypeTyConName = mkWiredInTyConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "<[]>@") hetMetCodeTypeTyConKey hetMetCodeTypeTyCon +hetMetCodeTypeTyConName = mkWiredInTyConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "<{}>@") hetMetCodeTypeTyConKey hetMetCodeTypeTyCon hetMetCodeTypeDataConName :: Name hetMetCodeTypeDataConName = - mkWiredInDataConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "<[]>") hetMetCodeTypeDataConKey hetMetCodeTypeDataCon + mkWiredInDataConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "<{}>") hetMetCodeTypeDataConKey hetMetCodeTypeDataCon hetMetKappaTyConName :: Name hetMetKappaTyConName = mkWiredInTyConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "~~>") hetMetKappaTyConKey hetMetKappaTyCon diff --git a/libraries/base b/libraries/base index 19f76ac..09e6076 160000 --- a/libraries/base +++ b/libraries/base @@ -1 +1 @@ -Subproject commit 19f76ac9224d3059e751835e6ca64d7aba50aa2c +Subproject commit 09e60760f9e06ad7c2318d38d2f04825ea93e3a2