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

Christopher Done chrisdone at gmail.com
Mon Apr 16 16:36:22 UTC 2018


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180416/2c2bce3f/attachment.html>


More information about the Haskell-Cafe mailing list