[GHC] #11754: Error in optCoercion

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This program fails Lint after a run of the simplifier. {{{ {-# LANGUAGE TypeOperators, UndecidableSuperClasses, KindSignatures, TypeFamilies, FlexibleContexts #-} module T11728a where import Data.Kind import Data.Void newtype K a x = K a newtype I x = I x data (f + g) x = L (f x) | R (g x) data (f × g) x = f x :×: g x class Differentiable (D f) => Differentiable f where type D (f :: Type -> Type) :: Type -> Type instance Differentiable (K a) where type D (K a) = K Void instance Differentiable I where type D I = K () instance (Differentiable f₁, Differentiable f₂) => Differentiable (f₁ + f₂) where type D (f₁ + f₂) = D f₁ + D f₂ instance (Differentiable f₁, Differentiable f₂) => Differentiable (f₁ × f₂) where type D (f₁ × f₂) = (D f₁ × f₂) + (f₁ × D f₂) }}} Originally reported in #11728, but it's a totally different problem. Richard has nailed it already... patch coming from him. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => goldfire * priority: normal => highest * milestone: => 8.0.1 Comment: I'll make it "highest" to make sure we don't forget to merge this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * keywords: => TypeInType -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11754: Error in optCoercion
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner: goldfire
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 7.10.3
Resolution: | Keywords: TypeInType
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 Richard Eisenberg

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: goldfire Type: bug | Status: merge Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T11754 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * testcase: => typecheck/should_compile/T11754 * status: new => merge * version: 7.10.3 => 8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: goldfire Type: bug | Status: merge Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T11754 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * keywords: TypeInType => Comment: Nothing to do with `TypeInType`. I think this was present in 7.10, but maybe impossible to tickle. Anyway, it was clearly wrong before and certainly seems fixed now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11754: Error in optCoercion -------------------------------------+------------------------------------- Reporter: simonpj | Owner: goldfire Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_compile/T11754 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed @@ -2,1 +2,1 @@ - {{{ + {{{#!hs New description: This program fails Lint after a run of the simplifier. {{{#!hs {-# LANGUAGE TypeOperators, UndecidableSuperClasses, KindSignatures, TypeFamilies, FlexibleContexts #-} module T11728a where import Data.Kind import Data.Void newtype K a x = K a newtype I x = I x data (f + g) x = L (f x) | R (g x) data (f × g) x = f x :×: g x class Differentiable (D f) => Differentiable f where type D (f :: Type -> Type) :: Type -> Type instance Differentiable (K a) where type D (K a) = K Void instance Differentiable I where type D I = K () instance (Differentiable f₁, Differentiable f₂) => Differentiable (f₁ + f₂) where type D (f₁ + f₂) = D f₁ + D f₂ instance (Differentiable f₁, Differentiable f₂) => Differentiable (f₁ × f₂) where type D (f₁ × f₂) = (D f₁ × f₂) + (f₁ × D f₂) }}} Originally reported in #11728, but it's a totally different problem. Richard has nailed it already... patch coming from him. -- Comment: Merged to `ghc-8.0` as 91a8e92606890ca191ca7227b11a95c9c76cb428. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11754#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC