[commit: ghc] master: Add support for pattern synonym type signatures. Syntax is of the form (cce6318)
git at git.haskell.org
git at git.haskell.org
Thu Nov 20 14:41:24 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cce6318e8fdb086a8501a0c81ae1ee02eed67835/ghc
>---------------------------------------------------------------
commit cce6318e8fdb086a8501a0c81ae1ee02eed67835
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date: Thu Nov 20 22:38:11 2014 +0800
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.
>---------------------------------------------------------------
cce6318e8fdb086a8501a0c81ae1ee02eed67835
compiler/hsSyn/HsBinds.lhs | 51 +++---
compiler/hsSyn/HsTypes.lhs | 16 +-
compiler/iface/IfaceSyn.lhs | 25 ++-
compiler/iface/IfaceType.lhs | 15 +-
compiler/parser/Parser.y | 51 ++++--
compiler/parser/RdrHsSyn.hs | 27 +--
compiler/rename/RnBinds.lhs | 42 +++--
compiler/typecheck/TcBinds.lhs | 50 +++++-
compiler/typecheck/TcClassDcl.lhs | 4 +-
compiler/typecheck/TcPat.lhs | 23 ++-
compiler/typecheck/TcPatSyn.lhs | 195 +++++++++++++++------
compiler/typecheck/TcPatSyn.lhs-boot | 9 +-
docs/users_guide/glasgow_exts.xml | 15 +-
testsuite/tests/ghci/scripts/T8776.stdout | 2 +-
.../patsyn/should_compile/{bidir.hs => T8584-1.hs} | 3 +-
testsuite/tests/patsyn/should_compile/T8584-2.hs | 8 +
testsuite/tests/patsyn/should_compile/T8584-3.hs | 8 +
testsuite/tests/patsyn/should_compile/T8968-1.hs | 8 +
testsuite/tests/patsyn/should_compile/T8968-2.hs | 8 +
testsuite/tests/patsyn/should_compile/T8968-3.hs | 11 ++
testsuite/tests/patsyn/should_compile/all.T | 6 +
utils/haddock | 2 +-
22 files changed, 397 insertions(+), 182 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc cce6318e8fdb086a8501a0c81ae1ee02eed67835
More information about the ghc-commits
mailing list