[Haskell-cafe] Re: Temlpate Haskell: [d| ... |]

Robert Greayer robgreayer at yahoo.com
Fri Oct 17 14:02:06 EDT 2008


--- On Fri, 10/17/08, Achim Schneider <barsoap at web.de> wrote:
> > > declarations = [d|
> > >    foo = "bar"
> > >    bar = "foo"
> > > |]
> -fth doesn't make a difference here, I'm using
> -XTemplateHaskell with
> ghc 6.8.3
> 

The following lines, verbatim, pasted into a file, work for me with 6.8.3 with no command line options:

{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH

declarations = [d|
   foo = "bar"
   bar = "foo"
   |]

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Haskell-Cafe mailing list