bang patterns with infix ops
|Reported by:||dons||Owned by:|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
$ ghci -fbang-patterns -- Ok Prelude> let at a !b = False in at 1 2 False Prelude> let (.!.) a !b = False in 1 .!. 2 False -- ~ patterns are ok Prelude> let a `at` ~b = False in at 1 2 False Prelude> let a .!. ~b = False in 1 .!. 2 False Prelude> let ~a .!. b = False in 1 .!. 2 False -- Parse error if we combine bang patterns with infix decls: Prelude> let a .!. !b = False in 1 .!. 2 <interactive>:1:10: parse error on input `!' Prelude> let a `at` !b = False in at 1 2 <interactive>:1:11: parse error on input `!' Prelude> let !a .!. b = False in 1 .!. 2 <interactive>:1:5: Parse error in pattern
So looks like ops and infix declarations are missing a case for bang patterns.
Change History (7)
comment:1 Changed 10 years ago by
|Summary:||Bang pattern parsing with infix ops → had a look into it, might be best to leave it as it is.|
comment:2 Changed 10 years ago by
|Summary:||had a look into it, might be best to leave it as it is. → bang patterns with infix ops|
Note: See TracTickets for help on using tickets.