Is there a reason that template-haskell does not expose its own parser for using in quasi-quoters?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Is there a reason that template-haskell does not expose its own parser for using in quasi-quoters?

Christopher Done-2
I.e. something like parseExpr :: String -> Either String Exp

It seems that a lot of trivial extensions could be made nicely if this was so. An example might be:

[ne| 1, 2, 3, ... |]

for a non-empty list statically checked to be non-empty. In there I could put any Haskell code. But presently I need to use HSE which isn't quite GHC Haskell and has a large foot-print. The alternative splice

$(ne [| [1, 2, 3, ... ] |])

is rather unwieldy. 

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.