GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:04:25Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/3323panic: funArgTy2019-07-07T19:04:25ZSimon Marlowpanic: funArgTyThe following module crashes GHC 6.11.20090615:
```
module V where
import GHC.IO.Handle.Types
import GHC.IO.Handle.Internals
f :: Handle -> IO ()
f hdl = withHandle_ "" hdl $ \h -> return h{haDevice=undefined}
```
results:
```
$ ghc...The following module crashes GHC 6.11.20090615:
```
module V where
import GHC.IO.Handle.Types
import GHC.IO.Handle.Internals
f :: Handle -> IO ()
f hdl = withHandle_ "" hdl $ \h -> return h{haDevice=undefined}
```
results:
```
$ ghc-testing2 --make V.hs
[1 of 1] Compiling V ( V.hs, V.o )
ghc-stage2: panic! (the 'impossible' happened)
(GHC version 6.11.20090615 for x86_64-unknown-linux):
funArgTy ghc-prim:GHC.Unit.(){(w) tc 40}
```
It imports some internals of the IO library; I tried to reproduce it with a completely standalone module, but failed. The field `haDevice` of `Handle__` has existential type - normally GHC rejects a record update when the field has existential type, but does not in this case, I'm not sure why.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"panic: funArgTy","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.11","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following module crashes GHC 6.11.20090615:\r\n\r\n{{{\r\nmodule V where\r\n\r\nimport GHC.IO.Handle.Types\r\nimport GHC.IO.Handle.Internals\r\n\r\nf :: Handle -> IO ()\r\nf hdl = withHandle_ \"\" hdl $ \\h -> return h{haDevice=undefined}\r\n}}}\r\n\r\nresults:\r\n\r\n{{{\r\n$ ghc-testing2 --make V.hs\r\n[1 of 1] Compiling V ( V.hs, V.o )\r\nghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 6.11.20090615 for x86_64-unknown-linux):\r\n funArgTy ghc-prim:GHC.Unit.(){(w) tc 40}\r\n}}}\r\n\r\nIt imports some internals of the IO library; I tried to reproduce it with a completely standalone module, but failed. The field `haDevice` of `Handle__` has existential type - normally GHC rejects a record update when the field has existential type, but does not in this case, I'm not sure why.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon Peyton JonesSimon Peyton Joneshttps://gitlab.haskell.org/ghc/ghc/-/issues/3272GHC panics when contexts are put late in function types2019-07-07T19:04:39ZdmwitGHC panics when contexts are put late in function typesHere's a simple transcript from ghci:
```
Prelude> :m + Data.List
Prelude Data.List> :t genericLength :: [a] -> Num b => b
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.3 for x86_64-unknown-linux):
TcTyFuns.flattenType: u...Here's a simple transcript from ghci:
```
Prelude> :m + Data.List
Prelude Data.List> :t genericLength :: [a] -> Num b => b
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.3 for x86_64-unknown-linux):
TcTyFuns.flattenType: unexpected PredType
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.10.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC panics when contexts are put late in function types","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Here's a simple transcript from ghci:\r\n{{{\r\nPrelude> :m + Data.List\r\nPrelude Data.List> :t genericLength :: [a] -> Num b => b\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 6.10.3 for x86_64-unknown-linux):\r\n\tTcTyFuns.flattenType: unexpected PredType\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3220type variables appearing only in type equality constraints are not generalized2019-07-07T19:04:50Zguesttype variables appearing only in type equality constraints are not generalized```
{-# LANGUAGE TypeFamilies, ScopedTypeVariables#-}
class Foo m where
type Bar m :: *
action :: m -> Bar m -> m
right x m = action m (Right x)
right' :: (Either a b ~ Bar m, Foo m) => b -> m -> m
right' x m = action m (Right...```
{-# LANGUAGE TypeFamilies, ScopedTypeVariables#-}
class Foo m where
type Bar m :: *
action :: m -> Bar m -> m
right x m = action m (Right x)
right' :: (Either a b ~ Bar m, Foo m) => b -> m -> m
right' x m = action m (Right x)
instance Foo Int where
type Bar Int = Either Int Int
action m a = either (*) (+) a m
main = print $ right (1::Int) (3 :: Int)
```
with the above code i get:
```
*Main> :type right
right :: (Either Int b ~ Bar m, Foo m) => b -> m -> m
```
without the main definition i get instead:
```
*Main> :t right
right :: (Either GHC.Prim.Any b ~ Bar m, Foo m) => b -> m -> m
```
while i expect the correct type to be the one of right'.
It looks related to bug #1813
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | sanzhiyan@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"type variables appearing only in type equality constraints are not generalized","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["sanzhiyan@gmail.com"],"type":"Bug","description":"{{{\r\n{-# LANGUAGE TypeFamilies, ScopedTypeVariables#-}\r\n\r\nclass Foo m where\r\n type Bar m :: *\r\n action :: m -> Bar m -> m\r\n\r\nright x m = action m (Right x)\r\n\r\nright' :: (Either a b ~ Bar m, Foo m) => b -> m -> m\r\nright' x m = action m (Right x)\r\n\r\ninstance Foo Int where\r\n type Bar Int = Either Int Int\r\n action m a = either (*) (+) a m\r\n\r\nmain = print $ right (1::Int) (3 :: Int)\r\n}}}\r\nwith the above code i get:\r\n{{{\r\n*Main> :type right\r\n \r\nright :: (Either Int b ~ Bar m, Foo m) => b -> m -> m\r\n}}}\r\nwithout the main definition i get instead:\r\n{{{\r\n*Main> :t right\r\nright :: (Either GHC.Prim.Any b ~ Bar m, Foo m) => b -> m -> m\r\n}}}\r\n\r\nwhile i expect the correct type to be the one of right'.\r\nIt looks related to bug #1813\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3197disambiguating type family instances with qualified names not possible2019-07-07T19:04:56Zclaus.reinke@talk21.comdisambiguating type family instances with qualified names not possibleWhile reading [1](http://www.haskell.org/pipermail/haskell-cafe/2009-April/060665.html), it occured to me that type families could be used to parameterize modules by types. So I modified my example from [2](http://www.haskell.org/piperma...While reading [1](http://www.haskell.org/pipermail/haskell-cafe/2009-April/060665.html), it occured to me that type families could be used to parameterize modules by types. So I modified my example from [2](http://www.haskell.org/pipermail/haskell-cafe/2009-April/060324.html), trying to parameterize two modules `A` and `B` with a shared type `Label` (sharing expressed in `C)`, but ran into a few issues:
```
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE EmptyDataDecls #-}
module LA where
data MyLabel
y = undefined::MyLabel
type family Label a
z = undefined::Label ()
```
```
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE EmptyDataDecls #-}
module LB where
data MyLabel
y = undefined::MyLabel
type family Label a
z = undefined::Label ()
```
```
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
module LC where
import LA
import LB
-- fails = [LA.y,LB.y]
-- express type sharing while leaving actual type open
type family Label a
type instance LA.Label a = LC.Label a
type instance LB.Label a = LC.Label a
ok2 = [LA.z,LB.z]
-- for testing only
-- type instance Label a = () -- can't use with or without qualifier:-(
```
Issues:
- is it really necessary for type families to have at least one index? Without that, type constants could be expressed directly
- uncommenting that last line demonstrates a couple of bugs:
- as it stands, the type instance is ambiguous, but the error message has an incorrect source location (`1:0`)
- trying to disambiguate by defining `type instance LC.Label` results in : "Qualified name in binding position: LC.Label" (note that this is permitted a couple of lines up, so it is related to whether the qualifier refers to the current module or an imported one)
\[the bug is not really in the type checker, but specific to type families..\]
Bug aside, it works (`length ok2` gives two, not an error, as `fail` would).
This could be a useful type family programming pattern (it is probably implicit in the comparisons of SML functors vs Haskell type classes/families, I just don't recall it being made so explicit before, just focussing on type parameterization and sharing)!-)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.11 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"disambiguating type family instances with qualified names not possible","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.11","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"While reading [http://www.haskell.org/pipermail/haskell-cafe/2009-April/060665.html 1], it occured to me that type families could be used to parameterize modules by types. So I modified my example from [http://www.haskell.org/pipermail/haskell-cafe/2009-April/060324.html 2], trying to parameterize two modules `A` and `B` with a shared type `Label` (sharing expressed in `C)`, but ran into a few issues:\r\n{{{\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE EmptyDataDecls #-}\r\nmodule LA where \r\ndata MyLabel\r\ny = undefined::MyLabel\r\n\r\ntype family Label a\r\nz = undefined::Label ()\r\n}}}\r\n{{{\r\n{-# LANGUAGE TypeFamilies #-}\r\n{-# LANGUAGE EmptyDataDecls #-}\r\nmodule LB where \r\ndata MyLabel\r\ny = undefined::MyLabel\r\n\r\ntype family Label a\r\nz = undefined::Label ()\r\n}}}\r\n{{{\r\n{-# LANGUAGE UndecidableInstances #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\nmodule LC where\r\nimport LA\r\nimport LB\r\n\r\n-- fails = [LA.y,LB.y]\r\n\r\n-- express type sharing while leaving actual type open\r\ntype family Label a\r\ntype instance LA.Label a = LC.Label a\r\ntype instance LB.Label a = LC.Label a\r\nok2 = [LA.z,LB.z]\r\n\r\n-- for testing only\r\n-- type instance Label a = () -- can't use with or without qualifier:-(\r\n}}}\r\nIssues:\r\n - is it really necessary for type families to have at least one index? Without that, type constants could be expressed directly\r\n\r\n - uncommenting that last line demonstrates a couple of bugs: \r\n\r\n * as it stands, the type instance is ambiguous, but the error message has an incorrect source location (`1:0`)\r\n\r\n * trying to disambiguate by defining `type instance LC.Label` results in : \"Qualified name in binding position: LC.Label\" (note that this is permitted a couple of lines up, so it is related to whether the qualifier refers to the current module or an imported one)\r\n\r\n[the bug is not really in the type checker, but specific to type families..]\r\n\r\nBug aside, it works (`length ok2` gives two, not an error, as `fail` would). \r\n\r\nThis could be a useful type family programming pattern (it is probably implicit in the comparisons of SML functors vs Haskell type classes/families, I just don't recall it being made so explicit before, just focussing on type parameterization and sharing)!-)","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3163GADTs should not allow polymorphism in return type2019-07-07T19:05:04ZScott TurnerGADTs should not allow polymorphism in return type```
{-# LANGUAGE GADTs, RankNTypes, ImpredicativeTypes #-}
module Report (eval) where
data Taker a where
Unreached :: Taker (forall s. s)
eval :: a -> Taker a -> (forall t. t)
eval x c = case c of
Unreached -> x
```
I wanted t...```
{-# LANGUAGE GADTs, RankNTypes, ImpredicativeTypes #-}
module Report (eval) where
data Taker a where
Unreached :: Taker (forall s. s)
eval :: a -> Taker a -> (forall t. t)
eval x c = case c of
Unreached -> x
```
I wanted the quantified types to match and the code to get past the type-checker, as it would if the forall type annotations were replaced with any ordinary type. However, ghc reported:
```
Couldn't match expected type `t'
against inferred type `forall s. s'
`t' is a rigid type variable bound by
the type signature for `eval' at ghc_report.hs:7:32
In the expression: x
In a case alternative: Unreached -> x
In the expression: case c of { Unreached -> x }
```
I was unable to get around this problem by adding type annotations. However, I did get around it by using a similar type
```
data Z = Z (forall t.t)
```
instead of the bare forall type.
----
```
(yawl:~/programs/cat_type) scott% ghc -v -dcore-lint ghc_report.hs
Glasgow Haskell Compiler, Version 6.10.1, for Haskell 98, stage 2 booted by GHC version 6.10.1
Using package config file: /usr/lib/ghc-6.10.1/./package.conf
hiding package base-3.0.3.0 to avoid conflict with later version base-4.0.0.0
hiding package filepath-1.1.0.1 to avoid conflict with later version filepath-1.1.0.2
hiding package Cabal-1.6.0.1 to avoid conflict with later version Cabal-1.6.0.2
hiding package QuickCheck-1.2.0.0 to avoid conflict with later version QuickCheck-2.1.0.1
hiding package parsec-2.1.0.1 to avoid conflict with later version parsec-3.0.0
wired-in package ghc-prim mapped to ghc-prim-0.1.0.0
wired-in package integer mapped to integer-0.1.0.0
wired-in package base mapped to base-4.0.0.0
wired-in package rts mapped to rts-1.0
wired-in package haskell98 mapped to haskell98-1.0.1.0
wired-in package syb mapped to syb-0.1.0.0
wired-in package template-haskell mapped to template-haskell-2.3.0.0
wired-in package dph-seq[""] not found.
wired-in package dph-par[""] not found.
Hsc static flags: -static
Created temporary directory: /tmp/ghc26608_0
*** Checking old interface for main:Report:
*** Parser:
*** Renamer/typechecker:
ghc_report.hs:9:17:
Couldn't match expected type `t'
against inferred type `forall s. s'
`t' is a rigid type variable bound by
the type signature for `eval' at ghc_report.hs:7:32
In the expression: x
In a case alternative: Unreached -> x
In the expression: case c of { Unreached -> x }
*** Deleting temp files:
Deleting: /tmp/ghc26608_0/ghc26608_0.s
Warning: deleting non-existent /tmp/ghc26608_0/ghc26608_0.s
*** Deleting temp dirs:
Deleting: /tmp/ghc26608_0
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"quantified types fail to match in GADT case","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\n{-# LANGUAGE GADTs, RankNTypes, ImpredicativeTypes #-}\r\n\r\nmodule Report (eval) where\r\n\r\ndata Taker a where\r\n Unreached :: Taker (forall s. s)\r\neval :: a -> Taker a -> (forall t. t)\r\neval x c = case c of\r\n Unreached -> x\r\n}}}\r\nI wanted the quantified types to match and the code to get past the type-checker, as it would if the forall type annotations were replaced with any ordinary type. However, ghc reported:\r\n{{{\r\n Couldn't match expected type `t'\r\n against inferred type `forall s. s'\r\n `t' is a rigid type variable bound by\r\n the type signature for `eval' at ghc_report.hs:7:32\r\n In the expression: x\r\n In a case alternative: Unreached -> x\r\n In the expression: case c of { Unreached -> x }\r\n}}}\r\nI was unable to get around this problem by adding type annotations. However, I did get around it by using a similar type\r\n\r\n{{{\r\ndata Z = Z (forall t.t)\r\n}}}\r\ninstead of the bare forall type.\r\n\r\n----\r\n\r\n{{{\r\n(yawl:~/programs/cat_type) scott% ghc -v -dcore-lint ghc_report.hs\r\nGlasgow Haskell Compiler, Version 6.10.1, for Haskell 98, stage 2 booted by GHC version 6.10.1\r\nUsing package config file: /usr/lib/ghc-6.10.1/./package.conf\r\nhiding package base-3.0.3.0 to avoid conflict with later version base-4.0.0.0\r\nhiding package filepath-1.1.0.1 to avoid conflict with later version filepath-1.1.0.2\r\nhiding package Cabal-1.6.0.1 to avoid conflict with later version Cabal-1.6.0.2\r\nhiding package QuickCheck-1.2.0.0 to avoid conflict with later version QuickCheck-2.1.0.1\r\nhiding package parsec-2.1.0.1 to avoid conflict with later version parsec-3.0.0\r\nwired-in package ghc-prim mapped to ghc-prim-0.1.0.0\r\nwired-in package integer mapped to integer-0.1.0.0\r\nwired-in package base mapped to base-4.0.0.0\r\nwired-in package rts mapped to rts-1.0\r\nwired-in package haskell98 mapped to haskell98-1.0.1.0\r\nwired-in package syb mapped to syb-0.1.0.0\r\nwired-in package template-haskell mapped to template-haskell-2.3.0.0\r\nwired-in package dph-seq[\"\"] not found.\r\nwired-in package dph-par[\"\"] not found.\r\nHsc static flags: -static\r\nCreated temporary directory: /tmp/ghc26608_0\r\n*** Checking old interface for main:Report:\r\n*** Parser:\r\n*** Renamer/typechecker:\r\n\r\nghc_report.hs:9:17:\r\n Couldn't match expected type `t'\r\n against inferred type `forall s. s'\r\n `t' is a rigid type variable bound by\r\n the type signature for `eval' at ghc_report.hs:7:32\r\n In the expression: x\r\n In a case alternative: Unreached -> x\r\n In the expression: case c of { Unreached -> x }\r\n*** Deleting temp files:\r\nDeleting: /tmp/ghc26608_0/ghc26608_0.s\r\nWarning: deleting non-existent /tmp/ghc26608_0/ghc26608_0.s\r\n*** Deleting temp dirs:\r\nDeleting: /tmp/ghc26608_0\r\n\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon Peyton JonesSimon Peyton Joneshttps://gitlab.haskell.org/ghc/ghc/-/issues/3102The impossible happened with implicit parameters2019-07-07T19:05:23ZAshley YakeleyThe impossible happened with implicit parameters```
{-# OPTIONS -XImplicitParams -XRankNTypes #-}
module Bug where
t :: forall a. ((?p :: Int) => a) -> String
t _ = "Hello"
f :: (forall a. a -> String) -> Int
f _ = 3
result :: Int
result = f t
```
```
$ ghc -c Bug.hs
ghc: panic! (...```
{-# OPTIONS -XImplicitParams -XRankNTypes #-}
module Bug where
t :: forall a. ((?p :: Int) => a) -> String
t _ = "Hello"
f :: (forall a. a -> String) -> Int
f _ = 3
result :: Int
result = f t
```
```
$ ghc -c Bug.hs
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.1 for x86_64-unknown-linux):
TcTyFuns.flattenType: unexpected PredType
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"The impossible happened with implicit parameters","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\n{-# OPTIONS -XImplicitParams -XRankNTypes #-}\r\nmodule Bug where\r\n\r\nt :: forall a. ((?p :: Int) => a) -> String\r\nt _ = \"Hello\"\r\n\r\nf :: (forall a. a -> String) -> Int\r\nf _ = 3\r\n\r\nresult :: Int\r\nresult = f t\r\n}}}\r\n\r\n{{{\r\n$ ghc -c Bug.hs\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 6.10.1 for x86_64-unknown-linux):\r\n\tTcTyFuns.flattenType: unexpected PredType\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/2658Extreme memory usage (probably type functions)2019-07-07T19:07:28ZguestExtreme memory usage (probably type functions)This is with the ghc 6.10.1 rc:
http://darcs.haskell.org/ghc-STABLE-2008-09-19-ghc-corelibs-testsuite.tar.bz2, unpacked, then ./darcs-all --extra get and ./darcs-all pull -a
Then a perf build.
Then, wget http://hackage.haskell.org/pac...This is with the ghc 6.10.1 rc:
http://darcs.haskell.org/ghc-STABLE-2008-09-19-ghc-corelibs-testsuite.tar.bz2, unpacked, then ./darcs-all --extra get and ./darcs-all pull -a
Then a perf build.
Then, wget http://hackage.haskell.org/packages/archive/sessions/2008.7.18/sessions-2008.7.18.tar.gz, unpack and cd sessions-2008.7.18
ghci-6.8.3 Tests/Tests.hs. This takes 40 seconds to get to the prompt and uses about 700MB memory.
ghci-6.10.0.20081004 Tests/Tests.hs. This has not finished type checking yet (well over 5 mins now - it exhaused my 4GB RAM and is now eating its way through 16GB of swap). top reports it's currently using about 5GB memory.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.9 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Extreme memory usage","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.9","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This is with the ghc 6.10.1 rc:\r\n\r\nhttp://darcs.haskell.org/ghc-STABLE-2008-09-19-ghc-corelibs-testsuite.tar.bz2, unpacked, then ./darcs-all --extra get and ./darcs-all pull -a\r\n\r\nThen a perf build.\r\n\r\nThen, wget http://hackage.haskell.org/packages/archive/sessions/2008.7.18/sessions-2008.7.18.tar.gz, unpack and cd sessions-2008.7.18\r\n\r\nghci-6.8.3 Tests/Tests.hs. This takes 40 seconds to get to the prompt and uses about 700MB memory.\r\n\r\nghci-6.10.0.20081004 Tests/Tests.hs. This has not finished type checking yet (well over 5 mins now - it exhaused my 4GB RAM and is now eating its way through 16GB of swap). top reports it's currently using about 5GB memory.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Manuel M T ChakravartyManuel M T Chakravarty