SpecConstr and GADTs

Nicolas Frisby nicolas.frisby at gmail.com
Tue Dec 11 01:34:56 CET 2012


I suspect I've found a situation where, to a first approximation, I'd like
SpecConstr to run more than once.

I'm specializing on GADT constructors that contain coercions, so the
constructor-specialized functions have RHSs with refined types. In my
situation, those refined types enable simplifications/specializations that
eventually result in additional calls that would lead to further
constructor-specializations if the eventual calls were somehow already
manifest. But it seems that the simplification/specialization only happens
after the SpecConstr pass, so the resulting usages don't lead to further
constructor-specialized functions.

Ticket 2642 http://hackage.haskell.org/trac/ghc/ticket/2642 is the only
mention I've seen of the SpecConstr pass being repeated.

The more I think about my desired behavior of SpecConstr, the more I
suspect that a failure to maximally share the constructor-specializations
(leading to possible non-termination) might be a concern if the pass were
simply repeated in my particular case.

Regarding broader impact, I suspect this situation might arise with heavy
uses of single types.

Is there any known mechanisms to handle this interaction between SpecConstr
and GADTs? I'll be able to provide concrete details about my situation in a
few weeks, if anyone is interested.

Thanks for your time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20121210/ae6d478f/attachment.htm>


More information about the Glasgow-haskell-users mailing list