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

Core questions

2009-01-30 Thread Matthijs Kooijman
(I've previously sent this mail to haskell-cafe, but I guess this list is more appropriate) Hi all, for my Master's thesis, I'm looking into functional hardware descriptions, and in particular to translate haskell code into VHDL that can be programmed into an FPGA. For this, I'm using the GHC AP

Re: ext-core Questions

2002-12-30 Thread Kirsten Chevalier
On Fri, Dec 20, 2002 at 12:01:01PM -0500, [EMAIL PROTECTED] wrote: > Secondly, in GHC produced Core programs, one sees frequently references to > intermediate values from other Modules such as SystemziIO.lvl (print > newline?) or GHCziNum.lvl1 (which seems to be an Integer constant) or even > GH

Re: ext-core Questions

2002-12-21 Thread Alastair Reid
> (For those who are interested in the background of my question: I > wondered if it would be possible to translate Core [Haskell] to Perl. If I hunt around a bit, I can maybe find my notes on translating to Forth - my goal was to be able to run Haskell on all the printers at work. -- Alastair

ext-core Questions

2002-12-20 Thread Ingo Wechsung
Dear GH Users, I have been using the -fext-core option to generate *.hcr Files. I've also read the document "An External Representationfor the Core Language." There are still some things that confuse me. Firstly, it seems, that Tuples are sometimes represented for example for (a,b) as DataziTup