[GHC] #11407: -XTypeInType uses up all memory when used in data family instance

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler | Version: 8.1 (Type checker) | Keywords: TypeInType | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | performance bug Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Compiling this code with GHC 8.1 causes all my memory to be used very quickly: {{{#!hs {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} module TypeInTypeEatsAllMemory where import Data.Kind type Const a b = a data family UhOh (f :: k1) (a :: k2) (b :: k3) data instance UhOh (f :: * -> * -> *) (a :: forall a) (b :: Const * a) = UhOh }}} On the other hand, this code compiles without issue: {{{#!hs {-# LANGUAGE TypeInType #-} module TypeInTypeEatsAllMemory where import Data.Kind type Const a b = a data UhOh (f :: * -> * -> *) (a :: forall a) (b :: Const * a) = UhOh }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * version: 8.1 => 8.0.1-rc1 * milestone: => 8.0.1 Comment: Uh oh. Note that the version in question here is 8.0.1, not 8.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * priority: high => highest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Keywords: TypeInType, Resolution: | TypeFamilies Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * owner: => goldfire -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Keywords: TypeInType, Resolution: | TypeFamilies Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): Hmm, on `master` this merely results in a stack overflow, not that this is much of an improvement. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: goldfire
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler (Type | Version: 8.0.1-rc1
checker) | Keywords: TypeInType,
Resolution: | TypeFamilies
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Richard Eisenberg

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: merge Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Keywords: TypeInType, Resolution: | TypeFamilies Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: performance bug | dependent/should_fail/T11407 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * testcase: => dependent/should_fail/T11407 * status: new => merge -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11407: -XTypeInType uses up all memory when used in data family instance -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc1 checker) | Keywords: TypeInType, Resolution: fixed | TypeFamilies Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: performance bug | dependent/should_fail/T11407 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged as d23e9effcd23c9522e97eedc839c4ab819f4c1fb. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11407#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC