Add a provenance field to universal coercions.
authorIavor S. Diatchki <diatchki@galois.com>
Thu, 18 Dec 2014 02:46:36 +0000 (18:46 -0800)
committerIavor S. Diatchki <diatchki@galois.com>
Thu, 18 Dec 2014 02:46:36 +0000 (18:46 -0800)
commit1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879
tree092a1a6af1f2867c580e90bcaf103d69bc480710
parent98686223db4df7268cf2fcda99011431519d2a89
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.
compiler/coreSyn/CoreLint.hs
compiler/coreSyn/TrieMap.hs
compiler/deSugar/DsBinds.hs
compiler/iface/IfaceSyn.hs
compiler/iface/IfaceType.hs
compiler/iface/TcIface.hs
compiler/typecheck/TcHsSyn.hs
compiler/typecheck/TcType.hs
compiler/types/Coercion.hs
compiler/types/OptCoercion.hs