#9217 closed bug (duplicate)

GHCi accepts any operator as a value constructor when enclosed in parens

Reported by: wz1000 Owned by:
Priority: normal Milestone:
Component: GHCi Version: 7.6.3
Keywords: Cc: hvr
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by wz1000)

Eg:- 'data P = (+) Char Char' is accepted by GHCi
However 'data P = (-) Char Char' is accepted by GHCi 7.8.2, but is reported to be rejected by GHC 7.6.3
GHCi 7.4 is reported to reject these inputs.
GHC 7.8.2 also rejects these inputs.
Operators defined this way are inaccessible and do not shadow existing operators.
Legal operators(those prefixed by a colon) act normally when surrounded by parens

Change History (2)

comment:1 Changed 11 months ago by wz1000

  • Description modified (diff)

comment:2 Changed 11 months ago by monoidal

  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the report. It looks to be a duplicate of #8556.

Note: See TracTickets for help on using tickets.