[GHC] #15214: Redefining (~) yields a baffling error message

#15214: Redefining (~) yields a baffling error message -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Running this code: {{{#!hs {-# LANGUAGE TypeOperators #-} module Bug where type (~) = Either }}} Yields a rather strange error: {{{ $ /opt/ghc/8.4.3/bin/ghci Bug2.hs GHCi, version 8.4.3: http://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/rgscott/.ghci [1 of 1] Compiling Bug ( Bug2.hs, interpreted ) Bug2.hs:4:1: error: Cannot redefine a Name retrieved by a Template Haskell quote: ~ | 4 | type (~) = Either | ^^^^^^^^^^^^^^^^^ }}} Since Template Haskell certainly isn't involved here. The culprit is that `(~)` isn't listed within `isBuiltInOcc_maybe`. Patch incoming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15214 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15214: Redefining (~) yields a baffling error message -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4768 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D4768 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15214#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15214: Redefining (~) yields a baffling error message
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: patch
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4768
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15214: Redefining (~) yields a baffling error message -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4768 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15214#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC