You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Going through the RWH book, I ended up having the following 2 definitions:
raw ="\ \#define X_FOOBAR /* a foobar */\n\ \#define X_QUUX /* a quux */\n\ \#define Y_BLAH /* a blah */\n\ \#define X_BLAH /* a blah */\n\ \"
defs =map sndWord . (lines>>>filter ("#define X_"`isPrefixOf`))
where sndWord = (!!1) .words
(coincidentally, GitHub's markdown has the same bug :))
Inserting a space between the \ and " results in correct behavior (but obviously also a different string value stored in raw):
Note that both snippets compile, i.e. \" as the last line of a multiline string is perfectly legal and not the same as ending a single-line string with a backslach.