RE: Pattern bindings from TH2

"Simon Peyton-Jones" <[email protected]> Mon, 7 Mar 2005 08:39:13 -0000
Newsgroups gmane.comp.lang.haskell.template
Message-ID <036EAC76E7F5EC4996A3B3C3657D411601DBE7E4@EUR-MSG-21.europe.corp.microsoft.com>
The ValD constructor, in the Dec type, lets you make pattern bindings.

Simon

| -----Original Message-----
| From: [email protected]
[mailto:[email protected]] On
| Behalf Of Einar Karttunen
| Sent: 04 March 2005 09:48
| To: [email protected]
| Subject: [Template-haskell] Pattern bindings from TH2
| 
| Hello
| 
| I am trying to make the following declaration work from TH2:
| 
| (x,y) = (a,b) where (Foo a b) = foo
| 
| but haven't found a way to make pattern bindings. Is there a way
| to make such bindings? I am trying to construct the binding
dynamically
| with Language.Haskell.TH.Syntax as the code has to work for declaring
| multiple kinds of pattern bindings.
| 
| - Einar Karttunen
| 
| _______________________________________________
| template-haskell mailing list
| [email protected]
| http://www.haskell.org/mailman/listinfo/template-haskell