GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T18:02:17Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/15958Missing documentation for '-fno-ghci-sandbox'2019-07-07T18:02:17ZGhost UserMissing documentation for '-fno-ghci-sandbox'The option '-fno-ghci-sandbox' is mentioned in https://downloads.haskell.org/\~ghc/7.0.2/docs/html/users_guide/release-7-0-1.html with the following explanation:
> There is a new -fno-ghci-sandbox flag, which stops GHCi running computat...The option '-fno-ghci-sandbox' is mentioned in https://downloads.haskell.org/\~ghc/7.0.2/docs/html/users_guide/release-7-0-1.html with the following explanation:
> There is a new -fno-ghci-sandbox flag, which stops GHCi running computations in a separate thread. In particular, this is useful for GLUT on OS X, which only works if being run on the main thread.
However, it doesn't seem to be documented on the GHC user's guide (search box didn't find anything).
Sorry if I just couldn't find it!
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Missing documentation for '-fno-ghci-sandbox'","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The option '-fno-ghci-sandbox' is mentioned in https://downloads.haskell.org/~ghc/7.0.2/docs/html/users_guide/release-7-0-1.html with the following explanation:\r\n\r\n There is a new -fno-ghci-sandbox flag, which stops GHCi running computations in a separate thread. In particular, this is useful for GLUT on OS X, which only works if being run on the main thread.\r\n\r\nHowever, it doesn't seem to be documented on the GHC user's guide (search box didn't find anything).\r\n\r\nSorry if I just couldn't find it!","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15959If a type signature is too long to read left-to-right then let it read top-to...2020-06-20T15:38:43ZPhil de JouxIf a type signature is too long to read left-to-right then let it read top-to-bottom.When pretty printing a type signature that is too long to show in one line, can we please break the lines on the top-level punctuation of the type signature, on `::`, `=>` and `->` as shown in the second listing below?
```
FlareTiming/T...When pretty printing a type signature that is too long to show in one line, can we please break the lines on the top-level punctuation of the type signature, on `::`, `=>` and `->` as shown in the second listing below?
```
FlareTiming/Task/Score.hs:186:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature:
showMax :: (Reflex t, Functor f) =>
(a -> b)
-> (f b -> b -> c) -> Dynamic t (f a) -> Dynamic t a -> Dynamic t c
|
186 | showMax getField f pt points =
| ^^^^^^^
```
```
FlareTiming/Task/Score.hs:186:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature:
showMax
:: (Reflex t, Functor f)
=> (a -> b)
-> (f b -> b -> c)
-> Dynamic t (f a)
-> Dynamic t a
-> Dynamic t c
|
186 | showMax getField f pt points =
| ^^^^^^^
```
If a type signature is too long to display in one line and read left-to-right then please let it read top-to-bottom.8.6.3Phil de JouxPhil de Jouxhttps://gitlab.haskell.org/ghc/ghc/-/issues/15966panic when using RebindableSyntax2023-06-05T10:38:31ZMatthew Pickeringpanic when using RebindableSyntaxhttps://gist.github.com/mpickering/216ecdd9d8766dce2ff1080a17f77a0e
```haskell
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-...https://gist.github.com/mpickering/216ecdd9d8766dce2ff1080a17f77a0e
```haskell
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE RebindableSyntax #-}
{-# OPTIONS_GHC -Wall -Wno-missing-signatures -Wno-unticked-promoted-constructors
-Wno-name-shadowing -fwarn-partial-type-signatures -Wno-partial-type-signatures #-}
module Repro(main) where
import Prelude hiding (Monad(..))
import Control.Applicative
data E (a :: * -> *) (n :: *) where
VarE :: a n -> E a n
instance IMonad E where
return :: a n -> E a n
return = VarE
(>>=) :: E a n -> (forall n . a n -> E b n) -> E b n
VarE x >>= f = f x
class IMonad (m :: (* -> *) -> (* -> *)) where
return :: forall a n . a n -> m a n
(>>=) :: m a n -> (forall n . a n -> m b n) -> m b n
one :: Const Int n
one = (Const 1)
example_4 :: E (Const Int) n
example_4 = do
x <- (return one)
return x
main = example_4 `seq` ()
```
Compiling this file with GHC leads to a StgCmmEnv panic.
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.2 for x86_64-unknown-linux):
StgCmmEnv: variable not found
$dIMonad_a1lY
local binds for:
return
>>=
$tc'VarE
$tcE
$tcIMonad
$trModule
$tc'VarE1_r1oI
$tc'VarE2_r1ps
$krep_r1pt
$krep1_r1pu
$krep2_r1pv
$krep3_r1pw
$krep4_r1px
$tcE1_r1py
$tcE2_r1pz
$tcIMonad1_r1pA
$tcIMonad2_r1pB
$krep5_r1pC
$krep6_r1pD
$krep7_r1pE
$trModule1_r1pF
$trModule2_r1pG
$trModule3_r1pH
$trModule4_r1pI
$krep8_r1pJ
$krep9_r1pK
sat_s1rG
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
pprPanic, called at compiler/codeGen/StgCmmEnv.hs:149:9 in ghc:StgCmmEnv
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
Loading the file into GHCi succeeds but then when the `main` function is invoked, a `nameModule` panic occurs.
```
*Repro> main
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.2 for x86_64-unknown-linux):
nameModule
system $dIMonad_a1LV
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
pprPanic, called at compiler/basicTypes/Name.hs:240:3 in ghc:Name
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
Reproduced on 8.6.{2,1} 8.4.4 8.2.2
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"panic when using RebindableSyntax","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"https://gist.github.com/mpickering/216ecdd9d8766dce2ff1080a17f77a0e\r\n\r\n{{{\r\n{-# LANGUAGE NoImplicitPrelude #-}\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE KindSignatures #-}\r\n{-# LANGUAGE RankNTypes #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE InstanceSigs #-}\r\n{-# LANGUAGE RebindableSyntax #-}\r\n\r\n{-# OPTIONS_GHC -Wall -Wno-missing-signatures -Wno-unticked-promoted-constructors\r\n -Wno-name-shadowing -fwarn-partial-type-signatures -Wno-partial-type-signatures #-}\r\nmodule Repro(main) where\r\n\r\nimport Prelude hiding (Monad(..))\r\nimport Control.Applicative\r\n\r\ndata E (a :: * -> *) (n :: *) where\r\n VarE :: a n -> E a n\r\n\r\ninstance IMonad E where\r\n return :: a n -> E a n\r\n return = VarE\r\n\r\n (>>=) :: E a n -> (forall n . a n -> E b n) -> E b n\r\n VarE x >>= f = f x\r\n\r\nclass IMonad (m :: (* -> *) -> (* -> *)) where\r\n return :: forall a n . a n -> m a n\r\n (>>=) :: m a n -> (forall n . a n -> m b n) -> m b n\r\n\r\none :: Const Int n\r\none = (Const 1)\r\n\r\nexample_4 :: E (Const Int) n\r\nexample_4 = do\r\n x <- (return one)\r\n return x\r\n\r\nmain = example_4 `seq` ()\r\n}}}\r\n\r\nCompiling this file with GHC leads to a StgCmmEnv panic.\r\n\r\n{{{\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.6.2 for x86_64-unknown-linux):\r\n\tStgCmmEnv: variable not found\r\n $dIMonad_a1lY\r\n local binds for:\r\n return\r\n >>=\r\n $tc'VarE\r\n $tcE\r\n $tcIMonad\r\n $trModule\r\n $tc'VarE1_r1oI\r\n $tc'VarE2_r1ps\r\n $krep_r1pt\r\n $krep1_r1pu\r\n $krep2_r1pv\r\n $krep3_r1pw\r\n $krep4_r1px\r\n $tcE1_r1py\r\n $tcE2_r1pz\r\n $tcIMonad1_r1pA\r\n $tcIMonad2_r1pB\r\n $krep5_r1pC\r\n $krep6_r1pD\r\n $krep7_r1pE\r\n $trModule1_r1pF\r\n $trModule2_r1pG\r\n $trModule3_r1pH\r\n $trModule4_r1pI\r\n $krep8_r1pJ\r\n $krep9_r1pK\r\n sat_s1rG\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable\r\n pprPanic, called at compiler/codeGen/StgCmmEnv.hs:149:9 in ghc:StgCmmEnv\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n\r\nLoading the file into GHCi succeeds but then when the `main` function is invoked, a `nameModule` panic occurs.\r\n\r\n{{{\r\n*Repro> main\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 8.6.2 for x86_64-unknown-linux):\r\n\tnameModule\r\n system $dIMonad_a1LV\r\n Call stack:\r\n CallStack (from HasCallStack):\r\n callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable\r\n pprPanic, called at compiler/basicTypes/Name.hs:240:3 in ghc:Name\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n\r\nReproduced on 8.6.{2,1} 8.4.4 8.2.2","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15973Int used to represent target integer literals2019-07-07T18:02:12ZBen GamariInt used to represent target integer literalsThere are numerous places within GHC where we use `Int` to represent a constant literal for the target. For instance, `CmmUtils` has the following:
```hs
-- XXX: should really be Integer, since Int doesn't necessarily cover
-- the full ...There are numerous places within GHC where we use `Int` to represent a constant literal for the target. For instance, `CmmUtils` has the following:
```hs
-- XXX: should really be Integer, since Int doesn't necessarily cover
-- the full range of target Ints.
mkIntCLit :: DynFlags -> Int -> CmmLit
mkIntCLit dflags i = CmmInt (toInteger i) (wordWidth dflags)
```
This could go very wrong when cross-compiling from a 32-bit machine to a 64-bit target.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Int used to represent target integer literals","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":["newcomer"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"There are numerous places within GHC where we use `Int` to represent a constant literal for the target. For instance, `CmmUtils` has the following:\r\n{{{#!hs\r\n-- XXX: should really be Integer, since Int doesn't necessarily cover\r\n-- the full range of target Ints.\r\nmkIntCLit :: DynFlags -> Int -> CmmLit\r\nmkIntCLit dflags i = CmmInt (toInteger i) (wordWidth dflags)\r\n}}}\r\nThis could go very wrong when cross-compiling from a 32-bit machine to a 64-bit target.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15977Restructure typechecking modules2019-07-07T18:02:11ZRichard Eisenbergrae@richarde.devRestructure typechecking modulesSome of the kind-checking and type-checking modules have become unruly.
Simon and I propose the new structure:
- KcTyClsDecls will handle kind-checking and generalization of datatype declarations. (That is, `kcTyClGroup` and children, ...Some of the kind-checking and type-checking modules have become unruly.
Simon and I propose the new structure:
- KcTyClsDecls will handle kind-checking and generalization of datatype declarations. (That is, `kcTyClGroup` and children, including related functions in TcHsType)
- TcInstBinds will handle `tcInstDecls2` and children
- TcTyConValidity will handle `checkValidTyCon` and children
- Fold the rest of TcInstDecls (essentially, `tcInstDecls1`) into what's left of TcTyClsDecls. TcInstDecls is removed.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Restructure typechecking modules","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"Some of the kind-checking and type-checking modules have become unruly.\r\n\r\nSimon and I propose the new structure:\r\n\r\n- KcTyClsDecls will handle kind-checking and generalization of datatype declarations. (That is, `kcTyClGroup` and children, including related functions in TcHsType)\r\n\r\n- TcInstBinds will handle `tcInstDecls2` and children\r\n\r\n- TcTyConValidity will handle `checkValidTyCon` and children\r\n\r\n- Fold the rest of TcInstDecls (essentially, `tcInstDecls1`) into what's left of TcTyClsDecls. TcInstDecls is removed.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15983Built-in support for half-floats2019-07-07T18:02:09ZLevent ErkökBuilt-in support for half-floatsHalf-floats (16-bit floating point values with 1-bit sign, 5-bits of exponent, and 10 bits of mantissa) are becoming more and more common in this new era of data-centric programming: Almost all GPUs have native support, and most CPU's ar...Half-floats (16-bit floating point values with 1-bit sign, 5-bits of exponent, and 10 bits of mantissa) are becoming more and more common in this new era of data-centric programming: Almost all GPUs have native support, and most CPU's are starting to support them natively in their instruction set.
It would be great if GHC can lead the way and have half-floats as a natively supported data-type as well, just like Float and Double.
I'm aware of Edward's http://hackage.haskell.org/package/half package; so that could be a starting point; though we'd eventually want GHC to generate native code. Note that LLVM does support half-floats, so a viable path can be using LLVM when available and software-FFI/implementation otherwise. Eventually the native code generator can add support as well.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Built-in support for half-floats","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Half-floats (16-bit floating point values with 1-bit sign, 5-bits of exponent, and 10 bits of mantissa) are becoming more and more common in this new era of data-centric programming: Almost all GPUs have native support, and most CPU's are starting to support them natively in their instruction set.\r\n\r\nIt would be great if GHC can lead the way and have half-floats as a natively supported data-type as well, just like Float and Double.\r\n\r\nI'm aware of Edward's http://hackage.haskell.org/package/half package; so that could be a starting point; though we'd eventually want GHC to generate native code. Note that LLVM does support half-floats, so a viable path can be using LLVM when available and software-FFI/implementation otherwise. Eventually the native code generator can add support as well.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15984Backpack accepts ill-kinded instantiations. Can cause GHC panic2019-07-07T18:02:09ZaaronvargoBackpack accepts ill-kinded instantiations. Can cause GHC panicGiven the following:
```hs
{-# language KindSignatures #-}
signature A where
data A :: *
```
```hs
module Foo where
import A
foo :: A -> A
foo = id
```
```hs
module IllKindedA where
type A = Maybe
```
GHC allows the signature `A`...Given the following:
```hs
{-# language KindSignatures #-}
signature A where
data A :: *
```
```hs
module Foo where
import A
foo :: A -> A
foo = id
```
```hs
module IllKindedA where
type A = Maybe
```
GHC allows the signature `A` to be instantiated with `IllKindedA`:
```
mixins: foo (Foo as Bug) requires (A as IllKindedA)
```
Using the resulting module can cause odd errors or a panic. E.g. the following causes a panic:
```hs
module Bar where
import Bug
bar = foo
```
```
ghc: panic! (the 'impossible' happened)
(GHC version 8.6.2 for x86_64-unknown-linux):
getRuntimeRep
A :: * -> *
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
pprPanic, called at compiler/types/Type.hs:2049:18 in ghc:Type
```8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15988Remove Text.Printf and System.Console.GetOpt from base2019-07-07T18:02:08ZAndrew MartinRemove Text.Printf and System.Console.GetOpt from baseThis was touched on in brief in a recent mailing list thread found at https://mail.haskell.org/pipermail/libraries/2018-October/029012.html. I propose removing `Text.Printf` and `System.Console.GetOpt` from `base` and moving them into th...This was touched on in brief in a recent mailing list thread found at https://mail.haskell.org/pipermail/libraries/2018-October/029012.html. I propose removing `Text.Printf` and `System.Console.GetOpt` from `base` and moving them into their own packages named `printf` and `getopt` that would be managed by the haskell github organization. These two libraries, when built against newer versions of base, would provide the modules. When built against old versions of base, they would simply reexport the modules. There would be breakage from doing this, but libraries and applications that use these APIs would only need to add a single line to `build-depends` to continue being compatible with all versions of `base`.
The benefits of doing this are small. As a matter of principle, it seems unfair that these two APIs are blessed by being a part of base when the would likely struggle to compete if they were in ordinary libraries. In particular, `printf` is less idiomatic and performs worse that the functions from `Numeric` (like `showFFloat`), but its prominent position in `base` encourages users to overlook the more type-safe options available for formatting numbers.
More practically, the size of base does occassionally cause problems. In https://github.com/haskell/primitive/issues/218\#issuecomment-443534850, Carter writes
> base getting bigger actually hurts folk, eg, base recently got big enough that dwarf data gnerated by ghc at -g1 is now sooo much that you can't do a dwarf annotated build of base on mac OS X! anymore
Moving these APIs out of `base` makes a small step toward addressing this problem.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Remove Text.Printf and System.Console.GetOpt from base","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"This was touched on in brief in a recent mailing list thread found at https://mail.haskell.org/pipermail/libraries/2018-October/029012.html. I propose removing `Text.Printf` and `System.Console.GetOpt` from `base` and moving them into their own packages named `printf` and `getopt` that would be managed by the haskell github organization. These two libraries, when built against newer versions of base, would provide the modules. When built against old versions of base, they would simply reexport the modules. There would be breakage from doing this, but libraries and applications that use these APIs would only need to add a single line to `build-depends` to continue being compatible with all versions of `base`.\r\n\r\nThe benefits of doing this are small. As a matter of principle, it seems unfair that these two APIs are blessed by being a part of base when the would likely struggle to compete if they were in ordinary libraries. In particular, `printf` is less idiomatic and performs worse that the functions from `Numeric` (like `showFFloat`), but its prominent position in `base` encourages users to overlook the more type-safe options available for formatting numbers.\r\n\r\nMore practically, the size of base does occassionally cause problems. In https://github.com/haskell/primitive/issues/218#issuecomment-443534850, Carter writes\r\n\r\n> base getting bigger actually hurts folk, eg, base recently got big enough that dwarf data gnerated by ghc at -g1 is now sooo much that you can't do a dwarf annotated build of base on mac OS X! anymore\r\n\r\nMoving these APIs out of `base` makes a small step toward addressing this problem.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15989Adding extra quantified constraints leads to resolution failure2019-07-07T18:02:08ZerorAdding extra quantified constraints leads to resolution failure```
{-# LANGUAGE QuantifiedConstraints, FlexibleContexts #-}
import Control.Monad.Reader
data T x = T
ok :: ( forall x x'. MonadReader (T x) (m x') )
=> m y Bool
ok = fmap not (pure True)
bad :: ( forall x x'. MonadReader (T x) (...```
{-# LANGUAGE QuantifiedConstraints, FlexibleContexts #-}
import Control.Monad.Reader
data T x = T
ok :: ( forall x x'. MonadReader (T x) (m x') )
=> m y Bool
ok = fmap not (pure True)
bad :: ( forall x x'. MonadReader (T x) (m x')
, forall x. Monad (m x) )
=> m y Bool
bad = fmap not (pure True)
better :: ( forall x x'. MonadReader (T x) (m x')
, forall x. Applicative (m x)
, forall x. Functor (m x) )
=> m y Bool
better = fmap not (pure True)
```
`ok` and `better` compile, but `bad` fails to resolve, despite having strictly more in the context than `ok`:
```
BadQC.hs:15:7: error:
• Could not deduce (Functor (m y)) arising from a use of ‘fmap’
from the context: (forall x x'. MonadReader (T x) (m x'),
forall x. Monad (m x))
bound by the type signature for:
bad :: forall (m :: * -> * -> *) y.
(forall x x'. MonadReader (T x) (m x'), forall x. Monad (m x)) =>
m y Bool
at BadQC.hs:(12,1)-(14,15)
• In the expression: fmap not (pure True)
In an equation for ‘bad’: bad = fmap not (pure True)
|
15 | bad = fmap not (pure True)
| ^^^^^^^^^^^^^^^^^^^^
BadQC.hs:15:17: error:
• Could not deduce (Applicative (m y)) arising from a use of ‘pure’
from the context: (forall x x'. MonadReader (T x) (m x'),
forall x. Monad (m x))
bound by the type signature for:
bad :: forall (m :: * -> * -> *) y.
(forall x x'. MonadReader (T x) (m x'), forall x. Monad (m x)) =>
m y Bool
at BadQC.hs:(12,1)-(14,15)
• In the second argument of ‘fmap’, namely ‘(pure True)’
In the expression: fmap not (pure True)
In an equation for ‘bad’: bad = fmap not (pure True)
|
15 | bad = fmap not (pure True)
| ^^^^^^^^^
Failed, no modules loaded.
```
Also:
- `( forall x. MonadReader (T x) (m x), forall x. Monad (m x) )` compiles — the error seems to require two quantified type variables
- `( forall x x'. Monad (m x), forall x. Monad (m x) )` reports an ambiguity error on the constraint, which makes sense; if I turn on `AllowAmbiguousTypes`, it fails with the same error as above — the error isn't caused by MPTCs, and it doesn't matter that `x'` is unused
- `( forall x x'. Foldable (m x), forall x. Monad (m x) )` and `( forall x x'. Monad (m x), forall x. Foldable (m x) )` compile — being in the same class hierarchy matters
- `( forall x x'. Applicative (m x), forall x. Monad (m x) )` fails on `fmap` (but not `pure`) — which is the superclass doesn't seem to matter8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15991Regression in error message when attempting to let bind an existentially quan...2020-07-30T10:51:20ZmmailhotRegression in error message when attempting to let bind an existentially quantified typeWhen attempting to compile the following (invalid) program:
```hs
{-# LANGUAGE ExistentialQuantification #-}
data Foo = forall a. Foo a
main :: IO ()
main =
let Foo x = Foo 1 in
return ()
```
GHC 8.6.2.0 (and 8.6.1.0, 8.4.1.0...When attempting to compile the following (invalid) program:
```hs
{-# LANGUAGE ExistentialQuantification #-}
data Foo = forall a. Foo a
main :: IO ()
main =
let Foo x = Foo 1 in
return ()
```
GHC 8.6.2.0 (and 8.6.1.0, 8.4.1.0) gives the following complicated error message
```
Test.hs:7:13: error:
• Couldn't match expected type ‘p’ with actual type ‘a’
because type variable ‘a’ would escape its scope
This (rigid, skolem) type variable is bound by
a pattern with constructor: Foo :: forall a. a -> Foo,
in a pattern binding
at Test.hs:7:9-13
• In the pattern: Foo x
In a pattern binding: Foo x = Foo 1
In the expression: let Foo x = Foo 1 in return ()
|
7 | let Foo x = Foo 1 in
|
```
GHC 7.10.1.2 gave a much more helpful and direct error message
```
Test.hs:7:9:
My brain just exploded
I can't handle pattern bindings for existential or GADT data constructors.
Instead, use a case-expression, or do-notation, to unpack the constructor.
In the pattern: Foo x
In a pattern binding: Foo x = Foo 1
In the expression: let Foo x = Foo 1 in return ()
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.4.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Regression in error message when attempting to let bind an existentially quantified type","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.4.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"When attempting to compile the following (invalid) program:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE ExistentialQuantification #-}\r\n\r\ndata Foo = forall a. Foo a\r\n\r\nmain :: IO ()\r\nmain =\r\n let Foo x = Foo 1 in\r\n return ()\r\n}}}\r\n\r\nGHC 8.6.2.0 (and 8.6.1.0, 8.4.1.0) gives the following complicated error message\r\n\r\n{{{\r\n\r\nTest.hs:7:13: error:\r\n • Couldn't match expected type ‘p’ with actual type ‘a’\r\n because type variable ‘a’ would escape its scope\r\n This (rigid, skolem) type variable is bound by\r\n a pattern with constructor: Foo :: forall a. a -> Foo,\r\n in a pattern binding\r\n at Test.hs:7:9-13\r\n • In the pattern: Foo x\r\n In a pattern binding: Foo x = Foo 1\r\n In the expression: let Foo x = Foo 1 in return ()\r\n |\r\n7 | let Foo x = Foo 1 in\r\n | \r\n}}}\r\n\r\nGHC 7.10.1.2 gave a much more helpful and direct error message\r\n\r\n{{{\r\nTest.hs:7:9:\r\n My brain just exploded\r\n I can't handle pattern bindings for existential or GADT data constructors.\r\n Instead, use a case-expression, or do-notation, to unpack the constructor.\r\n In the pattern: Foo x\r\n In a pattern binding: Foo x = Foo 1\r\n In the expression: let Foo x = Foo 1 in return ()\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15992Alternative instance for Data.Functor.Compose causes <<loop>>s with some types2019-07-07T18:02:07ZglaebhoerlAlternative instance for Data.Functor.Compose causes <<loop>>s with some types`many` and `some` are [omitted](http://hackage.haskell.org/package/base-4.12.0.0/docs/src/Data.Functor.Compose.html#line-119) and are filled in by their defaults from `Alternative`, instead of re-using the definitions provided for `f`; t...`many` and `some` are [omitted](http://hackage.haskell.org/package/base-4.12.0.0/docs/src/Data.Functor.Compose.html#line-119) and are filled in by their defaults from `Alternative`, instead of re-using the definitions provided for `f`; this manifests as infinite grammars being created in the case of the Earley parsing library, resulting in `<<loop>>` errors at runtime.
The fix is just to add:
```hs
many = Compose . fmap sequenceA . many . getCompose
some = Compose . fmap sequenceA . some . getCompose
```
Related twitter thread: https://twitter.com/ollfredo/status/1067498140100628480
(It seems like this bug has been around for some time: https://github.com/feuerbach/regex-applicative/issues/19)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Alternative instance for Data.Functor.Compose causes <<loop>>s with some types","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"`many` and `some` are [http://hackage.haskell.org/package/base-4.12.0.0/docs/src/Data.Functor.Compose.html#line-119 omitted] and are filled in by their defaults from `Alternative`, instead of re-using the definitions provided for `f`; this manifests as infinite grammars being created in the case of the Earley parsing library, resulting in `<<loop>>` errors at runtime.\r\n\r\nThe fix is just to add:\r\n\r\n{{{#!hs\r\n many = Compose . fmap sequenceA . many . getCompose\r\n some = Compose . fmap sequenceA . some . getCompose\r\n}}}\r\n\r\nRelated twitter thread: https://twitter.com/ollfredo/status/1067498140100628480\r\n\r\n(It seems like this bug has been around for some time: https://github.com/feuerbach/regex-applicative/issues/19)","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15996Add Unlifted List type to base2023-04-01T11:56:26ZchessaiAdd Unlifted List type to base```hs
data UList (a :: TYPE 'UnliftedRep) where
UNil :: UList a
UCons :: a -> UList a -> UList a
```
This would guarantee that values stored inside the list would not be thunks. It would likely live in something like GHC.List.Unlift...```hs
data UList (a :: TYPE 'UnliftedRep) where
UNil :: UList a
UCons :: a -> UList a -> UList a
```
This would guarantee that values stored inside the list would not be thunks. It would likely live in something like GHC.List.Unlifted, since it uses GHC-specific things.
An example of something it might improve is the implementation of Control.Concurrent.QSem.QSem:
```hs
data QSem = QSem !(MVar (Int, [MVar ()], [MVar ()]))
```
this could instead be:
```hs
type MVarIO = MVar# RealWorld -- type synonym for brevity
data QSem = QSem (MVarIO (Int, UList (MVarIO ()), UList (MVarIO ())))
```
Note that in this example the tuple inside the outermost `MVarIO` boxes the `Int` - this tuple could be represented as a datatype which ensures the unboxing on the `Int`.
The main idea here though is that now you can use `MVar#` inside of the `UList`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Add Unlifted List type to base","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"{{{#!hs\r\ndata UList (a :: TYPE 'UnliftedRep) where\r\n UNil :: UList a\r\n UCons :: a -> UList a -> UList a\r\n}}}\r\n\r\nThis would guarantee that values stored inside the list would not be thunks. It would likely live in something like GHC.List.Unlifted, since it uses GHC-specific things.\r\n\r\nAn example of something it might improve is the implementation of Control.Concurrent.QSem.QSem:\r\n\r\n{{{#!hs\r\ndata QSem = QSem !(MVar (Int, [MVar ()], [MVar ()]))\r\n}}}\r\n\r\nthis could instead be:\r\n\r\n{{{#!hs\r\ntype MVarIO = MVar# RealWorld -- type synonym for brevity\r\n\r\ndata QSem = QSem (MVarIO (Int, UList (MVarIO ()), UList (MVarIO ())))\r\n}}}\r\n\r\nNote that in this example the tuple inside the outermost `MVarIO` boxes the `Int` - this tuple could be represented as a datatype which ensures the unboxing on the `Int`.\r\n\r\nThe main idea here though is that now you can use `MVar#` inside of the `UList`.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15997EventManager could benefit from Data.Primitive.UnliftedArray2019-07-07T18:02:06ZchessaiEventManager could benefit from Data.Primitive.UnliftedArray```hs
-- | The event manager state.
data EventManager = EventManager
{ emBackend :: !Backend
, emFds :: {-# UNPACK #-} !(Array Int (MVar (IntTable [FdData])))
, emState :: {-# UNPACK #-} !(IORef State)
...```hs
-- | The event manager state.
data EventManager = EventManager
{ emBackend :: !Backend
, emFds :: {-# UNPACK #-} !(Array Int (MVar (IntTable [FdData])))
, emState :: {-# UNPACK #-} !(IORef State)
, emUniqueSource :: {-# UNPACK #-} !UniqueSource
, emControl :: {-# UNPACK #-} !Control
, emLock :: {-# UNPACK #-} !(MVar ())
}
```
the field in question is an `Array Int (MVar (IntTable [FdData]))`.
`EventManager` could instead be:
```hs
type MVarIO = MVar# RealWorld -- type synonym for brevity
-- | The event manager state.
data EventManager = EventManager
{ emBackend :: !Backend
, emFds :: {-# UNPACK #-} !(UnliftedArray (MVarIO (IntTable [FdData])))
, emState :: {-# UNPACK #-} !(IORef State)
, emUniqueSource :: {-# UNPACK #-} !UniqueSource
, emControl :: {-# UNPACK #-} !Control
, emLock :: {-# UNPACK #-} !(MVar ())
}
```
now the `UnliftedArray` contains non-thunks.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"EventManager could benefit from Data.Primitive.UnliftedArray","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"{{{#!hs\r\n-- | The event manager state.\r\ndata EventManager = EventManager\r\n { emBackend :: !Backend\r\n , emFds :: {-# UNPACK #-} !(Array Int (MVar (IntTable [FdData])))\r\n , emState :: {-# UNPACK #-} !(IORef State)\r\n , emUniqueSource :: {-# UNPACK #-} !UniqueSource\r\n , emControl :: {-# UNPACK #-} !Control\r\n , emLock :: {-# UNPACK #-} !(MVar ())\r\n }\r\n}}}\r\n\r\nthe field in question is an `Array Int (MVar (IntTable [FdData]))`.\r\n\r\n`EventManager` could instead be:\r\n\r\n{{{#!hs\r\n\r\ntype MVarIO = MVar# RealWorld -- type synonym for brevity\r\n\r\n-- | The event manager state.\r\ndata EventManager = EventManager\r\n { emBackend :: !Backend\r\n , emFds :: {-# UNPACK #-} !(UnliftedArray (MVarIO (IntTable [FdData])))\r\n , emState :: {-# UNPACK #-} !(IORef State)\r\n , emUniqueSource :: {-# UNPACK #-} !UniqueSource\r\n , emControl :: {-# UNPACK #-} !Control\r\n , emLock :: {-# UNPACK #-} !(MVar ())\r\n }\r\n}}}\r\n\r\nnow the `UnliftedArray` contains non-thunks.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/15998GHC.Event.Thread.eventManager has a lot of indirections2019-07-07T18:02:06ZchessaiGHC.Event.Thread.eventManager has a lot of indirectionsCurrent `eventManager`:
```hs
eventManager :: IORef (IOArray Int (Maybe (ThreadId, EventManager)))
eventManager = unsafePerformIO $ do
...
```
That's a lot of indirections just to grab your thread's event manager.
Consider the followi...Current `eventManager`:
```hs
eventManager :: IORef (IOArray Int (Maybe (ThreadId, EventManager)))
eventManager = unsafePerformIO $ do
...
```
That's a lot of indirections just to grab your thread's event manager.
Consider the following, which I believe would improve the performance of this:
```hs
data UnliftedIORef :: TYPE 'UnliftedRep -> Type where
UnliftedIORef :: MutVar# RealWorld a -> UnliftedIORef a
eventManager :: UnliftedIORef (MutableArray# RealWorld Things)
data Things = Things !ThreadId !EventManager
```
I think the Maybe can be eliminated. I'm unsure. What makes me think it can be is the following snippet:
```hs
getSystemEventManager :: IO (Maybe EventManager)
getSystemEventManager = do
t <- myThreadId
(cap, _) <- threadCapability t
eventManagerArray <- readIORef eventManager
mmgr <- readIOArray eventManagerArray cap
return $ fmap snd mmgr
getSystemEventManager_ :: IO EventManager
getSystemEventManager_ = do
Just mgr <- getSystemEventManager
return mgr
{-# INLINE getSystemEventManager_ #-}
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/base |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC.Event.Thread.eventManager has a lot of indirections","status":"New","operating_system":"","component":"libraries/base","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Current `eventManager`:\r\n\r\n{{{#!hs\r\neventManager :: IORef (IOArray Int (Maybe (ThreadId, EventManager)))\r\neventManager = unsafePerformIO $ do\r\n...\r\n}}}\r\n\r\nThat's a lot of indirections just to grab your thread's event manager.\r\n\r\nConsider the following, which I believe would improve the performance of this:\r\n\r\n{{{#!hs\r\ndata UnliftedIORef :: TYPE 'UnliftedRep -> Type where\r\n UnliftedIORef :: MutVar# RealWorld a -> UnliftedIORef a\r\n\r\neventManager :: UnliftedIORef (MutableArray# RealWorld Things)\r\n\r\ndata Things = Things !ThreadId !EventManager\r\n}}}\r\n\r\nI think the Maybe can be eliminated. I'm unsure. What makes me think it can be is the following snippet:\r\n\r\n{{{#!hs\r\ngetSystemEventManager :: IO (Maybe EventManager)\r\ngetSystemEventManager = do\r\n t <- myThreadId\r\n (cap, _) <- threadCapability t\r\n eventManagerArray <- readIORef eventManager\r\n mmgr <- readIOArray eventManagerArray cap\r\n return $ fmap snd mmgr\r\n\r\ngetSystemEventManager_ :: IO EventManager\r\ngetSystemEventManager_ = do\r\n Just mgr <- getSystemEventManager\r\n return mgr\r\n{-# INLINE getSystemEventManager_ #-}\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16004Vector performance regression in GHC 8.62019-07-07T18:02:04ZGuillaume BouchardVector performance regression in GHC 8.6Hello.
With the following code, I can observe a performance regression between ghc 8.4 and 8.6:
```haskell
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import qualified Data.Vector.Unboxed.Mutable as Vector
import qualified D...Hello.
With the following code, I can observe a performance regression between ghc 8.4 and 8.6:
```haskell
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import qualified Data.Vector.Unboxed.Mutable as Vector
import qualified Data.Vector.Unboxed as VectorU
import Data.Foldable (for_)
main :: IO ()
main = do
let n = 1000
let vUnmutable :: VectorU.Vector Double = VectorU.generate (n * n) (\i -> fromIntegral i)
v :: Vector.IOVector Double <- VectorU.unsafeThaw vUnmutable
for_ [0..(n - 1)] $ \k -> do
for_ [0..(n - 1)] $ \i -> do
for_ [0..(n - 1)] $ \j -> do
a <- Vector.unsafeRead v (i * n + k)
b <- Vector.unsafeRead v (k * n + j)
c <- Vector.unsafeRead v (i * n + j)
Vector.unsafeWrite v (i * n + j) (min (a + b) c)
```
Built with `-O2` and with / without `-fllvm`. I'm using `vector-0.12.0.1`. Here are the timing results:
GHC 8.2.2
> no llvm: 1.7s
> llvm: 1.0s
GHC 8.4.4
> no llvm: 1.6s
> llvm: 0.9s
GHC 8.6.2
> no llvm: 4.8s
> llvm: 4.3s
I'm using the following bash + nix script to gather theses timings:
```bash
nix-shell -p 'haskell.packages.ghc822.ghcWithPackages(p: [p.vector])' --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench"
nix-shell -p 'haskell.packages.ghc822.ghcWithPackages(p: [p.vector])' -p llvm_39 --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench"
nix-shell -p 'haskell.packages.ghc844.ghcWithPackages(p: [p.vector])' --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench"
nix-shell -p 'haskell.packages.ghc844.ghcWithPackages(p: [p.vector])' -p llvm_5 --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench"
nix-shell -p 'haskell.packages.ghc862.ghcWithPackages(p: [p.vector])' --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench"
nix-shell -p 'haskell.packages.ghc862.ghcWithPackages(p: [p.vector])' -p llvm_6 --run "ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench"
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Vector performance regression in GHC 8.6","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Hello.\r\n\r\nWith the following code, I can observe a performance regression between ghc 8.4 and 8.6:\r\n\r\n\r\n{{{#!haskell\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\nmodule Main where\r\nimport qualified Data.Vector.Unboxed.Mutable as Vector\r\nimport qualified Data.Vector.Unboxed as VectorU\r\n\r\nimport Data.Foldable (for_)\r\n\r\nmain :: IO ()\r\nmain = do\r\n let n = 1000\r\n\r\n let vUnmutable :: VectorU.Vector Double = VectorU.generate (n * n) (\\i -> fromIntegral i)\r\n v :: Vector.IOVector Double <- VectorU.unsafeThaw vUnmutable\r\n\r\n for_ [0..(n - 1)] $ \\k -> do\r\n for_ [0..(n - 1)] $ \\i -> do\r\n for_ [0..(n - 1)] $ \\j -> do\r\n a <- Vector.unsafeRead v (i * n + k)\r\n b <- Vector.unsafeRead v (k * n + j)\r\n c <- Vector.unsafeRead v (i * n + j)\r\n Vector.unsafeWrite v (i * n + j) (min (a + b) c)\r\n}}}\r\n\r\nBuilt with `-O2` and with / without `-fllvm`. I'm using `vector-0.12.0.1`. Here are the timing results:\r\n\r\nGHC 8.2.2\r\n no llvm: 1.7s\r\n llvm: 1.0s\r\nGHC 8.4.4\r\n no llvm: 1.6s\r\n llvm: 0.9s\r\nGHC 8.6.2\r\n no llvm: 4.8s\r\n llvm: 4.3s\r\n\r\nI'm using the following bash + nix script to gather theses timings:\r\n\r\n{{{#!bash\r\nnix-shell -p 'haskell.packages.ghc822.ghcWithPackages(p: [p.vector])' --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench\"\r\nnix-shell -p 'haskell.packages.ghc822.ghcWithPackages(p: [p.vector])' -p llvm_39 --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench\"\r\nnix-shell -p 'haskell.packages.ghc844.ghcWithPackages(p: [p.vector])' --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench\"\r\nnix-shell -p 'haskell.packages.ghc844.ghcWithPackages(p: [p.vector])' -p llvm_5 --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench\"\r\nnix-shell -p 'haskell.packages.ghc862.ghcWithPackages(p: [p.vector])' --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp; time ./FloydBench\"\r\nnix-shell -p 'haskell.packages.ghc862.ghcWithPackages(p: [p.vector])' -p llvm_6 --run \"ghc-pkg list | grep vector; ghc -O2 FloydBench.hs -Wall -fforce-recomp -fllvm; time ./FloydBench\"\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16011GHCi leaks memory even with -fno-it.2019-07-31T14:05:28ZAndreas KlebingerGHCi leaks memory even with -fno-it.GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.
The memory allocated by f never gets freed.
```
PS E:\binary-perf> ..\ghc-8.6.1\bin\ghci.exe -fno-it
GHCi, version 8.6.1: http://www.haskell.org/ghc/...GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.
The memory allocated by f never gets freed.
```
PS E:\binary-perf> ..\ghc-8.6.1\bin\ghci.exe -fno-it
GHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help
Prelude> f = [1 .. 20000000] :: [Int]
Prelude> length f
20000000
Prelude> f = [1 .. 20000001] :: [Int]
Prelude> length f
20000001
Prelude> f = [1 .. 20000002] :: [Int]
Prelude> length f
20000002
Prelude> f = [1 .. 20000000] :: [Int]
Prelude> length f
20000000
Prelude>
```
Or using head and even simpler:
```
PS E:\binary-perf> ..\ghc_commonAsm\inplace\bin\ghci.exe -fno-it
GHCi, version 8.7.20181207: http://www.haskell.org/ghc/ :? for help
Loaded package environment from E:\binary-perf\.ghc.environment.x86_64-mingw32-8.7.20181207
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
2000000
Prelude> f = replicate 2000000 False
Prelude> length f
```
GHC just keeps using more and more memory when I repeat this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHCi leaks memory even with -fno-it.","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"GHCi leaks are not exactly new, but this one is especially easy to trigger/reproduce.\r\n\r\nThe memory allocated by f never gets freed.\r\n{{{\r\nPS E:\\binary-perf> ..\\ghc-8.6.1\\bin\\ghci.exe -fno-it\r\nGHCi, version 8.6.1: http://www.haskell.org/ghc/ :? for help\r\nPrelude> f = [1 .. 20000000] :: [Int]\r\nPrelude> length f\r\n20000000\r\nPrelude> f = [1 .. 20000001] :: [Int]\r\nPrelude> length f\r\n20000001\r\nPrelude> f = [1 .. 20000002] :: [Int]\r\nPrelude> length f\r\n20000002\r\nPrelude> f = [1 .. 20000000] :: [Int]\r\nPrelude> length f\r\n20000000\r\nPrelude>\r\n}}}\r\n\r\nOr using head and even simpler:\r\n\r\n{{{\r\nPS E:\\binary-perf> ..\\ghc_commonAsm\\inplace\\bin\\ghci.exe -fno-it\r\nGHCi, version 8.7.20181207: http://www.haskell.org/ghc/ :? for help\r\nLoaded package environment from E:\\binary-perf\\.ghc.environment.x86_64-mingw32-8.7.20181207\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n2000000\r\nPrelude> f = replicate 2000000 False\r\nPrelude> length f\r\n}}}\r\n\r\nGHC just keeps using more and more memory when I repeat this.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3https://gitlab.haskell.org/ghc/ghc/-/issues/16017ghc-8.6.1 and ghc-8.6.2 use a lot of memory2019-08-27T08:57:19ZJohn Kyghc-8.6.1 and ghc-8.6.2 use a lot of memoryCurrently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.
The source code can be found here:
https://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd529...Currently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.
The source code can be found here:
https://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd5291ba689f9abf10e7fcd2
The problem module is here:
https://github.com/haskell-works/hw-json/blob/73368cee21dc72eedd5291ba689f9abf10e7fcd2/test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs
The build output follows:
```
cabal new-build --enable-tests --enable-benchmarks --project-file="cabal.project" -j${CABAL_THREADS:-4} all
Build profile: -w ghc-8.6.2 -O2
In order, the following will be built (use -v for more details):
- hw-json-0.9.0.1 (lib) (first run)
- hw-json-0.9.0.1 (test:hw-json-test) (first run)
- hw-json-0.9.0.1 (exe:hw-json) (first run)
- hw-json-0.9.0.1 (bench:bench) (first run)
Configuring library for hw-json-0.9.0.1..
Preprocessing library for hw-json-0.9.0.1..
Building library for hw-json-0.9.0.1..
[ 1 of 32] Compiling HaskellWorks.Data.Json.DecodeError ( src/HaskellWorks/Data/Json/DecodeError.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/DecodeError.o )
[ 2 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.MakeIndex ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.o )
[ 3 of 32] Compiling HaskellWorks.Data.Json.Internal.Index ( src/HaskellWorks/Data/Json/Internal/Index.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Index.o )
[ 4 of 32] Compiling HaskellWorks.Data.Json.Internal.PartialIndex ( src/HaskellWorks/Data/Json/Internal/PartialIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/PartialIndex.o )
[ 5 of 32] Compiling HaskellWorks.Data.Json.Internal.Token.Types ( src/HaskellWorks/Data/Json/Internal/Token/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token/Types.o )
[ 6 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Token.Tokenize ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.o )
[ 7 of 32] Compiling HaskellWorks.Data.Json.Internal.Token ( src/HaskellWorks/Data/Json/Internal/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token.o )
[ 8 of 32] Compiling HaskellWorks.Data.Json.Internal.Value ( src/HaskellWorks/Data/Json/Internal/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Value.o )
[ 9 of 32] Compiling HaskellWorks.Data.Json.Internal.Word8 ( src/HaskellWorks/Data/Json/Internal/Word8.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word8.o )
[10 of 32] Compiling HaskellWorks.Data.Json.Internal.Word64 ( src/HaskellWorks/Data/Json/Internal/Word64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word64.o )
[11 of 32] Compiling HaskellWorks.Data.Json.Internal.CharLike ( src/HaskellWorks/Data/Json/Internal/CharLike.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/CharLike.o )
[12 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Blank ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.o )
[13 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.BlankedJson ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.o )
[14 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToInterestBits64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.o )
[15 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToBalancedParens64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.o )
[16 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.IbBp ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.o )
[17 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.o )
[18 of 32] Compiling HaskellWorks.Data.Json.Backend.Simple.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.o )
[19 of 32] Compiling HaskellWorks.Data.Json.LightJson ( src/HaskellWorks/Data/Json/LightJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LightJson.o )
[20 of 32] Compiling HaskellWorks.Data.Json.PartialValue ( src/HaskellWorks/Data/Json/PartialValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/PartialValue.o )
[21 of 32] Compiling HaskellWorks.Data.Json.Type ( src/HaskellWorks/Data/Json/Type.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Type.o )
[22 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Cursor ( src/HaskellWorks/Data/Json/Backend/Standard/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Cursor.o )
[23 of 32] Compiling HaskellWorks.Data.Json.Cursor ( src/HaskellWorks/Data/Json/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Cursor.o )
[24 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Cursor.Token ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.o )
[25 of 32] Compiling HaskellWorks.Data.Json.Value ( src/HaskellWorks/Data/Json/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Value.o )
[26 of 32] Compiling HaskellWorks.Data.Json.FromValue ( src/HaskellWorks/Data/Json/FromValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/FromValue.o )
[27 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.LoadCursor ( src/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.o )
[28 of 32] Compiling HaskellWorks.Data.Json.LoadCursor ( src/HaskellWorks/Data/Json/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LoadCursor.o )
[29 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Load ( src/HaskellWorks/Data/Json/Backend/Standard/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Load.o )
[30 of 32] Compiling HaskellWorks.Data.Json.Load ( src/HaskellWorks/Data/Json/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Load.o )
[31 of 32] Compiling HaskellWorks.Data.Json ( src/HaskellWorks/Data/Json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json.o )
[32 of 32] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/Paths_hw_json.o )
Configuring test suite 'hw-json-test' for hw-json-0.9.0.1..
Configuring benchmark 'bench' for hw-json-0.9.0.1..
Configuring executable 'hw-json' for hw-json-0.9.0.1..
Preprocessing test suite 'hw-json-test' for hw-json-0.9.0.1..
Building test suite 'hw-json-test' for hw-json-0.9.0.1..
Preprocessing executable 'hw-json' for hw-json-0.9.0.1..
Preprocessing benchmark 'bench' for hw-json-0.9.0.1..
Building benchmark 'bench' for hw-json-0.9.0.1..
Building executable 'hw-json' for hw-json-0.9.0.1..
[ 1 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.Cursor.InterestBitsSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.o )
[1 of 2] Compiling Main ( bench/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Main.o )
[1 of 7] Compiling App.Commands.Types ( app/App/Commands/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Types.o )
[2 of 7] Compiling App.Lens ( app/App/Lens.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Lens.o )
[3 of 7] Compiling App.Commands.Demo ( app/App/Commands/Demo.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Demo.o )
[2 of 2] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Paths_hw_json.o )
Linking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench ...
[4 of 7] Compiling App.Commands.CreateIndex ( app/App/Commands/CreateIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/CreateIndex.o )
[5 of 7] Compiling App.Commands ( app/App/Commands.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands.o )
[ 2 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.CursorSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.o )
[6 of 7] Compiling Main ( app/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Main.o )
[7 of 7] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Paths_hw_json.o )
Linking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json ...
cabal: Failed to build test:hw-json-test from hw-json-0.9.0.1. The build
process was killed (i.e. SIGKILL). The typical reason for this is that there
is not enough memory available (e.g. the OS killed a process using lots of
memory).
Exited with code 1
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ghc-8.6.1 and ghc-8.6.2 use a log of memory","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Currently GHC uses a lot of memory to build a relatively small module and causes my CI to fail due to there being a 4G memory limit.\r\n\r\nThe source code can be found here:\r\n\r\nhttps://github.com/haskell-works/hw-json/tree/73368cee21dc72eedd5291ba689f9abf10e7fcd2\r\n\r\nThe problem module is here:\r\n\r\nhttps://github.com/haskell-works/hw-json/blob/73368cee21dc72eedd5291ba689f9abf10e7fcd2/test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs\r\n\r\nThe build output follows:\r\n\r\n{{{\r\ncabal new-build --enable-tests --enable-benchmarks --project-file=\"cabal.project\" -j${CABAL_THREADS:-4} all\r\nBuild profile: -w ghc-8.6.2 -O2\r\nIn order, the following will be built (use -v for more details):\r\n - hw-json-0.9.0.1 (lib) (first run)\r\n - hw-json-0.9.0.1 (test:hw-json-test) (first run)\r\n - hw-json-0.9.0.1 (exe:hw-json) (first run)\r\n - hw-json-0.9.0.1 (bench:bench) (first run)\r\nConfiguring library for hw-json-0.9.0.1..\r\nPreprocessing library for hw-json-0.9.0.1..\r\nBuilding library for hw-json-0.9.0.1..\r\n[ 1 of 32] Compiling HaskellWorks.Data.Json.DecodeError ( src/HaskellWorks/Data/Json/DecodeError.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/DecodeError.o )\r\n[ 2 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.MakeIndex ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/MakeIndex.o )\r\n[ 3 of 32] Compiling HaskellWorks.Data.Json.Internal.Index ( src/HaskellWorks/Data/Json/Internal/Index.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Index.o )\r\n[ 4 of 32] Compiling HaskellWorks.Data.Json.Internal.PartialIndex ( src/HaskellWorks/Data/Json/Internal/PartialIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/PartialIndex.o )\r\n[ 5 of 32] Compiling HaskellWorks.Data.Json.Internal.Token.Types ( src/HaskellWorks/Data/Json/Internal/Token/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token/Types.o )\r\n[ 6 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Token.Tokenize ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Token/Tokenize.o )\r\n[ 7 of 32] Compiling HaskellWorks.Data.Json.Internal.Token ( src/HaskellWorks/Data/Json/Internal/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Token.o )\r\n[ 8 of 32] Compiling HaskellWorks.Data.Json.Internal.Value ( src/HaskellWorks/Data/Json/Internal/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Value.o )\r\n[ 9 of 32] Compiling HaskellWorks.Data.Json.Internal.Word8 ( src/HaskellWorks/Data/Json/Internal/Word8.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word8.o )\r\n[10 of 32] Compiling HaskellWorks.Data.Json.Internal.Word64 ( src/HaskellWorks/Data/Json/Internal/Word64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Word64.o )\r\n[11 of 32] Compiling HaskellWorks.Data.Json.Internal.CharLike ( src/HaskellWorks/Data/Json/Internal/CharLike.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/CharLike.o )\r\n[12 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Blank ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Blank.o )\r\n[13 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.BlankedJson ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/BlankedJson.o )\r\n[14 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToInterestBits64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToInterestBits64.o )\r\n[15 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.ToBalancedParens64 ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/ToBalancedParens64.o )\r\n[16 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.IbBp ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/IbBp.o )\r\n[17 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/SemiIndex.o )\r\n[18 of 32] Compiling HaskellWorks.Data.Json.Backend.Simple.SemiIndex ( src/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Simple/SemiIndex.o )\r\n[19 of 32] Compiling HaskellWorks.Data.Json.LightJson ( src/HaskellWorks/Data/Json/LightJson.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LightJson.o )\r\n[20 of 32] Compiling HaskellWorks.Data.Json.PartialValue ( src/HaskellWorks/Data/Json/PartialValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/PartialValue.o )\r\n[21 of 32] Compiling HaskellWorks.Data.Json.Type ( src/HaskellWorks/Data/Json/Type.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Type.o )\r\n[22 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Cursor ( src/HaskellWorks/Data/Json/Backend/Standard/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Cursor.o )\r\n[23 of 32] Compiling HaskellWorks.Data.Json.Cursor ( src/HaskellWorks/Data/Json/Cursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Cursor.o )\r\n[24 of 32] Compiling HaskellWorks.Data.Json.Internal.Backend.Standard.Cursor.Token ( src/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Internal/Backend/Standard/Cursor/Token.o )\r\n[25 of 32] Compiling HaskellWorks.Data.Json.Value ( src/HaskellWorks/Data/Json/Value.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Value.o )\r\n[26 of 32] Compiling HaskellWorks.Data.Json.FromValue ( src/HaskellWorks/Data/Json/FromValue.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/FromValue.o )\r\n[27 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.LoadCursor ( src/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/LoadCursor.o )\r\n[28 of 32] Compiling HaskellWorks.Data.Json.LoadCursor ( src/HaskellWorks/Data/Json/LoadCursor.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/LoadCursor.o )\r\n[29 of 32] Compiling HaskellWorks.Data.Json.Backend.Standard.Load ( src/HaskellWorks/Data/Json/Backend/Standard/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Backend/Standard/Load.o )\r\n[30 of 32] Compiling HaskellWorks.Data.Json.Load ( src/HaskellWorks/Data/Json/Load.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json/Load.o )\r\n[31 of 32] Compiling HaskellWorks.Data.Json ( src/HaskellWorks/Data/Json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/HaskellWorks/Data/Json.o )\r\n[32 of 32] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/opt/build/Paths_hw_json.o )\r\nConfiguring test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nConfiguring benchmark 'bench' for hw-json-0.9.0.1..\r\nConfiguring executable 'hw-json' for hw-json-0.9.0.1..\r\nPreprocessing test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nBuilding test suite 'hw-json-test' for hw-json-0.9.0.1..\r\nPreprocessing executable 'hw-json' for hw-json-0.9.0.1..\r\nPreprocessing benchmark 'bench' for hw-json-0.9.0.1..\r\nBuilding benchmark 'bench' for hw-json-0.9.0.1..\r\nBuilding executable 'hw-json' for hw-json-0.9.0.1..\r\n[ 1 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.Cursor.InterestBitsSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/Cursor/InterestBitsSpec.o )\r\n[1 of 2] Compiling Main ( bench/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Main.o )\r\n[1 of 7] Compiling App.Commands.Types ( app/App/Commands/Types.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Types.o )\r\n[2 of 7] Compiling App.Lens ( app/App/Lens.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Lens.o )\r\n[3 of 7] Compiling App.Commands.Demo ( app/App/Commands/Demo.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/Demo.o )\r\n[2 of 2] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench-tmp/Paths_hw_json.o )\r\nLinking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/b/bench/opt/build/bench/bench ...\r\n[4 of 7] Compiling App.Commands.CreateIndex ( app/App/Commands/CreateIndex.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands/CreateIndex.o )\r\n[5 of 7] Compiling App.Commands ( app/App/Commands.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/App/Commands.o )\r\n[ 2 of 11] Compiling HaskellWorks.Data.Json.Backend.Standard.Succinct.CursorSpec ( test/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/t/hw-json-test/opt/build/hw-json-test/hw-json-test-tmp/HaskellWorks/Data/Json/Backend/Standard/Succinct/CursorSpec.o )\r\n[6 of 7] Compiling Main ( app/Main.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Main.o )\r\n[7 of 7] Compiling Paths_hw_json ( /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/autogen/Paths_hw_json.hs, /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json-tmp/Paths_hw_json.o )\r\nLinking /root/project/dist-newstyle/build/x86_64-linux/ghc-8.6.2/hw-json-0.9.0.1/x/hw-json/opt/build/hw-json/hw-json ...\r\ncabal: Failed to build test:hw-json-test from hw-json-0.9.0.1. The build\r\nprocess was killed (i.e. SIGKILL). The typical reason for this is that there\r\nis not enough memory available (e.g. the OS killed a process using lots of\r\nmemory).\r\n\r\nExited with code 1\r\n}}}\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3Alp MestanogullariAlp Mestanogullarihttps://gitlab.haskell.org/ghc/ghc/-/issues/16021Hadrian: remove/refactor package specific hacks2019-07-07T18:01:59ZdavideHadrian: remove/refactor package specific hacksHadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.
Hacks:
- libffi (#16020)
<details><summary>Trac metadata</summary>
| Trac field...Hadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.
Hacks:
- libffi (#16020)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian: remove/refactor package specific hacks","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Hadrian implements a number of package specific hacks (e.g. see #16020). Such hacks should be discussed in this ticket and ideally removed or refactored.\r\n\r\nHacks:\r\n* libffi (#16020)","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3David EichmannDavid Eichmannhttps://gitlab.haskell.org/ghc/ghc/-/issues/16027Cannot use DefaultSignatures for TypeFamiles2019-07-07T18:01:58ZJohn EricsonCannot use DefaultSignatures for TypeFamilesI'm surprised there wasn't a ticket for this. Maybe I just couldn't find it.
In short, I want to do something like:
```
class Monad m => MyMonad m where
type AssociatedMonad m :: Type -> Type
default type AssociatedMonad m :: (...I'm surprised there wasn't a ticket for this. Maybe I just couldn't find it.
In short, I want to do something like:
```
class Monad m => MyMonad m where
type AssociatedMonad m :: Type -> Type
default type AssociatedMonad m :: (m ~ t m', MonadTrans t, MyMonad m') => Type -> Type
type AssociatedMonad (t m') = t (AssociatedMonad m')
fun :: Foo -> m ()
default fun :: (m ~ t m', MonadTrans t, MyMonad m') => Foo -> m ()
fun = lift . fun
```
The syntax is a bit weird, but I hope in the process of implementing constrained type families the syntax properly analogous to the term-level would shake itself out.
The use-case, like the normal method original, is to assist with monad transformer boilerplate. `MonadTrans` wouldn't be enough, but `MFunctor` from mmorph might be depending on the method using the associated type.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Cannot use DefaultSignatures for TypeFamiles","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.6.3","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"I'm surprised there wasn't a ticket for this. Maybe I just couldn't find it.\r\n\r\nIn short, I want to do something like:\r\n{{{\r\nclass Monad m => MyMonad m where\r\n type AssociatedMonad m :: Type -> Type\r\n default type AssociatedMonad m :: (m ~ t m', MonadTrans t, MyMonad m') => Type -> Type\r\n type AssociatedMonad (t m') = t (AssociatedMonad m')\r\n\r\n fun :: Foo -> m ()\r\n default fun :: (m ~ t m', MonadTrans t, MyMonad m') => Foo -> m ()\r\n fun = lift . fun\r\n}}}\r\n\r\nThe syntax is a bit weird, but I hope in the process of implementing constrained type families the syntax properly analogous to the term-level would shake itself out.\r\n\r\nThe use-case, like the normal method original, is to assist with monad transformer boilerplate. {{{MonadTrans}}} wouldn't be enough, but {{{MFunctor}}} from mmorph might be depending on the method using the associated type.","type_of_failure":"OtherFailure","blocking":[]} -->8.6.3