|
Template Haskell, [p|...|]: msg#00004lang.haskell.glasgow.bugs
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | [ ghc-Bugs-764685 ] GHCi breaks the terminal, SourceForge.net |
|---|---|
| Next by Date: | RE: Template Haskell, [p|...|], Simon Peyton-Jones |
| Previous by Thread: | [ ghc-Bugs-764685 ] GHCi breaks the terminal, SourceForge.net |
| Next by Thread: | RE: Template Haskell, [p|...|], Simon Peyton-Jones |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |