Skip to content

Tiny bug in lexer around lexing banana brackets

If I say

{-# LANGUAGE Arrows #-}

(|:) :: Int -> Int -> Int
(|:) = (+)

I get

/Users/rae/temp/Bug.hs:3:3: parse error on input ‘:’

Trying this with other operators, like (|+), works fine.

The problem is that notFollowedBySymbol in Lexer.x is slightly wrong.

I will fix in ongoing (mostly unrelated) work.

Trac metadata
Trac field Value
Version 7.10.1
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information