\s at the end of lines and cpp

Daan Leijen daanleijen at xs4all.nl
Thu Sep 4 03:40:32 EDT 2003


Thanks Ian for finding this Bug.

I have encountered it before with wxHaskell and I had
just removed the line :-) Now, that I know what causes
this, I'll add an extra space or comment or something.

-- Daan.

> -----Original Message-----
> From: helium-request at cs.uu.nl 
> [mailto:helium-request at cs.uu.nl] On Behalf Of Ian Lynagh
> Sent: woensdag 3 september 2003 22:05
> To: helium at cs.uu.nl; glasgow-haskell-bugs at haskell.org
> Cc: helium at cs.uu.nl
> Subject: \s at the end of lines and cpp
> 
> 
> 
> Hi guys,
> 
> Presumably as one of the gcc 3.3 changes, cpp now treats all 
> '\'s at the end of a line as a line continuation character 
> (at least I imagine that's what is happening, but it doesn't 
> seem to be actually eating a '\n').
> 
> This means that when Helium says
> 
>     infixl 9 \\
> 
> in ../../lvm/src/lib/common/Set.hs, which is compiled with 
> -cpp, ghc says
> 
>     ../../lvm/src/lib/common/Set.hs:137: parse error on input `\'
> 
> as it is seeing
> 
>     infixl 9 \
> 
> Adding a ';' to the end of the line is one way to fix this.
> 
> I'm not sure if the GHC guys consider this a bug; it could 
> possibly be worked around by protecting trailing '\'s (just 
> appending a space is
> sufficient) on lines cpp shouldn't be looking at, but for 
> macro calling lines that might not be possible.
> 
> 
> Thanks
> Ian
> 
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~
>   Please send contributions for the mailing list to: helium at cs.uu.nl
>   Please contact the mailing-list-owner as: 
> helium-request at cs.uu.nl 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~~~~~~~~~
> 
> 
> 





More information about the Glasgow-haskell-bugs mailing list