[GHC] #15683: coerce fails for Coercible type families
GHC
ghc-devs at haskell.org
Thu Sep 27 22:09:06 UTC 2018
#15683: coerce fails for Coercible type families
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.6.1
Keywords: TypeFamilies | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I want to bring attention to this
[https://www.reddit.com/r/haskell/comments/9io4xw/coercing_type_families_when_type_instances_are/
reddit post] that boils down to
{{{#!hs
type family X a
type instance X Int = String
type instance X Bool = String
data T a = T (X a)
}}}
but not being able to coerce
{{{#!hs
coerce :: T Int -> T Bool
}}}
This gives the error “Couldn't match type ‘`Int`’ with ‘`Bool`’ arising
from a use of ‘`coerce`’”.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15683>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list