[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 <ben@…>): In [changeset:"21e9d4f5f67dca22fbe3495f637347c5a8f7b52c/ghc" 21e9d4f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="21e9d4f5f67dca22fbe3495f637347c5a8f7b52c" Fix #15214 by listing (~) in isBuiltInOcc_maybe This changes an obscure error (which mistakenly mentions Template Haskell) to one that makes more sense. Test Plan: make test TEST=T15214 Reviewers: bgamari, mpickering Reviewed By: bgamari, mpickering Subscribers: mpickering, rwbarton, thomie, carter GHC Trac Issues: #15214 Differential Revision: https://phabricator.haskell.org/D4768 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15214#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#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