fpco / inline-c

284 stars 51 forks source link

Line numbers are off by 5 in throwBlock etc #124

Closed roberth closed 11 months ago

roberth commented 3 years ago

tryBlockQuoteExp :: String -> Q Exp inserts five lines related to exception handling before the user's code.

I've tried to modify it by passing these lines as an extra argument to a variation of C.block, but did not get it to work. It was a hack anyway, because I think tryBlockQuoteExp shouldn't call but one of the internal functions (not inlineItems; that function doesn't seem to have control of the line number either). At least it shouldn't try to reconstruct its code as input to a user-facing function.

bitonic commented 3 years ago

Thanks for the report -- a heads up: I most likely won't have time to get to it in the next week or so. But eventually :).

And of course I'm open to PRs.