This patch adds #line directives to the generated C source file so that the locations reported to the user are based on the location of the template-haskell splice point rather than some made-up location in a now-deleted temporary file.
To get the line directives to work right, this also modifies inlineItems to place everything on one line -- er which actually helps give the user context for error messages, anyways.
I left the locations optional at the inlineCode level.
This patch adds
#line
directives to the generated C source file so that the locations reported to the user are based on the location of the template-haskell splice point rather than some made-up location in a now-deleted temporary file.To get the line directives to work right, this also modifies
inlineItems
to place everything on one line -- er which actually helps give the user context for error messages, anyways.I left the locations optional at the
inlineCode
level.