RE: example of derive using Template Haskell?
"Simon Peyton-Jones" <[email protected]> Mon, 17 Jan 2005 14:46:04 -0000
| Newsgroups | gmane.comp.lang.haskell.template |
|---|---|
| Message-ID | <036EAC76E7F5EC4996A3B3C3657D411601799B86@EUR-MSG-21.europe.corp.microsoft.com> |
6.4 should be out "soon". I.e. in January I hope. It's hard to finish though! Simon | -----Original Message----- | From: [email protected] [mailto:[email protected]] On | Behalf Of S. Alexander Jacobson | Sent: 14 January 2005 03:53 | To: Sean Seefried | Cc: [email protected] | Subject: Re: [Template-haskell] example of derive using Template Haskell? | | Uhm. Ok, so I guess the question is then... | What is acceptable in 6.2 or is 6.4 coming out | soon? | | -Alex- | | On Fri, 14 Jan 2005, Sean Seefried wrote: | | > | > On 14/01/2005, at 7:22 AM, S. Alexander Jacobson wrote: | > | >> This is really great. Do you have an example of use of each of these | >> functions? | >> | >> e.g. do I do: | >> | >> $(derive [Int,String,MyTime]) | >> or | >> | >> $(derive ["Int","String","MyTime"]) | > | > Oh dear, I've just realised a problem. This code only works with GHC 6.3. | > Template Haskell has changed a lot since GHC 6.2. | > | > What you should type is | > | > $(derive [ ''Int, ''String, ''MyTime ]) | > | > The '' syntax means "get the name of this type". There is also a single quote | > syntax ' which means "get the name of this variable". This is new syntax | > introduced with Template Haskell. | > | > Sean | > | > | | ______________________________________________________________ | S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com | _______________________________________________ | template-haskell mailing list | [email protected] | http://www.haskell.org/mailman/listinfo/template-haskell