[commit: ghc] wip/T8584: Add support for pattern synonym type signatures. Syntax is of the form (10bd68e)

git at git.haskell.org git at git.haskell.org
Wed Nov 19 12:09:01 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T8584
Link       : http://ghc.haskell.org/trac/ghc/changeset/10bd68e4a63fcee7556064175bf5de7d3bebaa6b/ghc

>---------------------------------------------------------------

commit 10bd68e4a63fcee7556064175bf5de7d3bebaa6b
Author: Dr. ERDI Gergo <gergo at erdi.hu>
Date:   Fri Nov 7 19:29:06 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)`.


>---------------------------------------------------------------

10bd68e4a63fcee7556064175bf5de7d3bebaa6b
 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 +-
 testsuite/tests/ghci/scripts/T8776.stdout        |   2 +-
 testsuite/tests/patsyn/should_compile/T8584-1.hs |   8 +
 testsuite/tests/patsyn/should_compile/T8968-1.hs |   8 +
 testsuite/tests/patsyn/should_compile/all.T      |   2 +
 16 files changed, 351 insertions(+), 177 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 10bd68e4a63fcee7556064175bf5de7d3bebaa6b


More information about the ghc-commits mailing list