[Haskell-cafe] Using GHC as an arrows preprocessor?
ross at soi.city.ac.uk
Sun Apr 19 10:59:30 EDT 2009
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
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.
More information about the Haskell-Cafe