Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#8636 closed bug (invalid)

Infix declaration on operators ending on backslash

Reported by: jcristovao Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: GHC rejects valid program Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:



I was trying the latest GHC Head (version 7.7.20131227), when I noticed a regression. I don't know if this is intended behaviour or not. This compiled ok under 7.6.3

(?&&\) :: (Monoid a) => a -> (a -> Bool) -> a
(?&&\) value f = if f value then value else mempty
infixl 1 ?&&\

Under 7.7, the infixl declaration only works if I double escape it.

infixl 1 ?&&\\

Is this intended?

Change History (2)

comment:1 Changed 4 years ago by monoidal

Are you sure? I cannot reproduce the difference in behavior between 7.6 and 7.7. This escaping happens with -XCPP flag but it does not seem to be version dependent.

comment:2 Changed 4 years ago by jcristovao

Resolution: invalid
Status: newclosed

You are absolutely right, I had indeed enabled the CPP extension, and was oblivious of this unintended consequence. Sorry for the noise...

Last edited 4 years ago by jcristovao (previous) (diff)
Note: See TracTickets for help on using tickets.