Do type refinement in TcIface
authorsimonpj@microsoft.com <unknown>
Wed, 8 Feb 2006 15:44:12 +0000 (15:44 +0000)
committersimonpj@microsoft.com <unknown>
Wed, 8 Feb 2006 15:44:12 +0000 (15:44 +0000)
commitf5ca07d670fd2fcd196aa670890257117a015728
treeb0870f5b490dd9521430e646109c43a80452fa75
parentc5b03909e7c630a874f6f1abf76d28baf4b19d55
Do type refinement in TcIface

This commit fixes a bug in 6.4.1 and the HEAD.  Consider this code,
recorded **in an interface file**

    \(x::a) -> case y of
         MkT -> case x of { True -> ... }
(where MkT forces a=Bool)

In the "case x" we need to know x's type, because we use that
to find which module to look for "True" in. x's type comes from
the envt, so we must refine the envt.

The alternative would be to record more info with an IfaceCase,
but that would change the interface file format.

(This stuff will go away when we have proper coercions.)
ghc/compiler/coreSyn/CoreLint.lhs
ghc/compiler/coreSyn/CoreTidy.lhs
ghc/compiler/iface/IfaceEnv.lhs
ghc/compiler/iface/TcIface.lhs
ghc/compiler/simplCore/Simplify.lhs
ghc/compiler/types/Unify.lhs