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

git at git.haskell.org git at git.haskell.org
Thu Nov 20 10:29:40 UTC 2014


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

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

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

commit d4530b69ff9518a091cc1aabb2b75f2e9d5b275c
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)`.


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

d4530b69ff9518a091cc1aabb2b75f2e9d5b275c
 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 d4530b69ff9518a091cc1aabb2b75f2e9d5b275c


More information about the ghc-commits mailing list