2 ms·
I just (last night) dug into some TH hackery. I put together a quasiquoter for testing/debugging that would walk a do block and decorate every statement with (
by dllthomas 12y ago
I just (last night) dug into some TH hackery. I put together a quasiquoter for testing/debugging that would walk a do block and decorate every statement with (`onException` ...) set up to print the source location when an exception is thrown. I actually had to first parse with haskell-src-exts to get the location info, and currently I'm turning it into an ExpQ by pretty-printing and reparsing - which I don't love, but gets the job done.
https://github.com/dlthomas/snowdrift/compare/5094b1ca0e5002c0d12a7f714b083d88d450ddb3...e7bf8ac8b6320fcc46233248170920fc97d805c9 https://github.com/dlthomas/snowdrift/compare/5094b1ca0e5002...