
#9580: Possible excessive leniency in interaction between coerce and data families? -------------------------------------+------------------------------------- Reporter: dmcclean | Owner: simonpj Type: bug | Status: closed Priority: low | Milestone: Component: Compiler | Version: 7.8.3 (Type checker) | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: None/Unknown | Test Case: indexed- | types/should_fail/T9580 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by dmcclean): Thanks for fixing it! I just have one followup question. One reason the coercion shouldn't have worked is because the newtype constructor wasn't in scope. But, with the newtype constructor in scope, should it be coercible or not? I thought that it should still not be, because the data family's role signature has all nominal arguments. The newtype instance happens to use its argument in a representational way, but should that property of the definition be visible when "looking through" the data family? (It may be the case that one of your refactoring changes addresses this, I don't understand most of those comments.) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9580#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler