Ticket #1087 (new bug)
bang patterns with infix ops
| Reported by: | dons | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | Compiler (Parser) | Version: | 6.6 |
| Keywords: | bang patterns | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
$ 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.
-- Don
Change History
Note: See
TracTickets for help on using
tickets.
