mainland / mainland-pretty

Other
10 stars 12 forks source link

gcc not happy with #line pragma output #12

Closed charles-cooper closed 8 years ago

charles-cooper commented 8 years ago

Using the prettyPragma printer (in conjunction with language-c-quote, which, by the way, is very nice) results in gcc being unhappy with the #line directive:

/home/charles/machine/bin/main.cpp:62:10: error: """src" is not a valid filename
 #line 64 ""src/Main.hs""

I am guessing the source of the issue is https://github.com/mainland/mainland-pretty/blob/master/Text/PrettyPrint/Mainland.hs#L697, where shows surrounds a string with double quotes, and then it gets quoted again.

mainland commented 8 years ago

Yes, that's a problem. I never noticed it because I always use displayPragmaLazyText. Thanks!