Re: Core questions

2009-02-02 Thread Sean Leather
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

RE: Core questions

2009-02-02 Thread Simon Peyton-Jones
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

Re: Core questions

2009-01-30 Thread Claus Reinke
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

Re: Core questions

2009-01-30 Thread Tim Chevalier
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

Re: Core questions

2009-01-30 Thread Matthijs Kooijman
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

Re: Core questions

2009-01-30 Thread Brian Alliet
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