diff options
author | Iavor S. Diatchki <diatchki@galois.com> | 2014-12-17 18:46:36 -0800 |
---|---|---|
committer | Iavor S. Diatchki <diatchki@galois.com> | 2014-12-17 18:46:36 -0800 |
commit | 1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879 (patch) | |
tree | 092a1a6af1f2867c580e90bcaf103d69bc480710 /compiler/iface/IfaceSyn.hs | |
parent | 98686223db4df7268cf2fcda99011431519d2a89 (diff) | |
download | haskell-1d4e94d1ab18e2f089cd17b1a1f9ebd3cd6b7879.tar.gz |
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.
Diffstat (limited to 'compiler/iface/IfaceSyn.hs')
-rw-r--r-- | compiler/iface/IfaceSyn.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs index d850f66de1..ead3da4cac 100644 --- a/compiler/iface/IfaceSyn.hs +++ b/compiler/iface/IfaceSyn.hs @@ -1152,7 +1152,7 @@ freeNamesIfCoercion (IfaceCoVarCo _) = emptyNameSet freeNamesIfCoercion (IfaceAxiomInstCo ax _ cos) = unitNameSet ax &&& fnList freeNamesIfCoercion cos -freeNamesIfCoercion (IfaceUnivCo _ t1 t2) +freeNamesIfCoercion (IfaceUnivCo _ _ t1 t2) = freeNamesIfType t1 &&& freeNamesIfType t2 freeNamesIfCoercion (IfaceSymCo c) = freeNamesIfCoercion c |