[Haskell-cafe] Template haskell and scoping

Simon Peyton-Jones simonpj at microsoft.com
Thu Jun 22 06:23:23 EDT 2006


A genuine bug, thank you.  I've just fixed it.  We'll put the fix in
6.4.3.

Simon

| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of C
| Rodrigues
| Sent: 21 June 2006 21:55
| To: haskell-cafe at haskell.org
| Subject: [Haskell-cafe] Template haskell and scoping
| 
| The (.&.) in the splice is out of scope according to GHC.  If I use
[||]
| then it works, but for my purposes it's easier to use the
constructors.  How
| should I refer to that variable?
| 
| import Data.Bits
| import Language.Haskell.TH
| 
| main = print $ $(return $ VarE $ mkName ".&.") 7 (14 :: Int)
| 
| 
| _______________________________________________
| 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