[GHC] #8548: Coercible does not resolve type family application
#8548: Coercible does not resolve type family application -------------------------------------------+------------------------------- Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: #8503 | Test Case: | Blocking: -------------------------------------------+------------------------------- With GND implemented using `Coercible` (See #8503) the test for #4185 fails. A minimal example is: {{{ {-# LANGUAGE TypeFamilies #-} module CoerceNewtypeFamily where import GHC.Exts data family Foo k newtype instance Foo Int = FooInt Int x :: Foo Int -> Int x = coerce }}} yielding {{{ [1 of 1] Compiling CoerceNewtypeFamily ( CoerceNewtypeFamily.hs, CoerceNewtypeFamily.o ) CoerceNewtypeFamily.hs:11:5: No instance for (Coercible (Foo Int) Int) because ‛Foo Int’ and ‛Int’ are different types. arising from a use of ‛coerce’ In the expression: coerce In an equation for ‛x’: x = coerce }}} I guess the `Coercible` finding code needs to simply type family equations if possible. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Comment (by nomeata): (Also breaks the test case for #5955, #2856 and test case `DerivingNewType`) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Comment (by nomeata): (You can add #2850 to that list, it seems) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Comment (by nomeata): Fixed (not yet pushed), solves all listed tickets. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Comment (by Joachim Breitner <mail@…>): In [changeset:"335031f0cbc03a8d3ba893b0dabb71088665e748/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="335031f0cbc03a8d3ba893b0dabb71088665e748" Extend Coercible to newtype instances This fixes: #8548 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Comment (by Joachim Breitner <mail@…>): In [changeset:"8949a7cc453a7aec9bbcb752a07c140c2f15a619/testsuite"]: {{{ #!CommitTicketReference repository="testsuite" revision="8949a7cc453a7aec9bbcb752a07c140c2f15a619" Testcase for Coercible and newtype families (#8548) }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application --------------------------------------------+------------------------------ Reporter: nomeata | Owner: nomeata Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: 8503 | Blocked By: | Related Tickets: #8503 --------------------------------------------+------------------------------ Changes (by nomeata): * status: new => closed * resolution: => fixed Comment: This has hit master together with the changes for #8503, closing. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8548: Coercible does not resolve type family application -------------------------------------+------------------------------------- Reporter: nomeata | Owner: nomeata Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 (Type checker) | Keywords: Resolution: fixed | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: | Related Tickets: #8503 None/Unknown | Test Case: | typecheck/should_run/TcCoercible | Blocking: 8503 | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by goldfire): * testcase: => typecheck/should_run/TcCoercible -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8548#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC