SpecConstr and GADTs
Nicolas Frisby <nicolas.frisby <at> gmail.com>
2012-12-11 00:34:56 GMT
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.
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.
Glasgow-haskell-users mailing list
Glasgow-haskell-users <at> haskell.org