[Haskell-cafe] Locate errors in TH for Haskell code

David Fox dsf at seereason.com
Thu Nov 11 00:18:58 UTC 2021

I'd like to know more about what you are doing, I feel like I've set out to
do something similar in the past and ended up going a different way.

On Sat, Nov 6, 2021 at 2:51 AM Anton Kholomiov <anton.kholomiov at gmail.com>

> I have a task to convert one Haskell expression to another.
> And I'd like to report errors properly.
> [interpret|   -- error reported here
>    valid haskell code
>    invalid code           <- error
> |]
> I can parse it with haskell-src-exts or haskell-src-meta.
> but if I have error in the code (type-check) error is positioned on the
> first line of the QQ-expression.
> Do you know is it possible to report error at the line where it has
> happened or
> to keep original source code location in the Exp.
> In the function I do transformation Exp -> Exp.
> Or maybe there is a better way to do it instead of QQ?
> _______________________________________________
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20211110/0695b2e9/attachment.html>

More information about the Haskell-Cafe mailing list