
#14610: newtype wrapping of a monadic stack kills performance -------------------------------------+------------------------------------- Reporter: mrkkrp | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.2.2 Resolution: | Keywords: JoinPoints Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #14620 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj):
So am I right to say “we forbid polymorphic return types because we cannot prove it to be sound, even though we know it would not actually crash if we did allow it”?
Yes, that's right. But be specific about what you mean by "it" in "would not crash if we did allow it". In comment:14 I show a particular transformation. I believe it is (slightly) beneficial, and will not crash, but the result is not type-correct. If you can figure out how to express the proof that it won't crash, as a coercion perhaps, maybe you could somehow express that proof in Core. You don't need casts to expose the problem: #14620 is enough. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14610#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler