
On Sun, Apr 19, 2009 at 04:32:35PM +0200, Peter Verswyvelen wrote:
I'm making some custom arrows and I'm getting bugs when using the GHC preprocessor, but not when using the old standalone preprocessor.
In order to debug this, it would be nice to use GHC as an arrows preprocessor (so converting the arrow notation into plain Haskell and outputting the converted source code); is this possible?
It isn't: the desugaring in GHC maps type-annotated Haskell into GHC's Core language. I'd be very interested in tracking down any behavioural differences between the standalone preprocessor and the GHC implementation. Are these strictness bugs, or something else? Note that both of these translators assume that your combinators satisfy the arrow laws.
I also noticed that GHC's builtin preprocessor generates far more intermediate combinators than the old preprocessor. The benchmark in this paper seems to confirm this. Is this a known issue?
I've heard of this, but not seen a simple clear test case.