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)
-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
: 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
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
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
]
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
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:
...@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
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
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
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 -
11 matches
Mail list logo