[GHC] #15209: ~# is always in scope with TypeOperators

GHC ghc-devs at haskell.org
Fri Jun 1 03:34:37 UTC 2018


#15209: ~# is always in scope with TypeOperators
-------------------------------------+-------------------------------------
           Reporter:  dfeuer         |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:  8.6.1
          Component:  Compiler       |           Version:  8.5
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  GHC accepts
  Unknown/Multiple                   |  invalid program
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 When `TypeOperators` is turned on, `~#` comes into scope automatically. As
 far as I know, this extremely magical operator really isn't supposed to be
 in Haskell at all, but if it is, it should surely be hidden in `GHC.Magic`
 or `GHC.Prim` or some such.


 {{{#!hs
 {-# LANGUAGE GADTs, TypeOperators #-}
 foo :: a ~# Int -> ()
 foo = () -- No arguments, because of a magical `Type`/`Constraint` swap or
 something.

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


More information about the ghc-tickets mailing list