GHCi does not discharge satisfied constraints
Don't know if this is the intended behaviour (GHCi, version 8.1.20151231), with the new extension TypeApplications.
For the function show:
Prelude> :set -XTypeApplications
Prelude> :t show
show :: Show a => a -> String
Prelude> :t show @Int
show @Int :: Show Int => Int -> String
And the function eqT (:: forall a b. (Typeable a, Typeable b) => Maybe (a :~: b)
):
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?
Trac metadata
Trac field | Value |
---|---|
Version | 8.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |