
#14607: Core Lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Keywords: TypeInType, | Operating System: Unknown/Multiple DeferredTypeErrors | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: #14605 #14584 Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This produces long {{{#!hs {-# Language DerivingStrategies #-} {-# Language GADTs #-} {-# Language GeneralizedNewtypeDeriving #-} {-# Language InstanceSigs #-} {-# Language KindSignatures #-} {-# Language TypeFamilies #-} {-# Language TypeInType #-} {-# Language TypeOperators #-} import Data.Kind data DEFUNC :: Type -> Type -> Type where (:~>) :: a -> b -> DEFUNC a b type a ~> b = DEFUNC a b -> Type data LamCons a :: Type ~> Type where LamCons :: a -> LamCons a ([a] :~> [a]) class Mk (app :: Type ~> Type) where type Arg app :: Type mk :: Arg app -> app (a :~> b) instance Mk (LamCons a :: Type ~> Type) where type Arg (LamCons a) = a mk :: a -> LamCons (a :~> b) mk = LamCons }}} erros with `ghci -ignore-dot-ghci -fdefer-type-errors -dcore-lint bug.hs` on GHC 8.2.1 and 8.3.20171208. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14607 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14607: Core Lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypeInType, | DeferredTypeErrors Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14605 #14584 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Description changed by Iceland_jack: Old description:
This produces long {{{#!hs {-# Language DerivingStrategies #-} {-# Language GADTs #-} {-# Language GeneralizedNewtypeDeriving #-} {-# Language InstanceSigs #-} {-# Language KindSignatures #-} {-# Language TypeFamilies #-} {-# Language TypeInType #-} {-# Language TypeOperators #-}
import Data.Kind
data DEFUNC :: Type -> Type -> Type where (:~>) :: a -> b -> DEFUNC a b
type a ~> b = DEFUNC a b -> Type
data LamCons a :: Type ~> Type where LamCons :: a -> LamCons a ([a] :~> [a])
class Mk (app :: Type ~> Type) where type Arg app :: Type
mk :: Arg app -> app (a :~> b)
instance Mk (LamCons a :: Type ~> Type) where type Arg (LamCons a) = a
mk :: a -> LamCons (a :~> b) mk = LamCons }}}
erros with `ghci -ignore-dot-ghci -fdefer-type-errors -dcore-lint bug.hs` on GHC 8.2.1 and 8.3.20171208.
New description: This produces a long Core lint error: {{{#!hs {-# Language DerivingStrategies #-} {-# Language GADTs #-} {-# Language GeneralizedNewtypeDeriving #-} {-# Language InstanceSigs #-} {-# Language KindSignatures #-} {-# Language TypeFamilies #-} {-# Language TypeInType #-} {-# Language TypeOperators #-} import Data.Kind data DEFUNC :: Type -> Type -> Type where (:~>) :: a -> b -> DEFUNC a b type a ~> b = DEFUNC a b -> Type data LamCons a :: Type ~> Type where LamCons :: a -> LamCons a ([a] :~> [a]) class Mk (app :: Type ~> Type) where type Arg app :: Type mk :: Arg app -> app (a :~> b) instance Mk (LamCons a :: Type ~> Type) where type Arg (LamCons a) = a mk :: a -> LamCons (a :~> b) mk = LamCons }}} with `ghci -ignore-dot-ghci -fdefer-type-errors -dcore-lint bug.hs` on GHC 8.2.1 and 8.3.20171208. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14607#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14607: Core Lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypeInType, | DeferredTypeErrors Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14605 #14584 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Iceland_jack): Simplified example {{{#!hs {-# Language GADTs #-} {-# Language GeneralizedNewtypeDeriving #-} {-# Language InstanceSigs #-} {-# Language KindSignatures #-} {-# Language TypeInType #-} import Data.Kind type Arr a b = (a, b) -> Type data LamCons a :: Arr Type Type where LamCons :: LamCons a '([a], [a]) class Mk (app :: Arr Type Type) where mk :: app '(a, b) instance Mk (LamCons a :: Arr Type Type) where mk :: LamCons '(a, b) mk = undefined }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14607#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14607: Core Lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: TypeInType, | DeferredTypeErrors Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #14605 #14584 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by monoidal): Small simplification: {{{ #!hs {-# Language GADTs #-} {-# Language InstanceSigs #-} {-# Language KindSignatures #-} {-# Language TypeFamilies #-} {-# Language DataKinds #-} {-# Language FlexibleInstances #-} import Data.Kind data LamCons :: Type -> Type -> () -> Type where C :: LamCons a a '() class Mk a where mk :: LamCons a a '() instance Mk a where mk :: LamCons a '() mk = mk }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14607#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#14607: Core Lint error
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords: TypeInType,
| DeferredTypeErrors
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #14605 #14584 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#14607: Core Lint error -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: fixed | Keywords: TypeInType, | DeferredTypeErrors Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | typecheck/should_fail/T14607 Blocked By: | Blocking: Related Tickets: #14605 #14584 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => typecheck/should_fail/T14607 * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14607#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC