Quasi quoting

Simon Peyton-Jones simonpj at microsoft.com
Sat Feb 6 13:14:27 EST 2010


| What is the reason to restrict quasi quotation to top-level
| declarations rather than letting it also generate local declarations?

Local declarations for quasi-quotation would be possible too:

f x = v 
   where
     [pads| ..blah..|]

But it's a bit more complicated to implement. And a Q [Dec] could produce type and class declarations, which can't appear nested; that would be rejected, but it feels uncomfortable.  

So, reasonable suggestion, but I think I'll wait till we have a serious customer for this before taking it further.

Simon

| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org [mailto:glasgow-haskell-
| users-bounces at haskell.org] On Behalf Of Sebastian Fischer
| Sent: 02 February 2010 11:04
| To: Simon Peyton-Jones
| Cc: glasgow-haskell-users at haskell.org; Kathleen Fisher;
| mainland at eecs.harvard.edu
| Subject: Re: Quasi quoting
| 
| Dear Simon,
| 
| I want to generate data type declarations using quasi quotes and hence
| support the proposal to allow quasi quotation at declaration level.
| With respect to syntax, I'd prefer [|blah| ... |] over the current
| [$blah| ... |] and would also be fine with [blah| ... |].
| 
| What is the reason to restrict quasi quotation to top-level
| declarations rather than letting it also generate local declarations?
| 
| Sebastian
| 
| 
| --
| Underestimating the novelty of the future is a time-honored tradition.
| (D.G.)
| 
| 
| 
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



More information about the Glasgow-haskell-users mailing list