[GHC] #10494: Representational equalities over AppTys are not hard failures
GHC
ghc-devs at haskell.org
Fri Jun 5 20:42:26 UTC 2015
#10494: Representational equalities over AppTys are not hard failures
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner: goldfire
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
If I say
{{{
module App where
import Data.Coerce
foo :: Coercible (a b) (c d) => a b -> c d
foo = undefined
}}}
I get
{{{
App.hs:5:8: error:
Couldn't match representation of type ‘a b’ with that of ‘c d’
Inaccessible code in
the type signature for: foo :: Coercible (a b) (c d) => a b -> c d
In the ambiguity check for the type signature for ‘foo’:
foo :: forall (a :: * -> *) b (c :: * -> *) d.
Coercible (a b) (c d) =>
a b -> c d
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘foo’:
foo :: Coercible (a b) (c d) => a b -> c d
}}}
This is very silly, indeed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10494>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list