Re: Question about Haskell AST

2011-02-22 Thread Ian Lynagh
Hi Jane, On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote: Did you mean I have to include the dflags like below to get the parsetree of a base library file like libraries/base/GHC/List.lhs I am stilling getting the same error AstWalker: panic! (the 'impossible' happened)

RE: Question about Haskell AST

2011-02-22 Thread Simon Peyton-Jones
-users@haskell.org | Subject: Re: Question about Haskell AST | | | Hi Jane, | | On Mon, Feb 21, 2011 at 11:46:16PM -0800, Jane Ren wrote: | | Did you mean I have to include the dflags like below to get the parsetree | of a base library file like libraries/base/GHC/List.lhs | | I am stilling

RE: Question about Haskell AST

2011-02-21 Thread Jane Ren
: Question about Haskell AST My guess is that the base-package modules need language extensions to compile. These extensions are specified in libraries/base/base.cabal (search for extensions). I don't think you are including these extensions in the dflags you are using. Personally I think it'd

Re: Question about Haskell AST

2011-02-08 Thread Christiaan Baaij
Does the following code help you out? (Do note it's for the GHC 6.12.* API) It just uses the the default GHC driver, meaning you don't have to separately call the desugerar, simplifier, etc. It's what I use for my CλaSH tool. Cheers, Christiaan -- External Modules import qualified GHC.Paths

Re: Question about Haskell AST

2011-02-06 Thread Tim Chevalier
On Mon, Jan 10, 2011 at 9:21 AM, Jane Ren j2...@ucsd.edu wrote: Hi, I need to be able to take a piece of Haskell source code and get an simplified, typed, intermediate representation of the AST, which means I need to use compiler/coreSyn/CoreSyn.lhs So I'm first trying to get the

RE: Question about Haskell AST

2011-02-04 Thread Jane Ren
] Sent: Tuesday, January 25, 2011 1:34 AM To: Jane Ren Cc: Simon Peyton-Jones; glasgow-haskell-users@haskell.org Subject: Re: Question about Haskell AST On 24 January 2011 17:20, Jane Ren j2...@ucsd.edu wrote: When I try this, I get AstWalker: panic! (the 'impossible' happened) (GHC version

Re: Question about Haskell AST

2011-01-25 Thread Max Bolingbroke
On 24 January 2011 17:20, Jane Ren j2...@ucsd.edu wrote: When I try this, I get AstWalker: panic! (the 'impossible' happened)  (GHC version 7.0.1 for x86_64-apple-darwin):        lexical error at character 'i' It looks like you need to add the CPP extension to the DynFlags:

RE: Question about Haskell AST

2011-01-25 Thread Simon Peyton-Jones
...@ucsd.edu] | Sent: 24 January 2011 17:20 | To: Simon Peyton-Jones; glasgow-haskell-users@haskell.org | Subject: RE: Question about Haskell AST | | Hi Simon, | | That is exactly what I needed. However, although I was able to get the | patterns from the parse tree for test modules that I wrote, I

RE: Question about Haskell AST

2011-01-24 Thread Jane Ren
augment that wiki page. Thanks Jane From: Simon Peyton-Jones [simo...@microsoft.com] Sent: Tuesday, January 11, 2011 12:06 AM To: Jane Ren; glasgow-haskell-users@haskell.org Subject: RE: Question about Haskell AST desugarModule returns a GHC.DesugaredModule

RE: Question about Haskell AST

2011-01-11 Thread Simon Peyton-Jones
January 2011 17:21 | To: glasgow-haskell-users@haskell.org | Subject: Question about Haskell AST | | Hi, | | I need to be able to take a piece of Haskell source code and get an | simplified, typed, intermediate representation of the AST, which means I need | to use compiler/coreSyn/CoreSyn.lhs

Question about Haskell AST

2011-01-10 Thread Jane Ren
Hi, I need to be able to take a piece of Haskell source code and get an simplified, typed, intermediate representation of the AST, which means I need to use compiler/coreSyn/CoreSyn.lhs So I'm first trying to get the desguaredModule of the source code with ... modSum -