Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/1ee1cd4194555e498d05bfc391b7b0e635d11e29 >--------------------------------------------------------------- commit 1ee1cd4194555e498d05bfc391b7b0e635d11e29 Author: Simon Peyton Jones <simo...@microsoft.com> Date: Sun Dec 23 15:38:48 2012 +0000 Make {-# UNPACK #-} work for type/data family invocations This fixes most of Trac #3990. Consider data family D a data instance D Double = CD Int Int data T = T {-# UNPACK #-} !(D Double) Then we want the (D Double unpacked). To do this we need to construct a suitable coercion, and it's much safer to record that coercion in the interface file, lest the in-scope instances differ somehow. That in turn means elaborating the HsBang type to include a coercion. To do that I moved HsBang from BasicTypes to DataCon, which caused quite a few minor knock-on changes. Interface-file format has changed! Still to do: need to do knot-tying to allow instances to take effect within the same module. compiler/basicTypes/BasicTypes.lhs | 51 ------ compiler/basicTypes/DataCon.lhs | 52 ++++++- compiler/basicTypes/MkId.lhs | 228 ++++++++++++++---------- compiler/hsSyn/HsTypes.lhs | 1 + compiler/iface/BinIface.hs | 20 +-- compiler/iface/BuildTyCl.lhs | 12 +- compiler/iface/IfaceSyn.lhs | 13 +- compiler/iface/MkIface.lhs | 8 +- compiler/iface/TcIface.lhs | 13 ++- compiler/main/PprTyThing.hs | 3 +- compiler/prelude/TysWiredIn.lhs | 2 +- compiler/simplCore/Simplify.lhs | 4 +- compiler/stranal/DmdAnal.lhs | 4 +- compiler/typecheck/TcRnDriver.lhs | 2 +- compiler/typecheck/TcSplice.lhs | 10 +- compiler/typecheck/TcTyClsDecls.lhs | 6 +- compiler/vectorise/Vectorise/Generic/PData.hs | 9 +- compiler/vectorise/Vectorise/Type/TyConDecl.hs | 4 +- 18 files changed, 252 insertions(+), 190 deletions(-) Diff suppressed because of size. To see it, use: git show 1ee1cd4194555e498d05bfc391b7b0e635d11e29 _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc