[GHC] #9194: Remove magic parsing of (~)

GHC ghc-devs at haskell.org
Wed Jun 11 12:43:36 UTC 2014


#9194: Remove magic parsing of (~)
------------------------------------+-------------------------------------
       Reporter:  goldfire          |             Owner:
           Type:  bug               |            Status:  new
       Priority:  normal            |         Milestone:
      Component:  Compiler          |           Version:  7.8.2
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 It seems that `(~)` has magical parsing:

 {{{
 Prelude> :i (~)

 <interactive>:1:2: parse error on input ‘~’
 Prelude> :k (~)
 (~) :: k -> k -> Constraint
 Prelude> :i (+)   -- for comparison
 class Num a where
   (+) :: a -> a -> a
   ...
         -- Defined in ‘GHC.Num’
 infixl 6 +
 }}}

 Now that type operators do not need to start with a colon, this magic
 seems unnecessary. The `(~)` syntax does not need to be wired-in, unless
 I'm missing something. (The ''definition'' of `(~)` needs to be wired in
 -- it's just the syntax that doesn't need to be.)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9194>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list