[commit: ghc] wip/impredicativity: Never generate a `tyvar <~ sigma` constraint (b3154e7)

git at git.haskell.org git at git.haskell.org
Tue Aug 4 07:36:34 UTC 2015


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

On branch  : wip/impredicativity
Link       : http://ghc.haskell.org/trac/ghc/changeset/b3154e7d34986fbba403ed00c4ea6b694c220107/ghc

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

commit b3154e7d34986fbba403ed00c4ea6b694c220107
Author: Alejandro Serrano <trupill at gmail.com>
Date:   Sat Aug 1 08:32:04 2015 +0200

    Never generate a `tyvar <~ sigma` constraint
    
    This patch changes the generation and canonicalization of <~
    constraints, as shown in the document in docs/types.
    
    Now, `tyvar <~ sigma` or `tyfam <~ sigma` constraint are not
    regarded as canonical, and are converted to equalities at
    canonicalisation time. However, care is taken to not generate
    those equalities, neither in other canonicalisation steps or
    in the constraint generation process.
    
    This changes allows us to get rid of the `tct_flavor` flag
    in `TyThing`, which remembered whether certain type was
    coming from an un-annotated lamda or let. Now, since these
    constructs get a new fresh variable, the desired constraint
    with equality is to be generated.


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

b3154e7d34986fbba403ed00c4ea6b694c220107
 compiler/coreSyn/CoreSubst.hs     |  25 ++--
 compiler/deSugar/DsBinds.hs       |  15 +--
 compiler/typecheck/TcArrows.hs    |   3 +-
 compiler/typecheck/TcBinds.hs     |  17 +--
 compiler/typecheck/TcCanonical.hs |  66 +++++------
 compiler/typecheck/TcEnv.hs       |  32 +++---
 compiler/typecheck/TcEvidence.hs  |  43 ++++---
 compiler/typecheck/TcExpr.hs      |  70 ++++++------
 compiler/typecheck/TcHsSyn.hs     |  10 +-
 compiler/typecheck/TcInstDcls.hs  |   3 +-
 compiler/typecheck/TcMatches.hs   |   9 +-
 compiler/typecheck/TcPat.hs       |  13 +--
 compiler/typecheck/TcRnDriver.hs  |   3 +-
 compiler/typecheck/TcRnTypes.hs   |   7 +-
 compiler/typecheck/TcRules.hs     |  11 +-
 compiler/typecheck/TcType.hs      |   9 +-
 docs/types/impredicativity.ltx    | 234 ++++++++++++++++++++++----------------
 17 files changed, 284 insertions(+), 286 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 b3154e7d34986fbba403ed00c4ea6b694c220107


More information about the ghc-commits mailing list