[GHC] #11333: GHCi does not discharge satisfied constraints

GHC ghc-devs at haskell.org
Fri Jan 1 20:13:37 UTC 2016


#11333: GHCi does not discharge satisfied constraints
----------------------------------------+--------------------------
           Reporter:  Iceland_jack      |             Owner:
               Type:  bug               |            Status:  new
           Priority:  normal            |         Milestone:
          Component:  Compiler          |           Version:  8.1
           Keywords:                    |  Operating System:  Linux
       Architecture:  Unknown/Multiple  |   Type of failure:  Other
          Test Case:                    |        Blocked By:
           Blocking:                    |   Related Tickets:
Differential Rev(s):                    |         Wiki Page:
----------------------------------------+--------------------------
 Don't know if this is the intended behaviour (GHCi, version 8.1.20151231),
 with the new extension TypeApplications.

 For the function [https://hackage.haskell.org/package/base-4.8.1.0/docs
 /Text-Show.html#v:show show]:

 {{{#!hs
 Prelude> :set -XTypeApplications
 Prelude> :t show
 show :: Show a => a -> String
 Prelude> :t show @Int
 show @Int :: Show Int => Int -> String
 }}}

 And the function [https://hackage.haskell.org/package/base/docs/Data-
 Typeable.html#v:eqT eqT] (`:: forall a b. (Typeable a, Typeable b) =>
 Maybe (a :~: b)`):

 {{{#!hs
 Prelude> :set -XTypeApplications
 Prelude> import Data.Typeable
 Prelude Data.Typeable> :t eqT
 eqT
   :: forall k1 (a :: k1) (b :: k1).
      (Typeable a, Typeable b) =>
      Maybe (a :~: b)
 Prelude Data.Typeable> :t eqT
 eqT
   :: forall k1 (a :: k1) (b :: k1).
      (Typeable a, Typeable b) =>
      Maybe (a :~: b)
 Prelude Data.Typeable> :t eqT @Int
 eqT @Int :: (Typeable Int, Typeable b) => Maybe (Int :~: b)
 }}}

 Should the types of `show @Int` and `eqT @Int` not be `Int -> String` and
 `(Typeable b) => Maybe (Int :~: b)` respectively?

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


More information about the ghc-tickets mailing list