The final batch of changes for the new coercion representation
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 12 May 2011 10:09:28 +0000 (11:09 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 12 May 2011 10:09:28 +0000 (11:09 +0100)
commitc8c2f6bb7d79a2a6aeaa3233363fdf0bbbfad205
tree9975e33afe9569f73b8436bef5df3cea4f830af4
parent025477ef644353f9168a16d0cb9431bcca36be4d
The final batch of changes for the new coercion representation

* Fix bugs in the packing and unpacking of data
  constructors with equality predicates in their types

* Remove PredCo altogether; instead, coercions between predicated
  types (like  (Eq a, [a]~b) => blah) are treated as if they
  were precisely their underlying representation type
       Eq a -> ((~) [a] b) -> blah
  in this case

* Similarly, Type.coreView no longer treats equality
  predciates specially.

* Implement the cast-of-coercion optimisation in
  Simplify.simplCoercionF

Numerous other small bug-fixes and refactorings.

Annoyingly, OptCoercion had Windows line endings, and this
patch switches to Unix, so it looks as if every line has changed.
24 files changed:
compiler/basicTypes/DataCon.lhs
compiler/basicTypes/MkId.lhs
compiler/coreSyn/CoreFVs.lhs
compiler/coreSyn/CoreLint.lhs
compiler/coreSyn/CoreSyn.lhs
compiler/coreSyn/MkExternalCore.lhs
compiler/deSugar/DsUtils.lhs
compiler/iface/IfaceType.lhs
compiler/iface/TcIface.lhs
compiler/main/PprTyThing.hs
compiler/simplCore/FloatIn.lhs
compiler/simplCore/SetLevels.lhs
compiler/simplCore/SimplEnv.lhs
compiler/simplCore/SimplUtils.lhs
compiler/simplCore/Simplify.lhs
compiler/stgSyn/CoreToStg.lhs
compiler/typecheck/TcEnv.lhs
compiler/typecheck/TcHsSyn.lhs
compiler/typecheck/TcRnDriver.lhs
compiler/typecheck/TcType.lhs
compiler/types/Coercion.lhs
compiler/types/FunDeps.lhs
compiler/types/OptCoercion.lhs
compiler/types/Type.lhs