[Haskell-cafe] Template Haskell question?
Simon Peyton-Jones
simonpj at microsoft.com
Thu Feb 12 12:05:21 EST 2004
There is a lot of TH stuff in the HEAD that is not in the released GHC
6.2. TH is still under active development, including design changes,
largely in response to feedback from people using it -- so keep us
posted on template-haskell at haskell.org
Simon
| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of
| Jeremy Shaw
| Sent: 11 February 2004 16:44
| To: Per Larsson
| Cc: haskell-cafe at haskell.org
| Subject: Re: [Haskell-cafe] Template Haskell question?
|
| Hello,
|
| I had very similar problems due to bugs in 6.2 that are fixed in cvs
head. If you build ghc out of cvs
| head that may fix your problem. If not, you can report the bug on the
glasgow-haskell-
| bugs at haskell.org mailing list.
|
| Jeremy Shaw.
|
|
| On Feb 11, 2004 01:39 AM, Per Larsson <per at L4i.se> wrote:
|
| > I have written a small TH application (module THRecord) which
creates update
| > functions for records. It is intended to be used like this:
| >
| > import THRecord
| >
| > data Record = R {...
| > ...
| > $(THRecord.generateRecordModifiers (reifyDecl Record))
| >
| > It works great, but only if the splice is placed last in the
importing module!
| > If I place it in the middle of the module it seems to hide
subsequent
| > declarations and I get 'Variable not in scope ...' compiler errors.
If I
| > place it at the top of the module I get:
| >
| > ghc-6.2: panic! (the `impossible' happened, GHC version 6.2):
| > nameModule Record {- tc 01D -}
| >
| > Has anybody a clue of what is happening here?
| >
| > -- Per
| >
| >
| > _______________________________________________
| > Haskell-Cafe mailing list
| > Haskell-Cafe at haskell.org
| > http://www.haskell.org/mailman/listinfo/haskell-cafe
|
|
|
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list