[commit: ghc] master: Implement OVERLAPPING and OVERLAPPABLE pragmas (see #9242) (97f499b)

git at git.haskell.org git at git.haskell.org
Sun Jul 27 21:36:26 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/97f499b56c5888740ddb147fb198c28a3c06bac7/ghc

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

commit 97f499b56c5888740ddb147fb198c28a3c06bac7
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date:   Sun Jul 27 13:02:37 2014 -0700

    Implement OVERLAPPING and OVERLAPPABLE pragmas (see #9242)
    
    This also removes the short-lived NO_OVERLAP pragama, and renames
    OVERLAP to OVERLAPS.
    
    An instance may be annotated with one of 4 pragams, to control its
    interaction with other overlapping instances:
    
      * OVERLAPPABLE:
        this instance is ignored if a more specific candidate exists
    
      * OVERLAPPING:
        this instance is preferred over more general candidates
    
      * OVERLAPS:
        both OVERLAPPING and OVERLAPPABLE (i.e., the previous GHC behavior).
        When compiling with -XOverlappingInstances, all instance are OVERLAPS.
    
      * INCOHERENT:
        same as before (see manual for details).
        When compiling with -XIncoherentInstances, all instances are INCOHERENT.


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

97f499b56c5888740ddb147fb198c28a3c06bac7
 compiler/basicTypes/BasicTypes.lhs | 73 +++++++++++++++++++++++++++++---------
 compiler/hsSyn/HsDecls.lhs         | 18 +++++-----
 compiler/parser/Lexer.x            | 10 +++---
 compiler/parser/Parser.y.pp        | 14 ++++----
 compiler/typecheck/Inst.lhs        |  2 +-
 compiler/types/InstEnv.lhs         | 27 +++++++-------
 compiler/utils/Binary.hs           | 12 ++++---
 docs/users_guide/glasgow_exts.xml  | 53 ++++++++++++++++-----------
 8 files changed, 136 insertions(+), 73 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 97f499b56c5888740ddb147fb198c28a3c06bac7


More information about the ghc-commits mailing list