summaryrefslogtreecommitdiff
path: root/compiler/parser/Parser.y.pp
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2013-08-05 16:54:44 +0100
committerRichard Eisenberg <eir@cis.upenn.edu>2013-08-05 17:28:03 +0100
commit9082111dcdbad7d161ecb0a08bb467f6c62e0a1b (patch)
tree84f7b23a26ba73b3c3da5746254429a2fd54b689 /compiler/parser/Parser.y.pp
parent334131bce7822ede7099c0d825b78200094c779e (diff)
downloadhaskell-9082111dcdbad7d161ecb0a08bb467f6c62e0a1b.tar.gz
Added support for writing and checking closed type families is hs-boot files.
As documented in the users' guide, you can now write type family Foo a where .. in a hs-boot file to declare an abstract closed type family.
Diffstat (limited to 'compiler/parser/Parser.y.pp')
-rw-r--r--compiler/parser/Parser.y.pp2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/parser/Parser.y.pp b/compiler/parser/Parser.y.pp
index b35bbf38b4..b6f0c88adb 100644
--- a/compiler/parser/Parser.y.pp
+++ b/compiler/parser/Parser.y.pp
@@ -712,6 +712,8 @@ where_type_family :: { Located (FamilyInfo RdrName) }
ty_fam_inst_eqn_list :: { Located [LTyFamInstEqn RdrName] }
: '{' ty_fam_inst_eqns '}' { LL (unLoc $2) }
| vocurly ty_fam_inst_eqns close { $2 }
+ | '{' '..' '}' { LL [] }
+ | vocurly '..' close { let L loc _ = $2 in L loc [] }
ty_fam_inst_eqns :: { Located [LTyFamInstEqn RdrName] }
: ty_fam_inst_eqns ';' ty_fam_inst_eqn { LL ($3 : unLoc $1) }