Hi Matthijs,
This is a shameless plug for EMGM, a library for generic programming that
we've been working on at Utrecht.
| However, there are two issues bothering me still. The first is that the
> | Core types (in particular CoreExpr) are not instances of Show. They are
> | instances of Outputabl
Matthijs
| However, there are two issues bothering me still. The first is that the
| Core types (in particular CoreExpr) are not instances of Show. They are
| instances of Outputable, which allows them to be pretty printed.
| However, this pretty printing is good to view the structure of the
| exp
Core types (in particular CoreExpr) are not instances of Show. They are
instances of Outputable, which allows them to be pretty printed.
However, this pretty printing is good to view the structure of the
expression that the CoreExpr represents, but doesn't show the structure
of the CoreExpr itself
You may find it useful to use External Core (supported in GHC 6.10),
which allows GHC to dump its Core representation into a text file with
a well-defined format:
http://www.haskell.org/ghc/docs/latest/html/users_guide/ext-core.html
There is a (relatively) stand-alone library for handling Core
pro
Hi Brian,
thanks for the swift response!
> Making all GHC's datatypes Showable would probably be a nightmare. Not
I guessed as much. Thanks for confirming my suspicions :-)
> pretty printed output and using that. When you need to pull some more
> details out of a datatype just sticking random pp
SPJ might be able to give you some better answers, but this should help
get you started.
On Fri, Jan 30, 2009 at 08:03:47PM +0100, Matthijs Kooijman wrote:
> However, there are two issues bothering me still. The first is that the
> Core types (in particular CoreExpr) are not instances of Show. The