[GHC] #7619: Make worker-wrapper unbox data families
GHC
cvs-ghc at haskell.org
Thu Jan 24 13:08:58 CET 2013
#7619: Make worker-wrapper unbox data families
---------------------------------+------------------------------------------
Reporter: akio | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
Keywords: type family | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Changes (by simonpj):
* difficulty: => Unknown
Comment:
Yes absolutely. The trick here is that
* To get from `(Foo Int)` to the underlying data type involves generating
a coercion.
* So if `foo` wants to unbox its argument, the worker/wrapper code must
include coercions.
* Where do those coercions come from? You need the type-family instance
environment, and even then it's a bit dodgy to be looking them up in the
optimiser.
* Or maybe we can gather them from the code itself during analysis, and
keep them in the demand signature.
Same thing happens in CPR I think
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7619#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list