[GHC] #10156: Unable to coerce with flipped Coercible context
GHC
ghc-devs at haskell.org
Sat Mar 14 03:58:11 UTC 2015
#10156: Unable to coerce with flipped Coercible context
-------------------------------------+-------------------------------------
Reporter: ekmett | Owner:
Type: feature request | Status: infoneeded
Priority: normal | Milestone:
Component: Compiler (Type | Version: 7.10.1-rc2
checker) | Keywords:
Resolution: | Architecture:
Operating System: Unknown/Multiple | Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by goldfire):
The following module compiles with 7.10 RC2 on my machine:
{{{
module T10156 where
import Data.Coerce
data Iso a b = Iso (a -> b) (b -> a)
coerceIso :: Coercible a b => Iso a b
coerceIso = Iso coerce coerce
}}}
This looks like what you want.
Is there something I'm missing here?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10156#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list