Hi,

trying to adapt the zipN-example in the paper
"Template Meta-programming for Haskell" by
Sheard and Peyton Jones to Language.Haskell.THSyntax
I found that quasi-quotation for patterns does not seem 
to work with ghci-6.0, e.g., the following results in 
"Parse error in pattern":

   pcons x xs = [p| $x : $xs |]
  
Using a user defined data-type

   data List a = Nil | Cons a (List a)

the following works

   pcons x xs = Pcon "Cons" [x,xs]

but I don't want to use a new data type.
Trying to use the standard list representation by

   pcons x xs = Pcon "(:)" [x,xs]

I got the error message

   Data constructor not in scope: `(:)'
   tcLookupDataCon: `(:)' is not in scope

Does anyone know a workaround?
--
 Christoph
_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to