[Haskell-cafe] Re: Template Haskell: exchanging information between 'splicers'

2010-11-29 Thread jean-christophe mincke
Oleg, I am using GHC 6.12.3 Here a reproduction: in the file Template.hs proc () = runIO $ do runQ [|1+1|] proc' () = [|1+1|] In the file Main.hs i1 = $(proc ()) -- fails at compile time with "Segmentation fault/access violation in generated code". Maybe is it the expected behavior, I

[Haskell-cafe] Re: Template Haskell: exchanging information between 'splicers'

2010-11-27 Thread oleg
Jean-Christophe Mincke wrote: > Does anyone know a clean solution to pass information between 2 executions > of splicers. > > $(splicer ) -- first invocation gather and store some data > > $(splicer ...) -- second one use the data gathered above. Just the other day I wrote such code; I

[Haskell-cafe] Re: Template Haskell + Profiling

2009-04-24 Thread Krzysztof Skrzętnicki
Lame me, I found the answer here: http://haskell.org/ghc/docs/6.10.2/html/users_guide/template-haskell.html ghc -fforce-recomp --make -cpp -O -DXQUERY2_TEST Main ghc -osuf p_o -prof -auto -auto-all -fforce-recomp --make -cpp -O -DXQUERY2_TEST Main Regards Christopher Skrzętnicki 2009/4/24 Krzy

[Haskell-cafe] Re: Template Haskell compilation error on Windows (was Re: speed: ghc vs gcc)

2009-02-21 Thread Peter Verswyvelen
I JUST FOUND OUT...SILLY ME!!! ;-) On Sun, Feb 22, 2009 at 1:13 AM, Don Stewart wrote: > Missing --make > > bugfact: > > I tried to compile the template Haskell loop unrolling trick from Claus > Reinke > > on my machine which is running Windows and GHC 6.10.1, and I got linker > errors. > > >

[Haskell-cafe] Re: Template Haskell compilation error on Windows (was Re: speed: ghc vs gcc)

2009-02-21 Thread Don Stewart
Missing --make bugfact: > I tried to compile the template Haskell loop unrolling trick from Claus Reinke > on my machine which is running Windows and GHC 6.10.1, and I got linker > errors. > > c:\temp>ghc -O2 -fvia-C -optc-O3 -fforce-recomp Apply.hs > Apply.o:ghc6140_0.hc:(.text+0x7d): undefined

[Haskell-cafe] Re: template haskell overly conservative during splicing?

2008-11-03 Thread Achim Schneider
"Nicolas Frisby" <[EMAIL PROTECTED]> wrote: > When using template haskell (via Derive) to generate this (exact) > instance: > > instance Foldable ((->) Int) => Foldable > Data.Derivable.InterpreterLib.Test.List > where foldMap f (Cons x0 x1) = (const mempty Cons `mappend` > foldMap f x0)

Re: [Haskell-cafe] Re: Template Haskell

2008-10-22 Thread Andrew Coppin
Achim Schneider wrote: Imagine generating an HTML combinator library out of the HTML dtd. That seems like a fairly extreme thing to want to be doing... But yeah, if you wanted to do something like that, machine-generated is the way. (Presumably a much more common thing to want to do is gener

[Haskell-cafe] Re: Template Haskell

2008-10-21 Thread Achim Schneider
Andrew Coppin <[EMAIL PROTECTED]> wrote: > If I'm understanding this correctly, Template Haskell is a way to > auto-generate repetative Haskell source code. > > The thing that worries me is... if you need to write repetative > Haskell source code, doesn't that mean that Haskell itself is broken

[Haskell-cafe] RE: Template Haskell Person/Paper entry

2006-05-11 Thread Simon Peyton-Jones
Can anyone help Christoph with uploading a Postscript file to a haskellwiki page? Thanks | -Original Message- | From: Ch. A. Herrmann [mailto:[EMAIL PROTECTED] | Sent: 11 May 2006 14:29 | To: Ian Lynagh | Cc: Simon Peyton-Jones | Subject: Re: Template Haskell Person/Paper entry | | Hi, |

[Haskell-cafe] Re: Template haskell instance checking

2006-03-02 Thread heatsink
Is there a way, in template haskell, to find out what instance declarations exist? Not at the moment, I'm afraid, but it's the kind of question that TH ought to be able to answer. I could offer guidance if someone wanted to implement it. I have a concern about how computed class memberships w