
#14333: GHC doesn't use the fact that Coercible is symmetric -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.1 Resolution: | Keywords: TypeFamilies, | Roles Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Replying to [comment:2 goldfire]:
Do you have a concrete use case?
My use case is [https://github.com/Icelandjack/deriving- via/blob/master/examples/Generics.hs this] where `swap` is required to express symmetry. I use this to witness a coercion between `Rep a x` and `Rep b x` {{{#!hs sameRep :: SameRep a b :- (Rep a x `Coercible` Rep b x) }}} but I also need {{{#!hs SameRep a b :- (Rep b x `Coercible` Rep a x) }}} for which I use `swap` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14333#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler