Add support for pattern synonym type signatures.
authorDr. ERDI Gergo <gergo@erdi.hu>
Thu, 20 Nov 2014 14:38:11 +0000 (22:38 +0800)
committerDr. ERDI Gergo <gergo@erdi.hu>
Thu, 20 Nov 2014 14:38:11 +0000 (22:38 +0800)
commitcce6318e8fdb086a8501a0c81ae1ee02eed67835
treef9257e7f86fa47c73e22951fdb1471310d252504
parent3b81309c057fc216afa053d195aaa85ee3a1ba9e
Add support for pattern synonym type signatures.
Syntax is of the form

    pattern P :: (Prov b) => (Req a) => a -> b -> Int -> T a

which declares a pattern synonym called `P`, with argument types `a`, `b`,
and `Int`, and result type `T a`, with provided context `(Prov b)` and required
context `(Req a)`.

The Haddock submodule is also updated to use this new syntax in generated docs.
22 files changed:
compiler/hsSyn/HsBinds.lhs
compiler/hsSyn/HsTypes.lhs
compiler/iface/IfaceSyn.lhs
compiler/iface/IfaceType.lhs
compiler/parser/Parser.y
compiler/parser/RdrHsSyn.hs
compiler/rename/RnBinds.lhs
compiler/typecheck/TcBinds.lhs
compiler/typecheck/TcClassDcl.lhs
compiler/typecheck/TcPat.lhs
compiler/typecheck/TcPatSyn.lhs
compiler/typecheck/TcPatSyn.lhs-boot
docs/users_guide/glasgow_exts.xml
testsuite/tests/ghci/scripts/T8776.stdout
testsuite/tests/patsyn/should_compile/T8584-1.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T8584-2.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T8584-3.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T8968-1.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T8968-2.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/T8968-3.hs [new file with mode: 0644]
testsuite/tests/patsyn/should_compile/all.T
utils/haddock