[commit: ghc] master: Add a provenance field to universal coercions. (1d4e94d)

git at git.haskell.org git at git.haskell.org
Thu Dec 18 02:45:37 UTC 2014


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879/ghc

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

commit 1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879
Author: Iavor S. Diatchki <diatchki at galois.com>
Date:   Wed Dec 17 18:46:36 2014 -0800

    Add a provenance field to universal coercions.
    
    Universal coercions allow casting between arbitrary types, so it is a
    good idea to keep track where they came from, which now we can do by
    using the provenance field in `UnivCo`.
    
    This is also handy for type-checker plugins that provide functionality
    beyond what's expressible by GHC's standard coercions:  such plugins
    can generate universal coercions, but they should still tag them,
    so that if something goes wrong we can link the casts to the plugin.


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

1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879
 compiler/coreSyn/CoreLint.hs  |  2 +-
 compiler/coreSyn/TrieMap.hs   |  7 +++++--
 compiler/deSugar/DsBinds.hs   |  2 +-
 compiler/iface/IfaceSyn.hs    |  2 +-
 compiler/iface/IfaceType.hs   | 14 ++++++++------
 compiler/iface/TcIface.hs     |  2 +-
 compiler/typecheck/TcHsSyn.hs |  4 ++--
 compiler/typecheck/TcType.hs  |  2 +-
 compiler/types/Coercion.hs    | 43 +++++++++++++++++++++++--------------------
 compiler/types/OptCoercion.hs | 20 ++++++++++----------
 10 files changed, 53 insertions(+), 45 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 1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879


More information about the ghc-commits mailing list