GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2020-05-12T16:08:54Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/16256-fexternal-interpreter slow for profiling with template haskell2020-05-12T16:08:54ZGuillaume Bouchard-fexternal-interpreter slow for profiling with template haskellI'm trying to build the following program (in `Foo.hs`) with profiling enabled:
```haskell
{-# LANGUAGE TemplateHaskell #-}
main = print $([| 10 |])
```
With the "alternate object file suffix" method, I have correct build time:
```
$ ...I'm trying to build the following program (in `Foo.hs`) with profiling enabled:
```haskell
{-# LANGUAGE TemplateHaskell #-}
main = print $([| 10 |])
```
With the "alternate object file suffix" method, I have correct build time:
```
$ time ghc -prof -osuf o_p Foo.hs
[1 of 1] Compiling Main ( Foo.hs, Foo.o_p )
Linking Foo ...
real 0m1.698s
user 0m1.518s
sys 0m0.184s
```
However with `-fexternal-interpreter`, times are abysmally slow:
```
$ time ghc -prof -fexternal-interpreter -osuf "p_o" Foo.hs
[1 of 1] Compiling Main ( Foo.hs, Foo.p_o )
Linking Foo ...
real 0m26.077s
user 0m1.531s
sys 0m0.190s
```
I'm using `ghc-8.6.3` on nixos.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| 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":"-fexternal-interpreter slow for profiling with template haskell","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I'm trying to build the following program (in `Foo.hs`) with profiling enabled:\r\n\r\n{{{#!haskell\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmain = print $([| 10 |])\r\n}}}\r\n\r\nWith the \"alternate object file suffix\" method, I have correct build time:\r\n\r\n{{{\r\n$ time ghc -prof -osuf o_p Foo.hs\r\n[1 of 1] Compiling Main ( Foo.hs, Foo.o_p )\r\nLinking Foo ...\r\n\r\nreal\t0m1.698s\r\nuser\t0m1.518s\r\nsys\t0m0.184s\r\n}}}\r\n\r\nHowever with `-fexternal-interpreter`, times are abysmally slow:\r\n\r\n{{{\r\n$ time ghc -prof -fexternal-interpreter -osuf \"p_o\" Foo.hs\r\n[1 of 1] Compiling Main ( Foo.hs, Foo.p_o )\r\nLinking Foo ...\r\n\r\nreal\t0m26.077s\r\nuser\t0m1.531s\r\nsys\t0m0.190s\r\n}}}\r\n\r\nI'm using `ghc-8.6.3` on nixos.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16255Visible kind application defeats type family with higher-rank result kind2019-07-07T18:00:47ZRyan ScottVisible kind application defeats type family with higher-rank result kindAfter #15740, GHC now (correctly) rejects this program:
```hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module Bug where
import Dat...After #15740, GHC now (correctly) rejects this program:
```hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module Bug where
import Data.Kind
data SBool :: Bool -> Type
type family F :: forall k. k -> Type where
F = SBool
```
```
$ ~/Software/ghc5/inplace/bin/ghc-stage2 --interactive Bug.hs
GHCi, version 8.7.20190115: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 1] Compiling Bug ( Bug.hs, interpreted )
Bug.hs:12:7: error:
• Expected kind ‘forall k. k -> *’,
but ‘SBool’ has kind ‘Bool -> *’
• In the type ‘SBool’
In the type family declaration for ‘F’
|
12 | F = SBool
| ^^^^^
```
However, there's a very simple way to circumvent this: add a visible kind application to `F`'s equation.
```hs
type family F :: forall k. k -> Type where
F @Bool = SBool
```
If I understand things correctly, GHC shouldn't allow this.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.7 |
| 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":"Visible kind application defeats type family with higher-rank result kind","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":["TypeApplications,","TypeFamilies"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"After #15740, GHC now (correctly) rejects this program:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE PolyKinds #-}\r\n{-# LANGUAGE RankNTypes #-}\r\n{-# LANGUAGE TypeApplications #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\n\r\ndata SBool :: Bool -> Type\r\ntype family F :: forall k. k -> Type where\r\n F = SBool\r\n}}}\r\n{{{\r\n$ ~/Software/ghc5/inplace/bin/ghc-stage2 --interactive Bug.hs\r\nGHCi, version 8.7.20190115: https://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/rgscott/.ghci\r\n[1 of 1] Compiling Bug ( Bug.hs, interpreted )\r\n\r\nBug.hs:12:7: error:\r\n • Expected kind ‘forall k. k -> *’,\r\n but ‘SBool’ has kind ‘Bool -> *’\r\n • In the type ‘SBool’\r\n In the type family declaration for ‘F’\r\n |\r\n12 | F = SBool\r\n | ^^^^^\r\n}}}\r\n\r\nHowever, there's a very simple way to circumvent this: add a visible kind application to `F`'s equation.\r\n\r\n{{{#!hs\r\ntype family F :: forall k. k -> Type where\r\n F @Bool = SBool\r\n}}}\r\n\r\nIf I understand things correctly, GHC shouldn't allow this.","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1https://gitlab.haskell.org/ghc/ghc/-/issues/16254INLINABLE pragma and newtype wrappers prevent inlining2020-05-29T05:39:25ZKrzysztof GogolewskiINLINABLE pragma and newtype wrappers prevent inliningIn #5327, we allowed case-of-known constructor to see through bindings that were marked as INLINABLE and used newtypes. However, this works only if the newtype does not have a wrapper. The following code, which is the same as T5237 excep...In #5327, we allowed case-of-known constructor to see through bindings that were marked as INLINABLE and used newtypes. However, this works only if the newtype does not have a wrapper. The following code, which is the same as T5237 except for the extra type parameters in Size, does not cause the optimization to fire.
```
{-# LANGUAGE GADTs, ExplicitForAll #-}
module T16254 where
newtype Size a b where
Size :: forall b a. Int -> Size a b
{-# INLINABLE val2 #-}
val2 = Size 17
f n = case val2 of Size s -> s + s > n
```
The reason is that `exprIsConApp_maybe` sees `$WSize (I# 17#)`, which is an application with a nontrivial argument. In general, this could cause duplication of work, but in this case we're dealing with a newtype wrapper, so this is safe.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| 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":"INLINABLE pragma and newtype wrappers prevent inlining","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In #5327, we allowed case-of-known constructor to see through bindings that were marked as INLINABLE and used newtypes. However, this works only if the newtype does not have a wrapper. The following code, which is the same as T5237 except for the extra type parameters in Size, does not cause the optimization to fire.\r\n\r\n{{{\r\n{-# LANGUAGE GADTs, ExplicitForAll #-}\r\nmodule T16254 where\r\n\r\nnewtype Size a b where\r\n Size :: forall b a. Int -> Size a b\r\n\r\n{-# INLINABLE val2 #-}\r\nval2 = Size 17\r\n\r\nf n = case val2 of Size s -> s + s > n\r\n}}}\r\n\r\nThe reason is that `exprIsConApp_maybe` sees `$WSize (I# 17#)`, which is an application with a nontrivial argument. In general, this could cause duplication of work, but in this case we're dealing with a newtype wrapper, so this is safe.","type_of_failure":"OtherFailure","blocking":[]} -->Krzysztof GogolewskiKrzysztof Gogolewskihttps://gitlab.haskell.org/ghc/ghc/-/issues/16253Offer a shorthand for `--skip=_build/stage$n/compiler/.dependencies.mk`2019-07-07T18:00:48ZSebastian GrafOffer a shorthand for `--skip=_build/stage$n/compiler/.dependencies.mk`When working on a stage1 compiler, the slightest change in any of the files leads to rebuilding the dependency matrix, which takes 20-30s time. That makes for a very disruptive edit-compile cycle.
Alp helped me on \#ghc and found `--ski...When working on a stage1 compiler, the slightest change in any of the files leads to rebuilding the dependency matrix, which takes 20-30s time. That makes for a very disruptive edit-compile cycle.
Alp helped me on \#ghc and found `--skip=_build/stage0/compiler/.dependencies.mk` as the right flag to skip dependency rebuilding. I wonder if could hide that behind a nicer flag? I think this should do similar things as `--freeze1`, only that we 'freeze' stage 0 and dependency building.
The analogy is that we need a hadrian equivalent of `make -C ghc 1` as we have `--freeze1` for `make -C ghc 2`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | alpmestan, snowleopard |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Offer a shorthand for `--skip=_build/stage$n/compiler/.dependencies.mk`","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["alpmestan","snowleopard"],"type":"Task","description":"When working on a stage1 compiler, the slightest change in any of the files leads to rebuilding the dependency matrix, which takes 20-30s time. That makes for a very disruptive edit-compile cycle.\r\n\r\nAlp helped me on #ghc and found `--skip=_build/stage0/compiler/.dependencies.mk` as the right flag to skip dependency rebuilding. I wonder if could hide that behind a nicer flag? I think this should do similar things as `--freeze1`, only that we 'freeze' stage 0 and dependency building.\r\n\r\nThe analogy is that we need a hadrian equivalent of `make -C ghc 1` as we have `--freeze1` for `make -C ghc 2`.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16252QuantifiedConstraints: lack of inference really is a problem2022-09-06T11:39:53ZIsaac ElliottQuantifiedConstraints: lack of inference really is a problemI've been debugging an issue that boils down to: quantified constraints are completely ignored during type inference.
For example, in this program:
```hs
{-# language QuantifiedConstraints #-}
module QC where
data A f = A (f Int)
eqA...I've been debugging an issue that boils down to: quantified constraints are completely ignored during type inference.
For example, in this program:
```hs
{-# language QuantifiedConstraints #-}
module QC where
data A f = A (f Int)
eqA :: forall f. (forall x. Eq x => Eq (f x)) => A f -> A f -> Bool
eqA (A a) (A b) = a == b
eqA' :: (forall x. Eq x => Eq (f x)) => A f -> A f -> Bool
eqA' = let g = eqA in g
```
`eqA'` won't compile because `g` gets generalised to `forall f. A f -> A f -> Bool`.
I know this has been discussed (and dismissed) in tickets such as #2256 and #14942, but I really think it's a problem.
In my example, I can get the code compiling by turning on ScopedTypeVariables and giving `g` an annotation. But I don't always have this liberty. For example, in the `deriving-compat` library there's Template Haskell that generates definitions containing `let`s, and when a quantified constraint is present these splices don't type check for the same reason `eqA'` doesn't. The solution here involves a pull request to `deriving-compat` that uses ScopedTypeVariables to annotate the problematic `let`s.
But I really think that none of this should be necessary. The reference implementation of QCs (https://github.com/gkaracha/quantcs-impl) doesn't seem to have this problem. Is there anything I'm missing?
<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":"QuantifiedConstraints: lack of inference really is a problem","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I've been debugging an issue that boils down to: quantified constraints are completely ignored during type inference.\r\n\r\nFor example, in this program:\r\n\r\n{{{#!hs\r\n{-# language QuantifiedConstraints #-}\r\nmodule QC where\r\n\r\ndata A f = A (f Int)\r\n\r\neqA :: forall f. (forall x. Eq x => Eq (f x)) => A f -> A f -> Bool\r\neqA (A a) (A b) = a == b\r\n\r\neqA' :: (forall x. Eq x => Eq (f x)) => A f -> A f -> Bool\r\neqA' = let g = eqA in g\r\n}}}\r\n\r\n`eqA'` won't compile because `g` gets generalised to `forall f. A f -> A f -> Bool`.\r\n\r\nI know this has been discussed (and dismissed) in tickets such as #2256 and #14942, but I really think it's a problem.\r\n\r\nIn my example, I can get the code compiling by turning on ScopedTypeVariables and giving `g` an annotation. But I don't always have this liberty. For example, in the `deriving-compat` library there's Template Haskell that generates definitions containing `let`s, and when a quantified constraint is present these splices don't type check for the same reason `eqA'` doesn't. The solution here involves a pull request to `deriving-compat` that uses ScopedTypeVariables to annotate the problematic `let`s.\r\n\r\nBut I really think that none of this should be necessary. The reference implementation of QCs (https://github.com/gkaracha/quantcs-impl) doesn't seem to have this problem. Is there anything I'm missing?","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16251T5515 broken in devel2 flavour2019-07-07T18:00:48ZBen GamariT5515 broken in devel2 flavourThe `T5515` testcase is broken in the `devel2` build flavour:
```
--- indexed-types/should_fail/T5515.run/T5515.stderr.normalised 2019-01-27 16:01:12.703091135 +0000
+++ indexed-types/should_fail/T5515.run/T5515.comp.stderr.normalised 2...The `T5515` testcase is broken in the `devel2` build flavour:
```
--- indexed-types/should_fail/T5515.run/T5515.stderr.normalised 2019-01-27 16:01:12.703091135 +0000
+++ indexed-types/should_fail/T5515.run/T5515.comp.stderr.normalised 2019-01-27 16:01:12.703091135 +0000
@@ -1,24 +1,12 @@
+ghc: panic! (the 'impossible' happened)
+ (GHC version 8.7.20190127 for x86_64-unknown-linux):
+ ASSERT failed!
+ rhs axiom D:R:Argf ::
+ Arg f = a_asO[sk:1] -- Defined at T5515.hs:15:8
+ Call stack:
+ CallStack (from HasCallStack):
+ callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable
+ pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable
+ assertPprPanic, called at compiler/typecheck/FamInst.hs:<line>:<column> in <package-id>:FamInst
-T5515.hs:6:16:
- Expecting one more argument to ‘ctx’
- Expected a type, but ‘ctx’ has kind ‘* -> Constraint’
- In the first argument of ‘Arg’, namely ‘ctx’
- In the first argument of ‘ctx’, namely ‘(Arg ctx)’
- In the class declaration for ‘Bome’
-
-T5515.hs:14:1:
- Type variable ‘a’ is mentioned in the RHS,
- but not bound on the LHS of the family instance
- In the type instance declaration for ‘Arg’
- In the instance declaration for ‘Some f’
-
-T5515.hs:14:10:
- Could not deduce (C f a0)
- from the context: C f a
- bound by an instance declaration:
- forall f a. C f a => Some f
- at T5515.hs:14:10-24
- The type variable ‘a0’ is ambiguous
- In the ambiguity check for an instance declaration
- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
- In the instance declaration for ‘Some f’
+Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| 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":"T5515 broken in devel2 flavour","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The `T5515` testcase is broken in the `devel2` build flavour:\r\n{{{\r\n--- indexed-types/should_fail/T5515.run/T5515.stderr.normalised\t2019-01-27 16:01:12.703091135 +0000\r\n+++ indexed-types/should_fail/T5515.run/T5515.comp.stderr.normalised\t2019-01-27 16:01:12.703091135 +0000\r\n@@ -1,24 +1,12 @@\r\n+ghc: panic! (the 'impossible' happened)\r\n+ (GHC version 8.7.20190127 for x86_64-unknown-linux):\r\n+\tASSERT failed!\r\n+ rhs axiom D:R:Argf ::\r\n+ Arg f = a_asO[sk:1] -- Defined at T5515.hs:15:8\r\n+ Call stack:\r\n+ CallStack (from HasCallStack):\r\n+ callStackDoc, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable\r\n+ pprPanic, called at compiler/utils/Outputable.hs:<line>:<column> in <package-id>:Outputable\r\n+ assertPprPanic, called at compiler/typecheck/FamInst.hs:<line>:<column> in <package-id>:FamInst\r\n \r\n-T5515.hs:6:16:\r\n- Expecting one more argument to ‘ctx’\r\n- Expected a type, but ‘ctx’ has kind ‘* -> Constraint’\r\n- In the first argument of ‘Arg’, namely ‘ctx’\r\n- In the first argument of ‘ctx’, namely ‘(Arg ctx)’\r\n- In the class declaration for ‘Bome’\r\n-\r\n-T5515.hs:14:1:\r\n- Type variable ‘a’ is mentioned in the RHS,\r\n- but not bound on the LHS of the family instance\r\n- In the type instance declaration for ‘Arg’\r\n- In the instance declaration for ‘Some f’\r\n-\r\n-T5515.hs:14:10:\r\n- Could not deduce (C f a0)\r\n- from the context: C f a\r\n- bound by an instance declaration:\r\n- forall f a. C f a => Some f\r\n- at T5515.hs:14:10-24\r\n- The type variable ‘a0’ is ambiguous\r\n- In the ambiguity check for an instance declaration\r\n- To defer the ambiguity check to use sites, enable AllowAmbiguousTypes\r\n- In the instance declaration for ‘Some f’\r\n+Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16250Make it easy to invoke Hadrian2020-01-05T18:30:35ZRichard Eisenbergrae@richarde.devMake it easy to invoke HadrianRight now, invoking Hadrian requires running `hadrian/build.sh`. That's a small mouthful (when using it regularly), and it crucially depends on being in the root directory of GHC. It would be very convenient to have some command (say, `b...Right now, invoking Hadrian requires running `hadrian/build.sh`. That's a small mouthful (when using it regularly), and it crucially depends on being in the root directory of GHC. It would be very convenient to have some command (say, `build`) which would work *anywhere* within the GHC tree, e.g. by searching for the root and then running the local Hadrian build script. Doing this would require devs to install something locally (so that it's in the PATH always), but that something can be small and light.
Shall we fix? Thanks.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Make it easy to invoke Hadrian","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Right now, invoking Hadrian requires running `hadrian/build.sh`. That's a small mouthful (when using it regularly), and it crucially depends on being in the root directory of GHC. It would be very convenient to have some command (say, `build`) which would work ''anywhere'' within the GHC tree, e.g. by searching for the root and then running the local Hadrian build script. Doing this would require devs to install something locally (so that it's in the PATH always), but that something can be small and light.\r\n\r\nShall we fix? Thanks.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16248ImplicitParams does not imply FlexibleContexts or FlexibleInstances2019-07-07T18:00:49ZNeil MitchellImplicitParams does not imply FlexibleContexts or FlexibleInstancesGiven:
```hs
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE FlexibleInstances #-}
module Test where
data X a = X
type XI = X Int
class Foo a where
foo :: (?p :: Int) => a -> Int
instance Foo XI where foo = undefined
```
Th...Given:
```hs
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE FlexibleInstances #-}
module Test where
data X a = X
type XI = X Int
class Foo a where
foo :: (?p :: Int) => a -> Int
instance Foo XI where foo = undefined
```
This code compiles. However, the documentation at https://downloads.haskell.org/\~ghc/master/users-guide/glasgow_exts.html\#language-options says that ImplicitParams implies FlexibleInstances, so we should be able to remove the FlexibleInstances extension. However, doing so makes it stop compiling.
My guess is that ImplicitParams doesn't really imply either of the type class extensions, and that the documentation is buggy.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"ImplicitParams does not imply FlexibleContexts or FlexibleInstances","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["ndmitchell@gmail.com"],"type":"Bug","description":"Given:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE ImplicitParams #-}\r\n{-# LANGUAGE FlexibleInstances #-}\r\n\r\nmodule Test where\r\n\r\ndata X a = X\r\ntype XI = X Int\r\n\r\nclass Foo a where\r\n foo :: (?p :: Int) => a -> Int\r\n\r\ninstance Foo XI where foo = undefined\r\n}}}\r\n\r\nThis code compiles. However, the documentation at https://downloads.haskell.org/~ghc/master/users-guide/glasgow_exts.html#language-options says that ImplicitParams implies FlexibleInstances, so we should be able to remove the FlexibleInstances extension. However, doing so makes it stop compiling.\r\n\r\nMy guess is that ImplicitParams doesn't really imply either of the type class extensions, and that the documentation is buggy.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16247GHC 8.6 Core Lint regression (Kind application error)2019-07-07T18:00:49ZRyan ScottGHC 8.6 Core Lint regression (Kind application error)The following program produces a Core Lint error on GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind
data SameKind :: forall k. k -> k ...The following program produces a Core Lint error on GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeInType #-}
module Bug where
import Data.Kind
data SameKind :: forall k. k -> k -> Type
data Foo :: forall a k (b :: k). SameKind a b -> Type where
MkFoo :: Foo sameKind
```
```
$ /opt/ghc/8.6.3/bin/ghc Bug.hs -dcore-lint
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
*** Core Lint errors : in result of CorePrep ***
<no location info>: warning:
In the type ‘forall k (a :: k) k (b :: k) (sameKind :: SameKind
a b).
Foo sameKind’
Kind application error in type ‘SameKind a_aWE b_aWG’
Function kind = forall k. k -> k -> *
Arg kinds = [(k_aWF, *), (a_aWE, k_aWD), (b_aWG, k_aWF)]
Fun: k_aWF
(a_aWE, k_aWD)
*** Offending Program ***
<elided>
MkFoo
:: forall k (a :: k) k (b :: k) (sameKind :: SameKind a b).
Foo sameKind
```
(Confusingly, the type of `MkFoo` is rendered as `forall k (a :: k) k (b :: k) (sameKind :: SameKind a b). Foo sameKind` in that `-dcore-lint` error, but I think it really should be `forall k1 (a :: k1) k2 (b :: k2) (sameKind :: SameKind a b). Foo sameKind`.)
On GHC 8.4.4 and earlier, this simply produces an error message:
```
$ /opt/ghc/8.4.4/bin/ghc Bug.hs -dcore-lint
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:9:13: error:
• These kind and type variables: a k (b :: k)
are out of dependency order. Perhaps try this ordering:
k (a :: k) (b :: k)
• In the kind ‘forall a k (b :: k). SameKind a b -> Type’
|
9 | data Foo :: forall a k (b :: k). SameKind a b -> Type where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.6.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 8.6 Core Lint regression (Kind application error)","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"8.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["TypeInType"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following program produces a Core Lint error on GHC 8.6.3 and HEAD:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE ScopedTypeVariables #-}\r\n{-# LANGUAGE TypeInType #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\n\r\ndata SameKind :: forall k. k -> k -> Type\r\ndata Foo :: forall a k (b :: k). SameKind a b -> Type where\r\n MkFoo :: Foo sameKind\r\n}}}\r\n\r\n{{{\r\n$ /opt/ghc/8.6.3/bin/ghc Bug.hs -dcore-lint \r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n*** Core Lint errors : in result of CorePrep ***\r\n<no location info>: warning:\r\n In the type ‘forall k (a :: k) k (b :: k) (sameKind :: SameKind\r\n a b).\r\n Foo sameKind’\r\n Kind application error in type ‘SameKind a_aWE b_aWG’\r\n Function kind = forall k. k -> k -> *\r\n Arg kinds = [(k_aWF, *), (a_aWE, k_aWD), (b_aWG, k_aWF)]\r\n Fun: k_aWF\r\n (a_aWE, k_aWD)\r\n*** Offending Program ***\r\n\r\n<elided>\r\n\r\nMkFoo\r\n :: forall k (a :: k) k (b :: k) (sameKind :: SameKind a b).\r\n Foo sameKind\r\n}}}\r\n\r\n(Confusingly, the type of `MkFoo` is rendered as `forall k (a :: k) k (b :: k) (sameKind :: SameKind a b). Foo sameKind` in that `-dcore-lint` error, but I think it really should be `forall k1 (a :: k1) k2 (b :: k2) (sameKind :: SameKind a b). Foo sameKind`.)\r\n\r\nOn GHC 8.4.4 and earlier, this simply produces an error message:\r\n\r\n{{{\r\n$ /opt/ghc/8.4.4/bin/ghc Bug.hs -dcore-lint\r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n\r\nBug.hs:9:13: error:\r\n • These kind and type variables: a k (b :: k)\r\n are out of dependency order. Perhaps try this ordering:\r\n k (a :: k) (b :: k)\r\n • In the kind ‘forall a k (b :: k). SameKind a b -> Type’\r\n |\r\n9 | data Foo :: forall a k (b :: k). SameKind a b -> Type where\r\n | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->8.10.1https://gitlab.haskell.org/ghc/ghc/-/issues/16246GHC HEAD-only Core Lint error with unboxed equality (Non-CoVar has coercion t...2020-01-23T19:39:43ZRyan ScottGHC HEAD-only Core Lint error with unboxed equality (Non-CoVar has coercion type)```hs
module Foo where
import Language.Haskell.TH.Lib
import Language.Haskell.TH.Syntax
ueqT :: Q Type
ueqT = conT $ mkNameG_tc "ghc-prim" "GHC.Prim" "~#"
```
```hs
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE T...```hs
module Foo where
import Language.Haskell.TH.Lib
import Language.Haskell.TH.Syntax
ueqT :: Q Type
ueqT = conT $ mkNameG_tc "ghc-prim" "GHC.Prim" "~#"
```
```hs
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
module Bug where
import Data.Kind
import Foo (ueqT)
data JankyEquality :: Type -> Type -> Type where
Jank :: $ueqT a b -> JankyEquality a b
unJank :: JankyEquality a b -> $ueqT a b
unJank (Jank x) = x
```
```
$ ~/Software/ghc5/inplace/bin/ghc-stage2 --interactive Bug.hs -dcore-lint
GHCi, version 8.7.20190115: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/rgscott/.ghci
[1 of 2] Compiling Foo ( Foo.hs, interpreted )
[2 of 2] Compiling Bug ( Bug.hs, interpreted )
*** Core Lint errors : in result of Desugar (before optimization) ***
<no location info>: warning:
In a case alternative: (Jank x_a4vR :: a_a4wC ~# b_a4wD)
Non-CoVar has coercion type x_a4vR :: a_a4wC ~# b_a4wD
*** Offending Program ***
<elided>
unJank :: forall a b. JankyEquality a b -> a ~# b
[LclIdX]
unJank
= \ (@ a_a4wC)
(@ b_a4wD)
(ds_d4wN :: JankyEquality a_a4wC b_a4wD) ->
case ds_d4wN of wild_00 { Jank x_a4vR -> break<0>() x_a4vR }
```
Note that this passes `-dcore-lint` on GHC 8.0.2 through 8.6.3.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| 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 HEAD-only Core Lint error with unboxed equality (Non-CoVar has coercion type)","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"8.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{#!hs\r\nmodule Foo where\r\n\r\nimport Language.Haskell.TH.Lib\r\nimport Language.Haskell.TH.Syntax\r\n\r\nueqT :: Q Type\r\nueqT = conT $ mkNameG_tc \"ghc-prim\" \"GHC.Prim\" \"~#\"\r\n}}}\r\n{{{#!hs\r\n{-# LANGUAGE KindSignatures #-}\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\nimport Foo (ueqT)\r\n\r\ndata JankyEquality :: Type -> Type -> Type where\r\n Jank :: $ueqT a b -> JankyEquality a b\r\n\r\nunJank :: JankyEquality a b -> $ueqT a b\r\nunJank (Jank x) = x\r\n}}}\r\n{{{\r\n$ ~/Software/ghc5/inplace/bin/ghc-stage2 --interactive Bug.hs -dcore-lint\r\nGHCi, version 8.7.20190115: https://www.haskell.org/ghc/ :? for help\r\nLoaded GHCi configuration from /home/rgscott/.ghci\r\n[1 of 2] Compiling Foo ( Foo.hs, interpreted )\r\n[2 of 2] Compiling Bug ( Bug.hs, interpreted )\r\n*** Core Lint errors : in result of Desugar (before optimization) ***\r\n<no location info>: warning:\r\n In a case alternative: (Jank x_a4vR :: a_a4wC ~# b_a4wD)\r\n Non-CoVar has coercion type x_a4vR :: a_a4wC ~# b_a4wD\r\n*** Offending Program ***\r\n\r\n<elided>\r\n\r\nunJank :: forall a b. JankyEquality a b -> a ~# b\r\n[LclIdX]\r\nunJank\r\n = \\ (@ a_a4wC)\r\n (@ b_a4wD)\r\n (ds_d4wN :: JankyEquality a_a4wC b_a4wD) ->\r\n case ds_d4wN of wild_00 { Jank x_a4vR -> break<0>() x_a4vR }\r\n}}}\r\n\r\nNote that this passes `-dcore-lint` on GHC 8.0.2 through 8.6.3.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16245GHC panic (No skolem info) with RankNTypes and strange scoping2020-12-31T13:44:06ZRyan ScottGHC panic (No skolem info) with RankNTypes and strange scopingThe following program panics with GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE QuantifiedConstraints #-}
module Bug where
import Data.Kind
type Const a b...The following program panics with GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE QuantifiedConstraints #-}
module Bug where
import Data.Kind
type Const a b = a
type SameKind (a :: k) (b :: k) = (() :: Constraint)
class (forall (b :: k). SameKind a b) => C (k :: Const Type a)
```
```
$ /opt/ghc/8.6.3/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:11:36: error:ghc: panic! (the 'impossible' happened)
(GHC version 8.6.3 for x86_64-unknown-linux):
No skolem info:
[k1_a1X4[sk:1]]
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler/utils/Outputable.hs:1160:37 in ghc:Outputable
pprPanic, called at compiler/typecheck/TcErrors.hs:2891:5 in ghc:TcErrors
```
As with #16244, I imagine that the real culprit is that `SameKind a b` would force `a :: k`, which would be ill-scoped.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.6.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 panic (No skolem info) with QuantifiedConstraints and strange scoping","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["QuantifiedConstraints","TypeInType,"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following program panics with GHC 8.6.3 and HEAD:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE ConstraintKinds #-}\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE PolyKinds #-}\r\n{-# LANGUAGE QuantifiedConstraints #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\n\r\ntype Const a b = a\r\ntype SameKind (a :: k) (b :: k) = (() :: Constraint)\r\nclass (forall (b :: k). SameKind a b) => C (k :: Const Type a)\r\n}}}\r\n{{{\r\n$ /opt/ghc/8.6.3/bin/ghc Bug.hs\r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n\r\nBug.hs:11:36: error:ghc: panic! (the 'impossible' happened)\r\n (GHC version 8.6.3 for x86_64-unknown-linux):\r\n No skolem info:\r\n [k1_a1X4[sk:1]]\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/typecheck/TcErrors.hs:2891:5 in ghc:TcErrors\r\n}}}\r\n\r\nAs with #16244, I imagine that the real culprit is that `SameKind a b` would force `a :: k`, which would be ill-scoped.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16244Couldn't match kind ‘k1’ with ‘k1’2020-05-05T09:44:28ZRyan ScottCouldn't match kind ‘k1’ with ‘k1’The following program gives a hopelessly confusing error message on GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
module Bug where...The following program gives a hopelessly confusing error message on GHC 8.6.3 and HEAD:
```hs
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PolyKinds #-}
module Bug where
import Data.Kind
type Const a b = a
type SameKind (a :: k) (b :: k) = (() :: Constraint)
class SameKind a b => C (k :: Const Type a) (b :: k)
```
```
$ /opt/ghc/8.6.3/bin/ghc Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:11:18: error:
• Couldn't match kind ‘k1’ with ‘k1’
• In the second argument of ‘SameKind’, namely ‘b’
In the class declaration for ‘C’
|
11 | class SameKind a b => C (k :: Const Type a) (b :: k)
| ^
```
I imagine that the real issue is that `SameKind a b` would force `a :: k`, which would be ill-scoped. But figuring that out from this strange error message requires a lot of thought.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 8.6.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":"Couldn't match kind ‘k1’ with ‘k1’","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"8.10.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["TypeInType"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following program gives a hopelessly confusing error message on GHC 8.6.3 and HEAD:\r\n\r\n{{{#!hs\r\n{-# LANGUAGE ConstraintKinds #-}\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE MultiParamTypeClasses #-}\r\n{-# LANGUAGE PolyKinds #-}\r\nmodule Bug where\r\n\r\nimport Data.Kind\r\n\r\ntype Const a b = a\r\ntype SameKind (a :: k) (b :: k) = (() :: Constraint)\r\nclass SameKind a b => C (k :: Const Type a) (b :: k)\r\n}}}\r\n{{{\r\n$ /opt/ghc/8.6.3/bin/ghc Bug.hs\r\n[1 of 1] Compiling Bug ( Bug.hs, Bug.o )\r\n\r\nBug.hs:11:18: error:\r\n • Couldn't match kind ‘k1’ with ‘k1’\r\n • In the second argument of ‘SameKind’, namely ‘b’\r\n In the class declaration for ‘C’\r\n |\r\n11 | class SameKind a b => C (k :: Const Type a) (b :: k)\r\n | ^\r\n}}}\r\n\r\nI imagine that the real issue is that `SameKind a b` would force `a :: k`, which would be ill-scoped. But figuring that out from this strange error message requires a lot of thought.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16243Improve fregs-graph.2022-04-29T11:08:40ZAndreas KlebingerImprove fregs-graph.I'm creating this as a way to keep track of shortcomings of the current implementation.
Some of these are directly taken from TODOS, other are my own opinions.
# Things that could be looked at.
## Compress spill slots.
Currently we a...I'm creating this as a way to keep track of shortcomings of the current implementation.
Some of these are directly taken from TODOS, other are my own opinions.
# Things that could be looked at.
## Compress spill slots.
Currently we assign each vreg a fixed spill slot. This is terrible for cache performance.
It's possible to end up with sequences like this:
```asm
block_ca01_info:
_ca01:
movq 16(%rbp),%r14
movq 24(%rbp),%rax
movq %rax,144(%rsp)
movq 32(%rbp),%rsi
movq 40(%rbp),%rdi
movq 64(%rbp),%rbx
movq 56(%rbp),%rax
movq %rax,208(%rsp)
movq 48(%rbp),%rax
movq %rax,168(%rsp)
movq 8(%rbp),%rax
movq %rax,216(%rsp)
addq $8,%rbp
```
Which splits spill slots over multiple cache lines increasing cache pressure.
Things possibly worth trying:
- Assign spill slots in the order they appear - hopefully reducing the average spread within code blocks.
- Dynamically assign vregs to spill slots.
For the later if we have large independent subgraphs we will sometimes get away with using far fewer slots.
The reason simply being that non overlapping vregs can share spill slots.
Doing this in an efficient manner however isn't easy.
## We sometimes load + spill vregs when we could use memory addressing.
One example I've seen a few times in nofib is this:
```
movq 208(%rsp),%rax
incq %rax
movq %rax,208(%rsp)
```
Which we should replace with a single `inc` operating on memory.
## Lift the stack size limit.
There is already a patch [in flight](https://gitlab.haskell.org/ghc/ghc/merge_requests/219).
## Revisit spill costs.
Currently the allocator always spills the longest live range. Which often works but is certainly not a great metric.
Ideas:
### Consider loop membership.
At least for x86/64 this would be easy to achieve on basic block granularity using the CFG that is also used for block layout.
### Revisit chaitins cost model.
There have been major changes to cpus (amd64 becoming the norm) and the backend
so at a minimum this cost model should be reevaluated.
## Try splitting long live ranges instead of simply spilling the complete live range.
After all long live ranges were the original reason to switch to a life range only based cost heuristic.
## Use a different spill algorithm altogether.
Maybe Chows live range splitting based approach would be an option.
See "The priority based coloring approach to register allocation" for details.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------ |
| Version | 8.6.3 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (CodeGen) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Improve fregs-graph.","status":"New","operating_system":"","component":"Compiler (CodeGen)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":["fregs-graph"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"I'm creating this as a way to keep track of shortcomings of the current implementation.\r\n\r\nSome of these are directly taken from TODOS, other are my own opinions.\r\n\r\n= Things that could be looked at.\r\n\r\n== Compress spill slots.\r\n\r\nCurrently we assign each vreg a fixed spill slot. This is terrible for cache performance.\r\n\r\nIt's possible to end up with sequences like this:\r\n\r\n{{{#!asm\r\nblock_ca01_info:\r\n_ca01:\r\n\tmovq 16(%rbp),%r14\r\n\tmovq 24(%rbp),%rax\r\n\tmovq %rax,144(%rsp)\r\n\tmovq 32(%rbp),%rsi\r\n\tmovq 40(%rbp),%rdi\r\n\tmovq 64(%rbp),%rbx\r\n\tmovq 56(%rbp),%rax\r\n\tmovq %rax,208(%rsp)\r\n\tmovq 48(%rbp),%rax\r\n\tmovq %rax,168(%rsp)\r\n\tmovq 8(%rbp),%rax\r\n\tmovq %rax,216(%rsp)\r\n\taddq $8,%rbp\r\n}}}\r\n\r\nWhich splits spill slots over multiple cache lines increasing cache pressure.\r\n\r\nThings possibly worth trying:\r\n\r\n* Assign spill slots in the order they appear - hopefully reducing the average spread within code blocks.\r\n* Dynamically assign vregs to spill slots.\r\n\r\nFor the later if we have large independent subgraphs we will sometimes get away with using far fewer slots. \r\nThe reason simply being that non overlapping vregs can share spill slots.\r\n\r\nDoing this in an efficient manner however isn't easy.\r\n\r\n== We sometimes load + spill vregs when we could use memory addressing.\r\n\r\nOne example I've seen a few times in nofib is this:\r\n{{{\r\n\tmovq 208(%rsp),%rax\r\n\tincq %rax\r\n\tmovq %rax,208(%rsp)\r\n}}}\r\n\r\nWhich we should replace with a single `inc` operating on memory.\r\n\r\n== Lift the stack size limit.\r\n\r\nThere is already a patch [https://gitlab.haskell.org/ghc/ghc/merge_requests/219 in flight].\r\n\r\n== Revisit spill costs.\r\n\r\nCurrently the allocator always spills the longest live range. Which often works but is certainly not a great metric.\r\n\r\nIdeas:\r\n\r\n=== Consider loop membership.\r\n\r\nAt least for x86/64 this would be easy to achieve on basic block granularity using the CFG that is also used for block layout.\r\n\r\n=== Revisit chaitins cost model.\r\n\r\nThere have been major changes to cpus (amd64 becoming the norm) and the backend\r\nso at a minimum this cost model should be reevaluated.\r\n\r\n== Try splitting long live ranges instead of simply spilling the complete live range.\r\n\r\nAfter all long live ranges were the original reason to switch to a life range only based cost heuristic.\r\n\r\n== Use a different spill algorithm altogether.\r\n\r\nMaybe Chows live range splitting based approach would be an option.\r\nSee \"The priority based coloring approach to register allocation\" for details.\r\n\r\n\r\n\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16242Hadrian is too aggressive in rebuilding2022-07-01T02:36:23ZRichard Eisenbergrae@richarde.devHadrian is too aggressive in rebuildingHere's what has happened:
1. `build` (with settings `devel2`). This did its thing successfully.
1. Edit a comment in one file.
1. `build test --only=blahblahblah`. I was expecting to run a test. (It was a new test-case, a change unrelat...Here's what has happened:
1. `build` (with settings `devel2`). This did its thing successfully.
1. Edit a comment in one file.
1. `build test --only=blahblahblah`. I was expecting to run a test. (It was a new test-case, a change unrelated to the comment I fixed.)
What happens though is that stage-1 is rebuilt, and now I'm currently waiting for the entire RTS to be rebuilt. And all I wanted to do is run a test!
I understand why Hadrian is doing this; it's technically got the upper hand here. But it's very frustrating. I suppose I could have done `--freeze1`, but it's too late now. And, even if I didn't do `--freeze1`, I'm surprised that the whole RTS needs to be rebuilt. Again, I know why Hadrian wants to. But I miss the old `LAX_DEPENDENCIES` feature of `make`.
So, I suppose this boils down to two requests:
1. Restore the `LAX_DEPENDENCIES` feature. I don't know the specification of that feature, but my experience is that it just did the Right Thing, and I always had it enabled (except during validation).
1. Have some way of just running a test, without any rebuilding.
Somewhat separately, it might be nice to package up common idioms into smaller command lines. Again, individual devs can do this, but centralized support (especially so that these scripts can be run from a variety of directories) would be nice. For example, I imagine my suggestion (2) above will lead to `build test --no-recompilation --only=xyz`, but that's a long line to write!
Thanks!
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Hadrian is too aggressive in rebuilding","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Here's what has happened:\r\n\r\n1. `build` (with settings `devel2`). This did its thing successfully.\r\n\r\n2. Edit a comment in one file.\r\n\r\n3. `build test --only=blahblahblah`. I was expecting to run a test. (It was a new test-case, a change unrelated to the comment I fixed.)\r\n\r\nWhat happens though is that stage-1 is rebuilt, and now I'm currently waiting for the entire RTS to be rebuilt. And all I wanted to do is run a test! \r\n\r\nI understand why Hadrian is doing this; it's technically got the upper hand here. But it's very frustrating. I suppose I could have done `--freeze1`, but it's too late now. And, even if I didn't do `--freeze1`, I'm surprised that the whole RTS needs to be rebuilt. Again, I know why Hadrian wants to. But I miss the old `LAX_DEPENDENCIES` feature of `make`.\r\n\r\nSo, I suppose this boils down to two requests:\r\n\r\n1. Restore the `LAX_DEPENDENCIES` feature. I don't know the specification of that feature, but my experience is that it just did the Right Thing, and I always had it enabled (except during validation).\r\n\r\n2. Have some way of just running a test, without any rebuilding.\r\n\r\nSomewhat separately, it might be nice to package up common idioms into smaller command lines. Again, individual devs can do this, but centralized support (especially so that these scripts can be run from a variety of directories) would be nice. For example, I imagine my suggestion (2) above will lead to `build test --no-recompilation --only=xyz`, but that's a long line to write!\r\n\r\nThanks!","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16241Avoid orphan instances with OVERLAPPABLE (sometimes)2019-07-07T18:00:50ZAntCAvoid orphan instances with OVERLAPPABLE (sometimes)Not sure whether to count this as a bug or a feature. If it's 'intended behaviour', what is the intent, exactly?
GHC is on the verge of doing something useful, but it's inconsistent and "fragile" (as the warning does tell me).
Consider...Not sure whether to count this as a bug or a feature. If it's 'intended behaviour', what is the intent, exactly?
GHC is on the verge of doing something useful, but it's inconsistent and "fragile" (as the warning does tell me).
Consider the standard example of what goes wrong with orphan instances, from the [big red \*\*warning\*\* in the Users Guide](https://downloads.haskell.org/~ghc/8.6.3/docs/html/users_guide/glasgow_exts.html#overlapping-instances). (Version 1 lightly adapted to use `OVERLAPPING` rather than the now-deprecated `Overlapping Instances`.)
```hs
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
module Help where
class MyShow a where
myshow :: a -> String
instance MyShow a => MyShow [a] where -- version 1
-- instance {-# OVERLAPPABLE #-} -- version 2
-- MyShow a => MyShow [a] where
myshow xs = concatMap myshow xs
showHelp :: MyShow a => [a] -> String -- version 1
-- showHelp :: MyShow [a] => [a] -> String -- version 2
showHelp xs = myshow xs
{-# LANGUAGE FlexibleInstances #-}
module Main where
import Help
data T = MkT
instance MyShow T where
myshow x = "Used generic instance"
instance {# OVERLAPPING #} MyShow [T] where
myshow xs = "Used more specific instance"
main = do { print (myshow [MkT]); print (showHelp [MkT]) }
```
Version 1 gives the as-warned incoherent behaviour ("different instance choices are made in different parts of the program" -- that is, in different modules for the (apparently) same code `myshow xs`.)
If and only if both changes marked `version 2` are in place, `myshow xs` returns the same result from both calls consistently.
Why? Because the `MyShow [a] =>` constraint on `showHelp`'s sig sees that exactly matches an instance head, and that the head is marked `OVERLAPPABLE`. But GHC is not happy
```
... warning: [-Wsimplifiable-class-constraints]
* The constraint `MyShow [a]' matches an instance declaration
instance [overlappable] MyShow a => MyShow [a]
This makes type inference for inner bindings fragile;
either use MonoLocalBinds, or simplify it using the instance
```
Hmm: wrong advice: simplifying the constraint using the instance gives us the version 1 signature, which exactly makes `showHelp` use the orphan instance.
*Does* version 2 make inference for inner bindings fragile? I think only if the instance is not marked `OVERLAPPABLE`. IOW a tentative rule would be 'OVERLAPPABLE constraints should not be simplified!'
Inconsistencies I see:
- Marking overlappable instances as `OVERLAPPABLE` is not merely the mirror-image of marking the overlapping instance as `OVERLAPPING`: you get different behaviour.
- The `OVERLAPPABLE` pragma, when you already have `OVERLAPPING` to accept the instances, is not merely a comment.
- This makes an observable difference under separate compilation, contra SPJ's [ticket:15135\#comment:162745](https://gitlab.haskell.org//ghc/ghc/issues/15135#note_162745) .
- [ticket:15135\#comment:153032](https://gitlab.haskell.org//ghc/ghc/issues/15135#note_153032) is also relevant "I think it's arguable that an instance should only be overlappable if it says `{-# OVERLAPPABLE #-}`. But that's not our current spec."
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.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":"Avoid orphan instances with OVERLAPPABLE (sometimes)","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Not sure whether to count this as a bug or a feature. If it's 'intended behaviour', what is the intent, exactly?\r\n\r\nGHC is on the verge of doing something useful, but it's inconsistent and \"fragile\" (as the warning does tell me).\r\n\r\nConsider the standard example of what goes wrong with orphan instances, from the [https://downloads.haskell.org/~ghc/8.6.3/docs/html/users_guide/glasgow_exts.html#overlapping-instances big red **warning** in the Users Guide]. (Version 1 lightly adapted to use `OVERLAPPING` rather than the now-deprecated `Overlapping Instances`.)\r\n\r\n\r\n{{{#!hs\r\n{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}\r\nmodule Help where\r\n\r\n class MyShow a where\r\n myshow :: a -> String\r\n\r\n instance MyShow a => MyShow [a] where -- version 1\r\n-- instance {-# OVERLAPPABLE #-} -- version 2\r\n-- MyShow a => MyShow [a] where\r\n myshow xs = concatMap myshow xs\r\n\r\n showHelp :: MyShow a => [a] -> String -- version 1\r\n-- showHelp :: MyShow [a] => [a] -> String -- version 2\r\n showHelp xs = myshow xs\r\n\r\n{-# LANGUAGE FlexibleInstances #-}\r\nmodule Main where\r\n import Help\r\n\r\n data T = MkT\r\n\r\n instance MyShow T where\r\n myshow x = \"Used generic instance\"\r\n\r\n instance {# OVERLAPPING #} MyShow [T] where\r\n myshow xs = \"Used more specific instance\"\r\n\r\n main = do { print (myshow [MkT]); print (showHelp [MkT]) }\r\n}}}\r\n\r\nVersion 1 gives the as-warned incoherent behaviour (\"different instance choices are made in different parts of the program\" -- that is, in different modules for the (apparently) same code `myshow xs`.)\r\n\r\nIf and only if both changes marked `version 2` are in place, `myshow xs` returns the same result from both calls consistently.\r\n\r\nWhy? Because the `MyShow [a] =>` constraint on `showHelp`'s sig sees that exactly matches an instance head, and that the head is marked `OVERLAPPABLE`. But GHC is not happy\r\n\r\n{{{\r\n ... warning: [-Wsimplifiable-class-constraints]\r\n * The constraint `MyShow [a]' matches an instance declaration\r\n instance [overlappable] MyShow a => MyShow [a]\r\n This makes type inference for inner bindings fragile;\r\n either use MonoLocalBinds, or simplify it using the instance\r\n}}}\r\n\r\nHmm: wrong advice: simplifying the constraint using the instance gives us the version 1 signature, which exactly makes `showHelp` use the orphan instance.\r\n\r\n''Does'' version 2 make inference for inner bindings fragile? I think only if the instance is not marked `OVERLAPPABLE`. IOW a tentative rule would be 'OVERLAPPABLE constraints should not be simplified!'\r\n\r\nInconsistencies I see:\r\n\r\n* Marking overlappable instances as `OVERLAPPABLE` is not merely the mirror-image of marking the overlapping instance as `OVERLAPPING`: you get different behaviour.\r\n\r\n* The `OVERLAPPABLE` pragma, when you already have `OVERLAPPING` to accept the instances, is not merely a comment.\r\n\r\n* This makes an observable difference under separate compilation, contra SPJ's ticket:15135#comment:9 .\r\n\r\n* ticket:15135#comment:1 is also relevant \"I think it's arguable that an instance should only be overlappable if it says `{-# OVERLAPPABLE #-}`. But that's not our current spec.\"","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16240Core visible conditional compilation/static definition/code selection based ...2019-07-07T18:00:51ZCarter SchonwaldCore visible conditional compilation/static definition/code selection based upon static key valuescurrently the way we write haskell code to handle multiple platforms or configurations use the C preprocessor (CPP) in traditional mode.
there are several challenges with this
1) tooling dependency
2) not actually designed for haskell...currently the way we write haskell code to handle multiple platforms or configurations use the C preprocessor (CPP) in traditional mode.
there are several challenges with this
1) tooling dependency
2) not actually designed for haskell code
3) no compiler support for checking the syntax / name / type well-formedness of each alternative code fragment under the associated environment assumptions.
Abstractly, CPP uses a mapping from Names to Maybe (Either String Integer) or something to that effect.
theres two ways we could then treat a "HPP" design:
1) just like CPP traditional mode, its just splicing tokens together.
a) One implication of this design choice would be that to be able to check/ parse the different combinations of compilation, you'd need to be able to enumerate the set of maps of key value pairs of interest, and then you'd roughly want to have each Module be actually a
`
Map (Map String (Maybe (Either String Integer)))
Module)
`
this would have some pretty obvious code blowup issues, at least if you wanted to full on type check each combination in full.
2) only allow "HPP" to work on valid syntactic units, eg expressions, right hand sides, patterns, top level definition, etc, and provide a magic primop or several that would look roughly like
NOTE: it could also just be at the Haskell post type inference phase, not necessarily at core level
```
DefinitionDispatchTermLevel ::
[(Map String (Maybe (Either String Integer))
, CoreTerm)] ->
--- set of all #if/else/ifdef etc conditionals?
Map (String) (Maybe (Either String Integer)) ->
-- actual CPP flag combination used
CoreTerm ->
--- actual term ghc / optimizer works with and manipulates
CoreTerm
```
this sketched out constructor representation overlooks a few things, eg the ability to do interval predicates and various boolean algebra operations, which WOULD be expressible in a fully fleshed out approch to this, but i'm elliding to keep simple.
i think approach (1) or something like it would have the benefit of mostly working "today" wrt how we use CPP, and checking/coverage could be done via some package level or module level enumeration of cpp value mappings that you wnat to be checked or even generated
approach (2) adds a funny looking operation to core/haskell terms/types representation where you could carry around "alternative expressions" plus the "selected expression". and thus you could do some amount of syntax/type checking for those altnerative platforms?
either way, this is just me jotting down some thoughts on this because its been discussed on and off for a while now as an eventual nice to have for ghc.
Also quite a complicated design space! :)
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.7 |
| 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":"Core visible conditional compilation/static definition/code selection based upon static key values","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"currently the way we write haskell code to handle multiple platforms or configurations use the C preprocessor (CPP) in traditional mode.\r\n\r\nthere are several challenges with this\r\n\r\n1) tooling dependency\r\n\r\n2) not actually designed for haskell code\r\n\r\n3) no compiler support for checking the syntax / name / type well-formedness of each alternative code fragment under the associated environment assumptions.\r\n\r\nAbstractly, CPP uses a mapping from Names to Maybe (Either String Integer) or something to that effect.\r\n\r\ntheres two ways we could then treat a \"HPP\" design:\r\n\r\n1) just like CPP traditional mode, its just splicing tokens together. \r\n\r\na) One implication of this design choice would be that to be able to check/ parse the different combinations of compilation, you'd need to be able to enumerate the set of maps of key value pairs of interest, and then you'd roughly want to have each Module be actually a\r\n\r\n {{{\r\nMap (Map String (Maybe (Either String Integer))) \r\n Module)\r\n}}}\r\n\r\nthis would have some pretty obvious code blowup issues, at least if you wanted to full on type check each combination in full.\r\n\r\n\r\n2) only allow \"HPP\" to work on valid syntactic units, eg expressions, right hand sides, patterns, top level definition, etc, and provide a magic primop or several that would look roughly like \r\n\r\nNOTE: it could also just be at the Haskell post type inference phase, not necessarily at core level\r\n{{{\r\n\r\nDefinitionDispatchTermLevel :: \r\n [(Map String (Maybe (Either String Integer))\r\n , CoreTerm)] -> \r\n --- set of all #if/else/ifdef etc conditionals?\r\n Map (String) (Maybe (Either String Integer)) ->\r\n -- actual CPP flag combination used\r\n CoreTerm -> \r\n --- actual term ghc / optimizer works with and manipulates\r\n CoreTerm\r\n\r\n\r\n}}}\r\n\r\nthis sketched out constructor representation overlooks a few things, eg the ability to do interval predicates and various boolean algebra operations, which WOULD be expressible in a fully fleshed out approch to this, but i'm elliding to keep simple.\r\n\r\n\r\ni think approach (1) or something like it would have the benefit of mostly working \"today\" wrt how we use CPP, and checking/coverage could be done via some package level or module level enumeration of cpp value mappings that you wnat to be checked or even generated\r\n\r\napproach (2) adds a funny looking operation to core/haskell terms/types representation where you could carry around \"alternative expressions\" plus the \"selected expression\". and thus you could do some amount of syntax/type checking for those altnerative platforms? \r\n\r\neither way, this is just me jotting down some thoughts on this because its been discussed on and off for a while now as an eventual nice to have for ghc.\r\n\r\nAlso quite a complicated design space! :) ","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16239hadrian fails to "build" _build/docs/html/libraries/base/base.haddock2019-07-07T18:00:51ZAlp Mestanogullarihadrian fails to "build" _build/docs/html/libraries/base/base.haddock```sh
# running: build -V _validate-bug/docs/html/libraries/base/base.haddock
| Run Haddock BuildPackage: libraries/base/Control/Applicative.hs (and 236 more) => _validate-bug/docs/html/libraries/base/base.haddock
_validate-bug/stage1/bi...```sh
# running: build -V _validate-bug/docs/html/libraries/base/base.haddock
| Run Haddock BuildPackage: libraries/base/Control/Applicative.hs (and 236 more) => _validate-bug/docs/html/libraries/base/base.haddock
_validate-bug/stage1/bin/haddock --verbosity=0 -B_validate-bug/stage1/lib --lib=_validate-bug/stage1/lib --odir=_validate-bug/docs/html/libraries/base --no-tmp-comp-dir --dump-interface=_validate-bug/docs/html/libraries/base/base.haddock --html --hyperlinked-source --hoogle --quickjump '--title=base-4.12.0.0: Basic libraries' --prologue=_validate-bug/docs/html/libraries/base/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2220 --hide=Control.Monad.ST.Imp --hide=Control.Monad.ST.Lazy.Imp --hide=Data.Functor.Utils --hide=Data.OldList --hide=Data.Semigroup.Internal --hide=Data.Typeable.Internal --hide=Foreign.ForeignPtr.Imp --hide=GHC.StaticPtr.Internal --hide=System.Environment.ExecutablePath --hide=System.CPUTime.Utils --hide=GHC.Event.Arr --hide=GHC.Event.Array --hide=GHC.Event.Control --hide=GHC.Event.EPoll --hide=GHC.Event.IntTable --hide=GHC.Event.Internal --hide=GHC.Event.KQueue --hide=GHC.Event.Manager --hide=GHC.Event.PSQ --hide=GHC.Event.Poll --hide=GHC.Event.Thread --hide=GHC.Event.TimerManager --hide=GHC.Event.Unique --hide=System.CPUTime.Posix.ClockGetTime --hide=System.CPUTime.Posix.Times --hide=System.CPUTime.Posix.RUsage --hide=System.CPUTime.Unsupported --read-interface=../ghc-prim,../ghc-prim/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/ghc-prim/ghc-prim.haddock --read-interface=../integer-gmp,../integer-gmp/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/integer-gmp/integer-gmp.haddock --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-hide-all-packages --optghc=-no-user-package-db '--optghc=-this-unit-id base-4.12.0.0' '--optghc=-package-id ghc-prim-0.5.3' '--optghc=-package-id integer-gmp-1.0.2.0' '--optghc=-package-id rts-1.0' --optghc=-i --optghc=-i_validate-bug/stage1/libraries/base/build --optghc=-i_validate-bug/stage1/libraries/base/build/autogen --optghc=-ilibraries/base/. --optghc=-Iincludes --optghc=-I_validate-bug/generated --optghc=-I_validate-bug/stage1/libraries/base/build --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I_validate-bug/stage1/libraries/base/build/include --optghc=-Ilibraries/base/include --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/integer-gmp-1.0.2.0/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/rts-1.0/include --optghc=-I_validate-bug/generated --optghc=-optc-I_validate-bug/generated --optghc=-optP-include --optghc=-optP_validate-bug/stage1/libraries/base/build/autogen/cabal_macros.h --optghc=-outputdir --optghc=_validate-bug/stage1/libraries/base/build --optghc=-this-unit-id --optghc=base --optghc=-Wcompat --optghc=-Wnoncanonical-monad-instances --optghc=-XHaskell2010 --optghc=-ghcversion-file=/home/alp/WT/ghc-gitlab/_validate-bug/generated/ghcversion.h --optghc=-Wno-deprecated-flags --optghc=-Wno-trustworthy-safe libraries/base/Control/Applicative.hs libraries/base/Control/Arrow.hs libraries/base/Control/Category.hs libraries/base/Control/Concurrent.hs libraries/base/Control/Concurrent/Chan.hs libraries/base/Control/Concurrent/MVar.hs libraries/base/Control/Concurrent/QSem.hs libraries/base/Control/Concurrent/QSemN.hs libraries/base/Control/Exception.hs libraries/base/Control/Exception/Base.hs libraries/base/Control/Monad.hs libraries/base/Control/Monad/Fail.hs libraries/base/Control/Monad/Fix.hs libraries/base/Control/Monad/IO/Class.hs libraries/base/Control/Monad/Instances.hs libraries/base/Control/Monad/ST.hs libraries/base/Control/Monad/ST/Imp.hs libraries/base/Control/Monad/ST/Lazy.hs libraries/base/Control/Monad/ST/Lazy/Imp.hs libraries/base/Control/Monad/ST/Lazy/Safe.hs libraries/base/Control/Monad/ST/Lazy/Unsafe.hs libraries/base/Control/Monad/ST/Safe.hs libraries/base/Control/Monad/ST/Strict.hs libraries/base/Control/Monad/ST/Unsafe.hs libraries/base/Control/Monad/Zip.hs libraries/base/Data/Bifoldable.hs libraries/base/Data/Bifunctor.hs libraries/base/Data/Bitraversable.hs libraries/base/Data/Bits.hs libraries/base/Data/Bool.hs libraries/base/Data/Char.hs libraries/base/Data/Coerce.hs libraries/base/Data/Complex.hs libraries/base/Data/Data.hs libraries/base/Data/Dynamic.hs libraries/base/Data/Either.hs libraries/base/Data/Eq.hs libraries/base/Data/Fixed.hs libraries/base/Data/Foldable.hs libraries/base/Data/Function.hs libraries/base/Data/Functor.hs libraries/base/Data/Functor/Classes.hs libraries/base/Data/Functor/Compose.hs libraries/base/Data/Functor/Const.hs libraries/base/Data/Functor/Contravariant.hs libraries/base/Data/Functor/Identity.hs libraries/base/Data/Functor/Product.hs libraries/base/Data/Functor/Sum.hs libraries/base/Data/Functor/Utils.hs libraries/base/Data/IORef.hs libraries/base/Data/Int.hs libraries/base/Data/Ix.hs libraries/base/Data/Kind.hs libraries/base/Data/List.hs libraries/base/Data/List/NonEmpty.hs libraries/base/Data/Maybe.hs libraries/base/Data/Monoid.hs libraries/base/Data/OldList.hs libraries/base/Data/Ord.hs libraries/base/Data/Proxy.hs libraries/base/Data/Ratio.hs libraries/base/Data/STRef.hs libraries/base/Data/STRef/Lazy.hs libraries/base/Data/STRef/Strict.hs libraries/base/Data/Semigroup.hs libraries/base/Data/Semigroup/Internal.hs libraries/base/Data/String.hs libraries/base/Data/Traversable.hs libraries/base/Data/Tuple.hs libraries/base/Data/Type/Bool.hs libraries/base/Data/Type/Coercion.hs libraries/base/Data/Type/Equality.hs libraries/base/Data/Typeable.hs libraries/base/Data/Typeable/Internal.hs libraries/base/Data/Unique.hs libraries/base/Data/Version.hs libraries/base/Data/Void.hs libraries/base/Data/Word.hs libraries/base/Debug/Trace.hs libraries/base/Foreign.hs libraries/base/Foreign/C.hs libraries/base/Foreign/C/Error.hs libraries/base/Foreign/C/String.hs libraries/base/Foreign/C/Types.hs libraries/base/Foreign/Concurrent.hs libraries/base/Foreign/ForeignPtr.hs libraries/base/Foreign/ForeignPtr/Imp.hs libraries/base/Foreign/ForeignPtr/Safe.hs libraries/base/Foreign/ForeignPtr/Unsafe.hs libraries/base/Foreign/Marshal.hs libraries/base/Foreign/Marshal/Alloc.hs libraries/base/Foreign/Marshal/Array.hs libraries/base/Foreign/Marshal/Error.hs libraries/base/Foreign/Marshal/Pool.hs libraries/base/Foreign/Marshal/Safe.hs libraries/base/Foreign/Marshal/Unsafe.hs libraries/base/Foreign/Marshal/Utils.hs libraries/base/Foreign/Ptr.hs libraries/base/Foreign/Safe.hs libraries/base/Foreign/StablePtr.hs libraries/base/Foreign/Storable.hs libraries/base/GHC/Arr.hs libraries/base/GHC/Base.hs libraries/base/GHC/ByteOrder.hs libraries/base/GHC/Char.hs _validate-bug/stage1/libraries/base/build/GHC/Clock.hs libraries/base/GHC/Conc.hs libraries/base/GHC/Conc/IO.hs libraries/base/GHC/Conc/Signal.hs libraries/base/GHC/Conc/Sync.hs libraries/base/GHC/ConsoleHandler.hs libraries/base/GHC/Constants.hs libraries/base/GHC/Desugar.hs libraries/base/GHC/Enum.hs libraries/base/GHC/Environment.hs libraries/base/GHC/Err.hs libraries/base/GHC/Event.hs libraries/base/GHC/Event/Arr.hs libraries/base/GHC/Event/Array.hs libraries/base/GHC/Event/Control.hs _validate-bug/stage1/libraries/base/build/GHC/Event/EPoll.hs libraries/base/GHC/Event/IntTable.hs libraries/base/GHC/Event/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Event/KQueue.hs libraries/base/GHC/Event/Manager.hs libraries/base/GHC/Event/PSQ.hs _validate-bug/stage1/libraries/base/build/GHC/Event/Poll.hs libraries/base/GHC/Event/Thread.hs libraries/base/GHC/Event/TimerManager.hs libraries/base/GHC/Event/Unique.hs libraries/base/GHC/Exception.hs libraries/base/GHC/Exception/Type.hs libraries/base/GHC/ExecutionStack.hs _validate-bug/stage1/libraries/base/build/GHC/ExecutionStack/Internal.hs libraries/base/GHC/Exts.hs libraries/base/GHC/Fingerprint.hs libraries/base/GHC/Fingerprint/Type.hs libraries/base/GHC/Float.hs libraries/base/GHC/Float/ConversionUtils.hs libraries/base/GHC/Float/RealFracMethods.hs libraries/base/GHC/Foreign.hs libraries/base/GHC/ForeignPtr.hs libraries/base/GHC/GHCi.hs libraries/base/GHC/Generics.hs libraries/base/GHC/IO.hs libraries/base/GHC/IO/Buffer.hs libraries/base/GHC/IO/BufferedIO.hs libraries/base/GHC/IO/Device.hs libraries/base/GHC/IO/Encoding.hs libraries/base/GHC/IO/Encoding/CodePage.hs libraries/base/GHC/IO/Encoding/Failure.hs libraries/base/GHC/IO/Encoding/Iconv.hs libraries/base/GHC/IO/Encoding/Latin1.hs libraries/base/GHC/IO/Encoding/Types.hs libraries/base/GHC/IO/Encoding/UTF16.hs libraries/base/GHC/IO/Encoding/UTF32.hs libraries/base/GHC/IO/Encoding/UTF8.hs libraries/base/GHC/IO/Exception.hs libraries/base/GHC/IO/FD.hs libraries/base/GHC/IO/Handle.hs libraries/base/GHC/IO/Handle/FD.hs libraries/base/GHC/IO/Handle/Internals.hs _validate-bug/stage1/libraries/base/build/GHC/IO/Handle/Lock.hs libraries/base/GHC/IO/Handle/Text.hs libraries/base/GHC/IO/Handle/Types.hs libraries/base/GHC/IO/IOMode.hs libraries/base/GHC/IO/Unsafe.hs libraries/base/GHC/IOArray.hs libraries/base/GHC/IORef.hs libraries/base/GHC/Int.hs libraries/base/GHC/List.hs libraries/base/GHC/MVar.hs libraries/base/GHC/Maybe.hs libraries/base/GHC/Natural.hs libraries/base/GHC/Num.hs libraries/base/GHC/OldList.hs libraries/base/GHC/OverloadedLabels.hs libraries/base/GHC/Pack.hs libraries/base/GHC/Profiling.hs libraries/base/GHC/Ptr.hs _validate-bug/stage1/libraries/base/build/GHC/RTS/Flags.hs libraries/base/GHC/Read.hs libraries/base/GHC/Real.hs libraries/base/GHC/Records.hs libraries/base/GHC/ResponseFile.hs libraries/base/GHC/ST.hs libraries/base/GHC/STRef.hs libraries/base/GHC/Show.hs libraries/base/GHC/Stable.hs libraries/base/GHC/StableName.hs libraries/base/GHC/Stack.hs _validate-bug/stage1/libraries/base/build/GHC/Stack/CCS.hs libraries/base/GHC/Stack/Types.hs libraries/base/GHC/StaticPtr.hs libraries/base/GHC/StaticPtr/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Stats.hs libraries/base/GHC/Storable.hs libraries/base/GHC/TopHandler.hs libraries/base/GHC/TypeLits.hs libraries/base/GHC/TypeNats.hs libraries/base/GHC/Unicode.hs libraries/base/GHC/Weak.hs libraries/base/GHC/Word.hs libraries/base/Numeric.hs libraries/base/Numeric/Natural.hs libraries/base/Prelude.hs _validate-bug/stage1/libraries/base/build/System/CPUTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/ClockGetTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/RUsage.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/Times.hs libraries/base/System/CPUTime/Unsupported.hs libraries/base/System/CPUTime/Utils.hs libraries/base/System/Console/GetOpt.hs libraries/base/System/Environment.hs _validate-bug/stage1/libraries/base/build/System/Environment/Blank.hs _validate-bug/stage1/libraries/base/build/System/Environment/ExecutablePath.hs libraries/base/System/Exit.hs libraries/base/System/IO.hs libraries/base/System/IO/Error.hs libraries/base/System/IO/Unsafe.hs libraries/base/System/Info.hs libraries/base/System/Mem.hs libraries/base/System/Mem/StableName.hs libraries/base/System/Mem/Weak.hs libraries/base/System/Posix/Internals.hs libraries/base/System/Posix/Types.hs libraries/base/System/Timeout.hs libraries/base/Text/ParserCombinators/ReadP.hs libraries/base/Text/ParserCombinators/ReadPrec.hs libraries/base/Text/Printf.hs libraries/base/Text/Read.hs libraries/base/Text/Read/Lex.hs libraries/base/Text/Show.hs libraries/base/Text/Show/Functions.hs libraries/base/Type/Reflection.hs libraries/base/Type/Reflection/Unsafe.hs libraries/base/Unsafe/Coerce.hs +RTS -t_validate-bug/stage1/libraries/base/build/haddock.t --machine-readable -RTS
Warning: 'UAddr' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1025:40
* at libraries/base/GHC/Generics.hs:1094:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UAddr' defined at libraries/base/GHC/Generics.hs:1094:1
Warning: 'UChar' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1036:36
* at libraries/base/GHC/Generics.hs:1098:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UChar' defined at libraries/base/GHC/Generics.hs:1098:1
Warning: 'UDouble' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1048:38
* at libraries/base/GHC/Generics.hs:1103:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UDouble' defined at libraries/base/GHC/Generics.hs:1103:1
Warning: 'UFloat' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1060:37
* at libraries/base/GHC/Generics.hs:1108:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UFloat' defined at libraries/base/GHC/Generics.hs:1108:1
Warning: 'UInt' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1070:35
* at libraries/base/GHC/Generics.hs:1113:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UInt' defined at libraries/base/GHC/Generics.hs:1113:1
Warning: 'UWord' is ambiguous. It is defined
* at libraries/base/GHC/Generics.hs:1082:36
* at libraries/base/GHC/Generics.hs:1118:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'UWord' defined at libraries/base/GHC/Generics.hs:1118:1
Warning: 'IOError' is ambiguous. It is defined
* at libraries/base/GHC/IO/Exception.hs:331:4
* at libraries/base/GHC/IO/Exception.hs:324:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1
Warning: 'IOError' is ambiguous. It is defined
* at libraries/base/GHC/IO/Exception.hs:331:4
* at libraries/base/GHC/IO/Exception.hs:324:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1
Warning: 'IOError' is ambiguous. It is defined
* at libraries/base/GHC/IO/Exception.hs:331:4
* at libraries/base/GHC/IO/Exception.hs:324:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1
Warning: 'flock' is out of scope.
If you qualify the identifier, haddock can try to link it anyway.
Warning: 'LockFileEx' is out of scope.
If you qualify the identifier, haddock can try to link it anyway.
Warning: 'FileLockingNotImplemented' is out of scope.
If you qualify the identifier, haddock can try to link it anyway.
Warning: 'IOError' is ambiguous. It is defined
* at libraries/base/GHC/IO/Exception.hs:331:4
* at libraries/base/GHC/IO/Exception.hs:324:1
You may be able to disambiguate the identifier by qualifying it or
by hiding some imports.
Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1
Warning: 'ExitException' is out of scope.
If you qualify the identifier, haddock can try to link it anyway.
Warning: 'mtimes' is out of scope.
If you qualify the identifier, haddock can try to link it anyway.
Warning: GHC.Word: could not find link destinations for:
D:R:UReckWordp0
Warning: GHC.Float: could not find link destinations for:
D:R:UReckFloatp0 D:R:UReckDoublep0
Warning: Text.Read.Lex: could not find link destinations for:
guard
Warning: GHC.Ptr: could not find link destinations for:
D:R:UReckPtrp0
Warning: GHC.Int: could not find link destinations for:
D:R:UReckIntp0
Warning: Data.Int: could not find link destinations for:
D:R:UReckIntp0
Warning: Foreign.Ptr: could not find link destinations for:
D:R:UReckPtrp0
Warning: Data.Word: could not find link destinations for:
D:R:UReckWordp0
Warning: Data.Type.Equality: could not find link destinations for:
~#
Warning: Data.Char: could not find link destinations for:
D:R:UReckCharp0
Warning: GHC.TypeNats: could not find link destinations for:
natSing
Warning: GHC.TypeLits: could not find link destinations for:
natSing symbolSing
Warning: GHC.Generics: could not find link destinations for:
D:R:UReckWordp0 D:R:UReckIntp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckCharp0 D:R:UReckPtrp0 SingI SingKind
Warning: Type.Reflection: could not find link destinations for:
typeRep# IsApplication
Warning: Data.Typeable: could not find link destinations for:
typeRep#
Warning: GHC.IO: could not find link destinations for:
hspr UPrintf spr
Warning: GHC.ForeignPtr: could not find link destinations for:
Finalizers
Warning: GHC.Foreign: could not find link destinations for:
CString CStringLen
Warning: Data.Dynamic: could not find link destinations for:
typeRep#
Warning: System.IO: could not find link destinations for:
hspr UPrintf spr
Warning: Prelude: could not find link destinations for:
D:R:UReckCharp0 D:R:UReckIntp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckWordp0 hspr UPrintf spr
Warning: Text.Printf: could not find link destinations for:
spr UPrintf hspr
Warning: GHC.ExecutionStack.Internal: could not find link destinations for:
locationSize
Warning: GHC.Exts: could not find link destinations for:
D:R:UReckIntp0 D:R:UReckWordp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckCharp0 D:R:UReckPtrp0 ~#
shakeArgsWith 0.000s 0%
Function shake 0.005s 0%
Database read 0.479s 0%
With database 0.037s 0%
Running rules 62.764s 99% =========================
Total 63.285s 100%
Error when running Shake build system:
at src/Main.hs:58:30-42:
* Depends on: _validate-bug/docs/html/libraries/base/base.haddock
* Raised the exception:
user error (Development.Shake.cmd, system command failed
Command: _validate-bug/stage1/bin/haddock --verbosity=0 -B_validate-bug/stage1/lib --lib=_validate-bug/stage1/lib --odir=_validate-bug/docs/html/libraries/base --no-tmp-comp-dir --dump-interface=_validate-bug/docs/html/libraries/base/base.haddock --html --hyperlinked-source --hoogle --quickjump '--title=base-4.12.0.0: Basic libraries' --prologue=_validate-bug/docs/html/libraries/base/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2220 --hide=Control.Monad.ST.Imp --hide=Control.Monad.ST.Lazy.Imp --hide=Data.Functor.Utils --hide=Data.OldList --hide=Data.Semigroup.Internal --hide=Data.Typeable.Internal --hide=Foreign.ForeignPtr.Imp --hide=GHC.StaticPtr.Internal --hide=System.Environment.ExecutablePath --hide=System.CPUTime.Utils --hide=GHC.Event.Arr --hide=GHC.Event.Array --hide=GHC.Event.Control --hide=GHC.Event.EPoll --hide=GHC.Event.IntTable --hide=GHC.Event.Internal --hide=GHC.Event.KQueue --hide=GHC.Event.Manager --hide=GHC.Event.PSQ --hide=GHC.Event.Poll --hide=GHC.Event.Thread --hide=GHC.Event.TimerManager --hide=GHC.Event.Unique --hide=System.CPUTime.Posix.ClockGetTime --hide=System.CPUTime.Posix.Times --hide=System.CPUTime.Posix.RUsage --hide=System.CPUTime.Unsupported --read-interface=../ghc-prim,../ghc-prim/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/ghc-prim/ghc-prim.haddock --read-interface=../integer-gmp,../integer-gmp/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/integer-gmp/integer-gmp.haddock --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-hide-all-packages --optghc=-no-user-package-db '--optghc=-this-unit-id base-4.12.0.0' '--optghc=-package-id ghc-prim-0.5.3' '--optghc=-package-id integer-gmp-1.0.2.0' '--optghc=-package-id rts-1.0' --optghc=-i --optghc=-i_validate-bug/stage1/libraries/base/build --optghc=-i_validate-bug/stage1/libraries/base/build/autogen --optghc=-ilibraries/base/. --optghc=-Iincludes --optghc=-I_validate-bug/generated --optghc=-I_validate-bug/stage1/libraries/base/build --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I_validate-bug/stage1/libraries/base/build/include --optghc=-Ilibraries/base/include --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/integer-gmp-1.0.2.0/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/rts-1.0/include --optghc=-I_validate-bug/generated --optghc=-optc-I_validate-bug/generated --optghc=-optP-include --optghc=-optP_validate-bug/stage1/libraries/base/build/autogen/cabal_macros.h --optghc=-outputdir --optghc=_validate-bug/stage1/libraries/base/build --optghc=-this-unit-id --optghc=base --optghc=-Wcompat --optghc=-Wnoncanonical-monad-instances --optghc=-XHaskell2010 --optghc=-ghcversion-file=/home/alp/WT/ghc-gitlab/_validate-bug/generated/ghcversion.h --optghc=-Wno-deprecated-flags --optghc=-Wno-trustworthy-safe libraries/base/Control/Applicative.hs libraries/base/Control/Arrow.hs libraries/base/Control/Category.hs libraries/base/Control/Concurrent.hs libraries/base/Control/Concurrent/Chan.hs libraries/base/Control/Concurrent/MVar.hs libraries/base/Control/Concurrent/QSem.hs libraries/base/Control/Concurrent/QSemN.hs libraries/base/Control/Exception.hs libraries/base/Control/Exception/Base.hs libraries/base/Control/Monad.hs libraries/base/Control/Monad/Fail.hs libraries/base/Control/Monad/Fix.hs libraries/base/Control/Monad/IO/Class.hs libraries/base/Control/Monad/Instances.hs libraries/base/Control/Monad/ST.hs libraries/base/Control/Monad/ST/Imp.hs libraries/base/Control/Monad/ST/Lazy.hs libraries/base/Control/Monad/ST/Lazy/Imp.hs libraries/base/Control/Monad/ST/Lazy/Safe.hs libraries/base/Control/Monad/ST/Lazy/Unsafe.hs libraries/base/Control/Monad/ST/Safe.hs libraries/base/Control/Monad/ST/Strict.hs libraries/base/Control/Monad/ST/Unsafe.hs libraries/base/Control/Monad/Zip.hs libraries/base/Data/Bifoldable.hs libraries/base/Data/Bifunctor.hs libraries/base/Data/Bitraversable.hs libraries/base/Data/Bits.hs libraries/base/Data/Bool.hs libraries/base/Data/Char.hs libraries/base/Data/Coerce.hs libraries/base/Data/Complex.hs libraries/base/Data/Data.hs libraries/base/Data/Dynamic.hs libraries/base/Data/Either.hs libraries/base/Data/Eq.hs libraries/base/Data/Fixed.hs libraries/base/Data/Foldable.hs libraries/base/Data/Function.hs libraries/base/Data/Functor.hs libraries/base/Data/Functor/Classes.hs libraries/base/Data/Functor/Compose.hs libraries/base/Data/Functor/Const.hs libraries/base/Data/Functor/Contravariant.hs libraries/base/Data/Functor/Identity.hs libraries/base/Data/Functor/Product.hs libraries/base/Data/Functor/Sum.hs libraries/base/Data/Functor/Utils.hs libraries/base/Data/IORef.hs libraries/base/Data/Int.hs libraries/base/Data/Ix.hs libraries/base/Data/Kind.hs libraries/base/Data/List.hs libraries/base/Data/List/NonEmpty.hs libraries/base/Data/Maybe.hs libraries/base/Data/Monoid.hs libraries/base/Data/OldList.hs libraries/base/Data/Ord.hs libraries/base/Data/Proxy.hs libraries/base/Data/Ratio.hs libraries/base/Data/STRef.hs libraries/base/Data/STRef/Lazy.hs libraries/base/Data/STRef/Strict.hs libraries/base/Data/Semigroup.hs libraries/base/Data/Semigroup/Internal.hs libraries/base/Data/String.hs libraries/base/Data/Traversable.hs libraries/base/Data/Tuple.hs libraries/base/Data/Type/Bool.hs libraries/base/Data/Type/Coercion.hs libraries/base/Data/Type/Equality.hs libraries/base/Data/Typeable.hs libraries/base/Data/Typeable/Internal.hs libraries/base/Data/Unique.hs libraries/base/Data/Version.hs libraries/base/Data/Void.hs libraries/base/Data/Word.hs libraries/base/Debug/Trace.hs libraries/base/Foreign.hs libraries/base/Foreign/C.hs libraries/base/Foreign/C/Error.hs libraries/base/Foreign/C/String.hs libraries/base/Foreign/C/Types.hs libraries/base/Foreign/Concurrent.hs libraries/base/Foreign/ForeignPtr.hs libraries/base/Foreign/ForeignPtr/Imp.hs libraries/base/Foreign/ForeignPtr/Safe.hs libraries/base/Foreign/ForeignPtr/Unsafe.hs libraries/base/Foreign/Marshal.hs libraries/base/Foreign/Marshal/Alloc.hs libraries/base/Foreign/Marshal/Array.hs libraries/base/Foreign/Marshal/Error.hs libraries/base/Foreign/Marshal/Pool.hs libraries/base/Foreign/Marshal/Safe.hs libraries/base/Foreign/Marshal/Unsafe.hs libraries/base/Foreign/Marshal/Utils.hs libraries/base/Foreign/Ptr.hs libraries/base/Foreign/Safe.hs libraries/base/Foreign/StablePtr.hs libraries/base/Foreign/Storable.hs libraries/base/GHC/Arr.hs libraries/base/GHC/Base.hs libraries/base/GHC/ByteOrder.hs libraries/base/GHC/Char.hs _validate-bug/stage1/libraries/base/build/GHC/Clock.hs libraries/base/GHC/Conc.hs libraries/base/GHC/Conc/IO.hs libraries/base/GHC/Conc/Signal.hs libraries/base/GHC/Conc/Sync.hs libraries/base/GHC/ConsoleHandler.hs libraries/base/GHC/Constants.hs libraries/base/GHC/Desugar.hs libraries/base/GHC/Enum.hs libraries/base/GHC/Environment.hs libraries/base/GHC/Err.hs libraries/base/GHC/Event.hs libraries/base/GHC/Event/Arr.hs libraries/base/GHC/Event/Array.hs libraries/base/GHC/Event/Control.hs _validate-bug/stage1/libraries/base/build/GHC/Event/EPoll.hs libraries/base/GHC/Event/IntTable.hs libraries/base/GHC/Event/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Event/KQueue.hs libraries/base/GHC/Event/Manager.hs libraries/base/GHC/Event/PSQ.hs _validate-bug/stage1/libraries/base/build/GHC/Event/Poll.hs libraries/base/GHC/Event/Thread.hs libraries/base/GHC/Event/TimerManager.hs libraries/base/GHC/Event/Unique.hs libraries/base/GHC/Exception.hs libraries/base/GHC/Exception/Type.hs libraries/base/GHC/ExecutionStack.hs _validate-bug/stage1/libraries/base/build/GHC/ExecutionStack/Internal.hs libraries/base/GHC/Exts.hs libraries/base/GHC/Fingerprint.hs libraries/base/GHC/Fingerprint/Type.hs libraries/base/GHC/Float.hs libraries/base/GHC/Float/ConversionUtils.hs libraries/base/GHC/Float/RealFracMethods.hs libraries/base/GHC/Foreign.hs libraries/base/GHC/ForeignPtr.hs libraries/base/GHC/GHCi.hs libraries/base/GHC/Generics.hs libraries/base/GHC/IO.hs libraries/base/GHC/IO/Buffer.hs libraries/base/GHC/IO/BufferedIO.hs libraries/base/GHC/IO/Device.hs libraries/base/GHC/IO/Encoding.hs libraries/base/GHC/IO/Encoding/CodePage.hs libraries/base/GHC/IO/Encoding/Failure.hs libraries/base/GHC/IO/Encoding/Iconv.hs libraries/base/GHC/IO/Encoding/Latin1.hs libraries/base/GHC/IO/Encoding/Types.hs libraries/base/GHC/IO/Encoding/UTF16.hs libraries/base/GHC/IO/Encoding/UTF32.hs libraries/base/GHC/IO/Encoding/UTF8.hs libraries/base/GHC/IO/Exception.hs libraries/base/GHC/IO/FD.hs libraries/base/GHC/IO/Handle.hs libraries/base/GHC/IO/Handle/FD.hs libraries/base/GHC/IO/Handle/Internals.hs _validate-bug/stage1/libraries/base/build/GHC/IO/Handle/Lock.hs libraries/base/GHC/IO/Handle/Text.hs libraries/base/GHC/IO/Handle/Types.hs libraries/base/GHC/IO/IOMode.hs libraries/base/GHC/IO/Unsafe.hs libraries/base/GHC/IOArray.hs libraries/base/GHC/IORef.hs libraries/base/GHC/Int.hs libraries/base/GHC/List.hs libraries/base/GHC/MVar.hs libraries/base/GHC/Maybe.hs libraries/base/GHC/Natural.hs libraries/base/GHC/Num.hs libraries/base/GHC/OldList.hs libraries/base/GHC/OverloadedLabels.hs libraries/base/GHC/Pack.hs libraries/base/GHC/Profiling.hs libraries/base/GHC/Ptr.hs _validate-bug/stage1/libraries/base/build/GHC/RTS/Flags.hs libraries/base/GHC/Read.hs libraries/base/GHC/Real.hs libraries/base/GHC/Records.hs libraries/base/GHC/ResponseFile.hs libraries/base/GHC/ST.hs libraries/base/GHC/STRef.hs libraries/base/GHC/Show.hs libraries/base/GHC/Stable.hs libraries/base/GHC/StableName.hs libraries/base/GHC/Stack.hs _validate-bug/stage1/libraries/base/build/GHC/Stack/CCS.hs libraries/base/GHC/Stack/Types.hs libraries/base/GHC/StaticPtr.hs libraries/base/GHC/StaticPtr/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Stats.hs libraries/base/GHC/Storable.hs libraries/base/GHC/TopHandler.hs libraries/base/GHC/TypeLits.hs libraries/base/GHC/TypeNats.hs libraries/base/GHC/Unicode.hs libraries/base/GHC/Weak.hs libraries/base/GHC/Word.hs libraries/base/Numeric.hs libraries/base/Numeric/Natural.hs libraries/base/Prelude.hs _validate-bug/stage1/libraries/base/build/System/CPUTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/ClockGetTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/RUsage.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/Times.hs libraries/base/System/CPUTime/Unsupported.hs libraries/base/System/CPUTime/Utils.hs libraries/base/System/Console/GetOpt.hs libraries/base/System/Environment.hs _validate-bug/stage1/libraries/base/build/System/Environment/Blank.hs _validate-bug/stage1/libraries/base/build/System/Environment/ExecutablePath.hs libraries/base/System/Exit.hs libraries/base/System/IO.hs libraries/base/System/IO/Error.hs libraries/base/System/IO/Unsafe.hs libraries/base/System/Info.hs libraries/base/System/Mem.hs libraries/base/System/Mem/StableName.hs libraries/base/System/Mem/Weak.hs libraries/base/System/Posix/Internals.hs libraries/base/System/Posix/Types.hs libraries/base/System/Timeout.hs libraries/base/Text/ParserCombinators/ReadP.hs libraries/base/Text/ParserCombinators/ReadPrec.hs libraries/base/Text/Printf.hs libraries/base/Text/Read.hs libraries/base/Text/Read/Lex.hs libraries/base/Text/Show.hs libraries/base/Text/Show/Functions.hs libraries/base/Type/Reflection.hs libraries/base/Type/Reflection/Unsafe.hs libraries/base/Unsafe/Coerce.hs +RTS -t_validate-bug/stage1/libraries/base/build/haddock.t --machine-readable -RTS
Exit code: -11
Stderr:
)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------ |
| Version | 8.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Build System (Hadrian) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | harpocrates, snowleopard |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"hadrian fails to \"build\" _build/docs/html/libraries/base/base.haddock","status":"New","operating_system":"","component":"Build System (Hadrian)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.7","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["harpocrates","snowleopard"],"type":"Bug","description":"{{{ #!sh\r\n# running: build -V _validate-bug/docs/html/libraries/base/base.haddock\r\n| Run Haddock BuildPackage: libraries/base/Control/Applicative.hs (and 236 more) => _validate-bug/docs/html/libraries/base/base.haddock\r\n_validate-bug/stage1/bin/haddock --verbosity=0 -B_validate-bug/stage1/lib --lib=_validate-bug/stage1/lib --odir=_validate-bug/docs/html/libraries/base --no-tmp-comp-dir --dump-interface=_validate-bug/docs/html/libraries/base/base.haddock --html --hyperlinked-source --hoogle --quickjump '--title=base-4.12.0.0: Basic libraries' --prologue=_validate-bug/docs/html/libraries/base/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2220 --hide=Control.Monad.ST.Imp --hide=Control.Monad.ST.Lazy.Imp --hide=Data.Functor.Utils --hide=Data.OldList --hide=Data.Semigroup.Internal --hide=Data.Typeable.Internal --hide=Foreign.ForeignPtr.Imp --hide=GHC.StaticPtr.Internal --hide=System.Environment.ExecutablePath --hide=System.CPUTime.Utils --hide=GHC.Event.Arr --hide=GHC.Event.Array --hide=GHC.Event.Control --hide=GHC.Event.EPoll --hide=GHC.Event.IntTable --hide=GHC.Event.Internal --hide=GHC.Event.KQueue --hide=GHC.Event.Manager --hide=GHC.Event.PSQ --hide=GHC.Event.Poll --hide=GHC.Event.Thread --hide=GHC.Event.TimerManager --hide=GHC.Event.Unique --hide=System.CPUTime.Posix.ClockGetTime --hide=System.CPUTime.Posix.Times --hide=System.CPUTime.Posix.RUsage --hide=System.CPUTime.Unsupported --read-interface=../ghc-prim,../ghc-prim/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/ghc-prim/ghc-prim.haddock --read-interface=../integer-gmp,../integer-gmp/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/integer-gmp/integer-gmp.haddock --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-hide-all-packages --optghc=-no-user-package-db '--optghc=-this-unit-id base-4.12.0.0' '--optghc=-package-id ghc-prim-0.5.3' '--optghc=-package-id integer-gmp-1.0.2.0' '--optghc=-package-id rts-1.0' --optghc=-i --optghc=-i_validate-bug/stage1/libraries/base/build --optghc=-i_validate-bug/stage1/libraries/base/build/autogen --optghc=-ilibraries/base/. --optghc=-Iincludes --optghc=-I_validate-bug/generated --optghc=-I_validate-bug/stage1/libraries/base/build --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I_validate-bug/stage1/libraries/base/build/include --optghc=-Ilibraries/base/include --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/integer-gmp-1.0.2.0/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/rts-1.0/include --optghc=-I_validate-bug/generated --optghc=-optc-I_validate-bug/generated --optghc=-optP-include --optghc=-optP_validate-bug/stage1/libraries/base/build/autogen/cabal_macros.h --optghc=-outputdir --optghc=_validate-bug/stage1/libraries/base/build --optghc=-this-unit-id --optghc=base --optghc=-Wcompat --optghc=-Wnoncanonical-monad-instances --optghc=-XHaskell2010 --optghc=-ghcversion-file=/home/alp/WT/ghc-gitlab/_validate-bug/generated/ghcversion.h --optghc=-Wno-deprecated-flags --optghc=-Wno-trustworthy-safe libraries/base/Control/Applicative.hs libraries/base/Control/Arrow.hs libraries/base/Control/Category.hs libraries/base/Control/Concurrent.hs libraries/base/Control/Concurrent/Chan.hs libraries/base/Control/Concurrent/MVar.hs libraries/base/Control/Concurrent/QSem.hs libraries/base/Control/Concurrent/QSemN.hs libraries/base/Control/Exception.hs libraries/base/Control/Exception/Base.hs libraries/base/Control/Monad.hs libraries/base/Control/Monad/Fail.hs libraries/base/Control/Monad/Fix.hs libraries/base/Control/Monad/IO/Class.hs libraries/base/Control/Monad/Instances.hs libraries/base/Control/Monad/ST.hs libraries/base/Control/Monad/ST/Imp.hs libraries/base/Control/Monad/ST/Lazy.hs libraries/base/Control/Monad/ST/Lazy/Imp.hs libraries/base/Control/Monad/ST/Lazy/Safe.hs libraries/base/Control/Monad/ST/Lazy/Unsafe.hs libraries/base/Control/Monad/ST/Safe.hs libraries/base/Control/Monad/ST/Strict.hs libraries/base/Control/Monad/ST/Unsafe.hs libraries/base/Control/Monad/Zip.hs libraries/base/Data/Bifoldable.hs libraries/base/Data/Bifunctor.hs libraries/base/Data/Bitraversable.hs libraries/base/Data/Bits.hs libraries/base/Data/Bool.hs libraries/base/Data/Char.hs libraries/base/Data/Coerce.hs libraries/base/Data/Complex.hs libraries/base/Data/Data.hs libraries/base/Data/Dynamic.hs libraries/base/Data/Either.hs libraries/base/Data/Eq.hs libraries/base/Data/Fixed.hs libraries/base/Data/Foldable.hs libraries/base/Data/Function.hs libraries/base/Data/Functor.hs libraries/base/Data/Functor/Classes.hs libraries/base/Data/Functor/Compose.hs libraries/base/Data/Functor/Const.hs libraries/base/Data/Functor/Contravariant.hs libraries/base/Data/Functor/Identity.hs libraries/base/Data/Functor/Product.hs libraries/base/Data/Functor/Sum.hs libraries/base/Data/Functor/Utils.hs libraries/base/Data/IORef.hs libraries/base/Data/Int.hs libraries/base/Data/Ix.hs libraries/base/Data/Kind.hs libraries/base/Data/List.hs libraries/base/Data/List/NonEmpty.hs libraries/base/Data/Maybe.hs libraries/base/Data/Monoid.hs libraries/base/Data/OldList.hs libraries/base/Data/Ord.hs libraries/base/Data/Proxy.hs libraries/base/Data/Ratio.hs libraries/base/Data/STRef.hs libraries/base/Data/STRef/Lazy.hs libraries/base/Data/STRef/Strict.hs libraries/base/Data/Semigroup.hs libraries/base/Data/Semigroup/Internal.hs libraries/base/Data/String.hs libraries/base/Data/Traversable.hs libraries/base/Data/Tuple.hs libraries/base/Data/Type/Bool.hs libraries/base/Data/Type/Coercion.hs libraries/base/Data/Type/Equality.hs libraries/base/Data/Typeable.hs libraries/base/Data/Typeable/Internal.hs libraries/base/Data/Unique.hs libraries/base/Data/Version.hs libraries/base/Data/Void.hs libraries/base/Data/Word.hs libraries/base/Debug/Trace.hs libraries/base/Foreign.hs libraries/base/Foreign/C.hs libraries/base/Foreign/C/Error.hs libraries/base/Foreign/C/String.hs libraries/base/Foreign/C/Types.hs libraries/base/Foreign/Concurrent.hs libraries/base/Foreign/ForeignPtr.hs libraries/base/Foreign/ForeignPtr/Imp.hs libraries/base/Foreign/ForeignPtr/Safe.hs libraries/base/Foreign/ForeignPtr/Unsafe.hs libraries/base/Foreign/Marshal.hs libraries/base/Foreign/Marshal/Alloc.hs libraries/base/Foreign/Marshal/Array.hs libraries/base/Foreign/Marshal/Error.hs libraries/base/Foreign/Marshal/Pool.hs libraries/base/Foreign/Marshal/Safe.hs libraries/base/Foreign/Marshal/Unsafe.hs libraries/base/Foreign/Marshal/Utils.hs libraries/base/Foreign/Ptr.hs libraries/base/Foreign/Safe.hs libraries/base/Foreign/StablePtr.hs libraries/base/Foreign/Storable.hs libraries/base/GHC/Arr.hs libraries/base/GHC/Base.hs libraries/base/GHC/ByteOrder.hs libraries/base/GHC/Char.hs _validate-bug/stage1/libraries/base/build/GHC/Clock.hs libraries/base/GHC/Conc.hs libraries/base/GHC/Conc/IO.hs libraries/base/GHC/Conc/Signal.hs libraries/base/GHC/Conc/Sync.hs libraries/base/GHC/ConsoleHandler.hs libraries/base/GHC/Constants.hs libraries/base/GHC/Desugar.hs libraries/base/GHC/Enum.hs libraries/base/GHC/Environment.hs libraries/base/GHC/Err.hs libraries/base/GHC/Event.hs libraries/base/GHC/Event/Arr.hs libraries/base/GHC/Event/Array.hs libraries/base/GHC/Event/Control.hs _validate-bug/stage1/libraries/base/build/GHC/Event/EPoll.hs libraries/base/GHC/Event/IntTable.hs libraries/base/GHC/Event/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Event/KQueue.hs libraries/base/GHC/Event/Manager.hs libraries/base/GHC/Event/PSQ.hs _validate-bug/stage1/libraries/base/build/GHC/Event/Poll.hs libraries/base/GHC/Event/Thread.hs libraries/base/GHC/Event/TimerManager.hs libraries/base/GHC/Event/Unique.hs libraries/base/GHC/Exception.hs libraries/base/GHC/Exception/Type.hs libraries/base/GHC/ExecutionStack.hs _validate-bug/stage1/libraries/base/build/GHC/ExecutionStack/Internal.hs libraries/base/GHC/Exts.hs libraries/base/GHC/Fingerprint.hs libraries/base/GHC/Fingerprint/Type.hs libraries/base/GHC/Float.hs libraries/base/GHC/Float/ConversionUtils.hs libraries/base/GHC/Float/RealFracMethods.hs libraries/base/GHC/Foreign.hs libraries/base/GHC/ForeignPtr.hs libraries/base/GHC/GHCi.hs libraries/base/GHC/Generics.hs libraries/base/GHC/IO.hs libraries/base/GHC/IO/Buffer.hs libraries/base/GHC/IO/BufferedIO.hs libraries/base/GHC/IO/Device.hs libraries/base/GHC/IO/Encoding.hs libraries/base/GHC/IO/Encoding/CodePage.hs libraries/base/GHC/IO/Encoding/Failure.hs libraries/base/GHC/IO/Encoding/Iconv.hs libraries/base/GHC/IO/Encoding/Latin1.hs libraries/base/GHC/IO/Encoding/Types.hs libraries/base/GHC/IO/Encoding/UTF16.hs libraries/base/GHC/IO/Encoding/UTF32.hs libraries/base/GHC/IO/Encoding/UTF8.hs libraries/base/GHC/IO/Exception.hs libraries/base/GHC/IO/FD.hs libraries/base/GHC/IO/Handle.hs libraries/base/GHC/IO/Handle/FD.hs libraries/base/GHC/IO/Handle/Internals.hs _validate-bug/stage1/libraries/base/build/GHC/IO/Handle/Lock.hs libraries/base/GHC/IO/Handle/Text.hs libraries/base/GHC/IO/Handle/Types.hs libraries/base/GHC/IO/IOMode.hs libraries/base/GHC/IO/Unsafe.hs libraries/base/GHC/IOArray.hs libraries/base/GHC/IORef.hs libraries/base/GHC/Int.hs libraries/base/GHC/List.hs libraries/base/GHC/MVar.hs libraries/base/GHC/Maybe.hs libraries/base/GHC/Natural.hs libraries/base/GHC/Num.hs libraries/base/GHC/OldList.hs libraries/base/GHC/OverloadedLabels.hs libraries/base/GHC/Pack.hs libraries/base/GHC/Profiling.hs libraries/base/GHC/Ptr.hs _validate-bug/stage1/libraries/base/build/GHC/RTS/Flags.hs libraries/base/GHC/Read.hs libraries/base/GHC/Real.hs libraries/base/GHC/Records.hs libraries/base/GHC/ResponseFile.hs libraries/base/GHC/ST.hs libraries/base/GHC/STRef.hs libraries/base/GHC/Show.hs libraries/base/GHC/Stable.hs libraries/base/GHC/StableName.hs libraries/base/GHC/Stack.hs _validate-bug/stage1/libraries/base/build/GHC/Stack/CCS.hs libraries/base/GHC/Stack/Types.hs libraries/base/GHC/StaticPtr.hs libraries/base/GHC/StaticPtr/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Stats.hs libraries/base/GHC/Storable.hs libraries/base/GHC/TopHandler.hs libraries/base/GHC/TypeLits.hs libraries/base/GHC/TypeNats.hs libraries/base/GHC/Unicode.hs libraries/base/GHC/Weak.hs libraries/base/GHC/Word.hs libraries/base/Numeric.hs libraries/base/Numeric/Natural.hs libraries/base/Prelude.hs _validate-bug/stage1/libraries/base/build/System/CPUTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/ClockGetTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/RUsage.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/Times.hs libraries/base/System/CPUTime/Unsupported.hs libraries/base/System/CPUTime/Utils.hs libraries/base/System/Console/GetOpt.hs libraries/base/System/Environment.hs _validate-bug/stage1/libraries/base/build/System/Environment/Blank.hs _validate-bug/stage1/libraries/base/build/System/Environment/ExecutablePath.hs libraries/base/System/Exit.hs libraries/base/System/IO.hs libraries/base/System/IO/Error.hs libraries/base/System/IO/Unsafe.hs libraries/base/System/Info.hs libraries/base/System/Mem.hs libraries/base/System/Mem/StableName.hs libraries/base/System/Mem/Weak.hs libraries/base/System/Posix/Internals.hs libraries/base/System/Posix/Types.hs libraries/base/System/Timeout.hs libraries/base/Text/ParserCombinators/ReadP.hs libraries/base/Text/ParserCombinators/ReadPrec.hs libraries/base/Text/Printf.hs libraries/base/Text/Read.hs libraries/base/Text/Read/Lex.hs libraries/base/Text/Show.hs libraries/base/Text/Show/Functions.hs libraries/base/Type/Reflection.hs libraries/base/Type/Reflection/Unsafe.hs libraries/base/Unsafe/Coerce.hs +RTS -t_validate-bug/stage1/libraries/base/build/haddock.t --machine-readable -RTS\r\nWarning: 'UAddr' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1025:40\r\n * at libraries/base/GHC/Generics.hs:1094:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UAddr' defined at libraries/base/GHC/Generics.hs:1094:1\r\nWarning: 'UChar' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1036:36\r\n * at libraries/base/GHC/Generics.hs:1098:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UChar' defined at libraries/base/GHC/Generics.hs:1098:1\r\nWarning: 'UDouble' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1048:38\r\n * at libraries/base/GHC/Generics.hs:1103:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UDouble' defined at libraries/base/GHC/Generics.hs:1103:1\r\nWarning: 'UFloat' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1060:37\r\n * at libraries/base/GHC/Generics.hs:1108:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UFloat' defined at libraries/base/GHC/Generics.hs:1108:1\r\nWarning: 'UInt' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1070:35\r\n * at libraries/base/GHC/Generics.hs:1113:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UInt' defined at libraries/base/GHC/Generics.hs:1113:1\r\nWarning: 'UWord' is ambiguous. It is defined\r\n * at libraries/base/GHC/Generics.hs:1082:36\r\n * at libraries/base/GHC/Generics.hs:1118:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'UWord' defined at libraries/base/GHC/Generics.hs:1118:1\r\nWarning: 'IOError' is ambiguous. It is defined\r\n * at libraries/base/GHC/IO/Exception.hs:331:4\r\n * at libraries/base/GHC/IO/Exception.hs:324:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1\r\nWarning: 'IOError' is ambiguous. It is defined\r\n * at libraries/base/GHC/IO/Exception.hs:331:4\r\n * at libraries/base/GHC/IO/Exception.hs:324:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1\r\nWarning: 'IOError' is ambiguous. It is defined\r\n * at libraries/base/GHC/IO/Exception.hs:331:4\r\n * at libraries/base/GHC/IO/Exception.hs:324:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1\r\nWarning: 'flock' is out of scope.\r\n If you qualify the identifier, haddock can try to link it anyway.\r\nWarning: 'LockFileEx' is out of scope.\r\n If you qualify the identifier, haddock can try to link it anyway.\r\nWarning: 'FileLockingNotImplemented' is out of scope.\r\n If you qualify the identifier, haddock can try to link it anyway.\r\nWarning: 'IOError' is ambiguous. It is defined\r\n * at libraries/base/GHC/IO/Exception.hs:331:4\r\n * at libraries/base/GHC/IO/Exception.hs:324:1\r\n You may be able to disambiguate the identifier by qualifying it or\r\n by hiding some imports.\r\n Defaulting to 'IOError' defined at libraries/base/GHC/IO/Exception.hs:330:1\r\nWarning: 'ExitException' is out of scope.\r\n If you qualify the identifier, haddock can try to link it anyway.\r\nWarning: 'mtimes' is out of scope.\r\n If you qualify the identifier, haddock can try to link it anyway.\r\nWarning: GHC.Word: could not find link destinations for:\r\n D:R:UReckWordp0\r\nWarning: GHC.Float: could not find link destinations for:\r\n D:R:UReckFloatp0 D:R:UReckDoublep0\r\nWarning: Text.Read.Lex: could not find link destinations for:\r\n guard\r\nWarning: GHC.Ptr: could not find link destinations for:\r\n D:R:UReckPtrp0\r\nWarning: GHC.Int: could not find link destinations for:\r\n D:R:UReckIntp0\r\nWarning: Data.Int: could not find link destinations for:\r\n D:R:UReckIntp0\r\nWarning: Foreign.Ptr: could not find link destinations for:\r\n D:R:UReckPtrp0\r\nWarning: Data.Word: could not find link destinations for:\r\n D:R:UReckWordp0\r\nWarning: Data.Type.Equality: could not find link destinations for:\r\n ~#\r\nWarning: Data.Char: could not find link destinations for:\r\n D:R:UReckCharp0\r\nWarning: GHC.TypeNats: could not find link destinations for:\r\n natSing\r\nWarning: GHC.TypeLits: could not find link destinations for:\r\n natSing symbolSing\r\nWarning: GHC.Generics: could not find link destinations for:\r\n D:R:UReckWordp0 D:R:UReckIntp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckCharp0 D:R:UReckPtrp0 SingI SingKind\r\nWarning: Type.Reflection: could not find link destinations for:\r\n typeRep# IsApplication\r\nWarning: Data.Typeable: could not find link destinations for:\r\n typeRep#\r\nWarning: GHC.IO: could not find link destinations for:\r\n hspr UPrintf spr\r\nWarning: GHC.ForeignPtr: could not find link destinations for:\r\n Finalizers\r\nWarning: GHC.Foreign: could not find link destinations for:\r\n CString CStringLen\r\nWarning: Data.Dynamic: could not find link destinations for:\r\n typeRep#\r\nWarning: System.IO: could not find link destinations for:\r\n hspr UPrintf spr\r\nWarning: Prelude: could not find link destinations for:\r\n D:R:UReckCharp0 D:R:UReckIntp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckWordp0 hspr UPrintf spr\r\nWarning: Text.Printf: could not find link destinations for:\r\n spr UPrintf hspr\r\nWarning: GHC.ExecutionStack.Internal: could not find link destinations for:\r\n locationSize\r\nWarning: GHC.Exts: could not find link destinations for:\r\n D:R:UReckIntp0 D:R:UReckWordp0 D:R:UReckFloatp0 D:R:UReckDoublep0 D:R:UReckCharp0 D:R:UReckPtrp0 ~#\r\n shakeArgsWith 0.000s 0% \r\nFunction shake 0.005s 0% \r\nDatabase read 0.479s 0% \r\nWith database 0.037s 0% \r\nRunning rules 62.764s 99% =========================\r\nTotal 63.285s 100% \r\nError when running Shake build system:\r\n at src/Main.hs:58:30-42:\r\n* Depends on: _validate-bug/docs/html/libraries/base/base.haddock\r\n* Raised the exception:\r\nuser error (Development.Shake.cmd, system command failed\r\nCommand: _validate-bug/stage1/bin/haddock --verbosity=0 -B_validate-bug/stage1/lib --lib=_validate-bug/stage1/lib --odir=_validate-bug/docs/html/libraries/base --no-tmp-comp-dir --dump-interface=_validate-bug/docs/html/libraries/base/base.haddock --html --hyperlinked-source --hoogle --quickjump '--title=base-4.12.0.0: Basic libraries' --prologue=_validate-bug/docs/html/libraries/base/haddock-prologue.txt --optghc=-D__HADDOCK_VERSION__=2220 --hide=Control.Monad.ST.Imp --hide=Control.Monad.ST.Lazy.Imp --hide=Data.Functor.Utils --hide=Data.OldList --hide=Data.Semigroup.Internal --hide=Data.Typeable.Internal --hide=Foreign.ForeignPtr.Imp --hide=GHC.StaticPtr.Internal --hide=System.Environment.ExecutablePath --hide=System.CPUTime.Utils --hide=GHC.Event.Arr --hide=GHC.Event.Array --hide=GHC.Event.Control --hide=GHC.Event.EPoll --hide=GHC.Event.IntTable --hide=GHC.Event.Internal --hide=GHC.Event.KQueue --hide=GHC.Event.Manager --hide=GHC.Event.PSQ --hide=GHC.Event.Poll --hide=GHC.Event.Thread --hide=GHC.Event.TimerManager --hide=GHC.Event.Unique --hide=System.CPUTime.Posix.ClockGetTime --hide=System.CPUTime.Posix.Times --hide=System.CPUTime.Posix.RUsage --hide=System.CPUTime.Unsupported --read-interface=../ghc-prim,../ghc-prim/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/ghc-prim/ghc-prim.haddock --read-interface=../integer-gmp,../integer-gmp/src/%{MODULE}.html#%{NAME},_validate-bug/docs/html/libraries/integer-gmp/integer-gmp.haddock --optghc=-hisuf --optghc=dyn_hi --optghc=-osuf --optghc=dyn_o --optghc=-hcsuf --optghc=dyn_hc --optghc=-fPIC --optghc=-dynamic --optghc=-hide-all-packages --optghc=-no-user-package-db '--optghc=-this-unit-id base-4.12.0.0' '--optghc=-package-id ghc-prim-0.5.3' '--optghc=-package-id integer-gmp-1.0.2.0' '--optghc=-package-id rts-1.0' --optghc=-i --optghc=-i_validate-bug/stage1/libraries/base/build --optghc=-i_validate-bug/stage1/libraries/base/build/autogen --optghc=-ilibraries/base/. --optghc=-Iincludes --optghc=-I_validate-bug/generated --optghc=-I_validate-bug/stage1/libraries/base/build --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I_validate-bug/stage1/libraries/base/build/include --optghc=-Ilibraries/base/include --optghc=-I/nix/store/jxaaf8dsrb16vnwnij69jar7mhhj969q-ghc-build-environment/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/integer-gmp-1.0.2.0/include --optghc=-I/home/alp/WT/ghc-gitlab/_validate-bug/stage1/lib/x86_64-linux-ghc-8.7.20190123/rts-1.0/include --optghc=-I_validate-bug/generated --optghc=-optc-I_validate-bug/generated --optghc=-optP-include --optghc=-optP_validate-bug/stage1/libraries/base/build/autogen/cabal_macros.h --optghc=-outputdir --optghc=_validate-bug/stage1/libraries/base/build --optghc=-this-unit-id --optghc=base --optghc=-Wcompat --optghc=-Wnoncanonical-monad-instances --optghc=-XHaskell2010 --optghc=-ghcversion-file=/home/alp/WT/ghc-gitlab/_validate-bug/generated/ghcversion.h --optghc=-Wno-deprecated-flags --optghc=-Wno-trustworthy-safe libraries/base/Control/Applicative.hs libraries/base/Control/Arrow.hs libraries/base/Control/Category.hs libraries/base/Control/Concurrent.hs libraries/base/Control/Concurrent/Chan.hs libraries/base/Control/Concurrent/MVar.hs libraries/base/Control/Concurrent/QSem.hs libraries/base/Control/Concurrent/QSemN.hs libraries/base/Control/Exception.hs libraries/base/Control/Exception/Base.hs libraries/base/Control/Monad.hs libraries/base/Control/Monad/Fail.hs libraries/base/Control/Monad/Fix.hs libraries/base/Control/Monad/IO/Class.hs libraries/base/Control/Monad/Instances.hs libraries/base/Control/Monad/ST.hs libraries/base/Control/Monad/ST/Imp.hs libraries/base/Control/Monad/ST/Lazy.hs libraries/base/Control/Monad/ST/Lazy/Imp.hs libraries/base/Control/Monad/ST/Lazy/Safe.hs libraries/base/Control/Monad/ST/Lazy/Unsafe.hs libraries/base/Control/Monad/ST/Safe.hs libraries/base/Control/Monad/ST/Strict.hs libraries/base/Control/Monad/ST/Unsafe.hs libraries/base/Control/Monad/Zip.hs libraries/base/Data/Bifoldable.hs libraries/base/Data/Bifunctor.hs libraries/base/Data/Bitraversable.hs libraries/base/Data/Bits.hs libraries/base/Data/Bool.hs libraries/base/Data/Char.hs libraries/base/Data/Coerce.hs libraries/base/Data/Complex.hs libraries/base/Data/Data.hs libraries/base/Data/Dynamic.hs libraries/base/Data/Either.hs libraries/base/Data/Eq.hs libraries/base/Data/Fixed.hs libraries/base/Data/Foldable.hs libraries/base/Data/Function.hs libraries/base/Data/Functor.hs libraries/base/Data/Functor/Classes.hs libraries/base/Data/Functor/Compose.hs libraries/base/Data/Functor/Const.hs libraries/base/Data/Functor/Contravariant.hs libraries/base/Data/Functor/Identity.hs libraries/base/Data/Functor/Product.hs libraries/base/Data/Functor/Sum.hs libraries/base/Data/Functor/Utils.hs libraries/base/Data/IORef.hs libraries/base/Data/Int.hs libraries/base/Data/Ix.hs libraries/base/Data/Kind.hs libraries/base/Data/List.hs libraries/base/Data/List/NonEmpty.hs libraries/base/Data/Maybe.hs libraries/base/Data/Monoid.hs libraries/base/Data/OldList.hs libraries/base/Data/Ord.hs libraries/base/Data/Proxy.hs libraries/base/Data/Ratio.hs libraries/base/Data/STRef.hs libraries/base/Data/STRef/Lazy.hs libraries/base/Data/STRef/Strict.hs libraries/base/Data/Semigroup.hs libraries/base/Data/Semigroup/Internal.hs libraries/base/Data/String.hs libraries/base/Data/Traversable.hs libraries/base/Data/Tuple.hs libraries/base/Data/Type/Bool.hs libraries/base/Data/Type/Coercion.hs libraries/base/Data/Type/Equality.hs libraries/base/Data/Typeable.hs libraries/base/Data/Typeable/Internal.hs libraries/base/Data/Unique.hs libraries/base/Data/Version.hs libraries/base/Data/Void.hs libraries/base/Data/Word.hs libraries/base/Debug/Trace.hs libraries/base/Foreign.hs libraries/base/Foreign/C.hs libraries/base/Foreign/C/Error.hs libraries/base/Foreign/C/String.hs libraries/base/Foreign/C/Types.hs libraries/base/Foreign/Concurrent.hs libraries/base/Foreign/ForeignPtr.hs libraries/base/Foreign/ForeignPtr/Imp.hs libraries/base/Foreign/ForeignPtr/Safe.hs libraries/base/Foreign/ForeignPtr/Unsafe.hs libraries/base/Foreign/Marshal.hs libraries/base/Foreign/Marshal/Alloc.hs libraries/base/Foreign/Marshal/Array.hs libraries/base/Foreign/Marshal/Error.hs libraries/base/Foreign/Marshal/Pool.hs libraries/base/Foreign/Marshal/Safe.hs libraries/base/Foreign/Marshal/Unsafe.hs libraries/base/Foreign/Marshal/Utils.hs libraries/base/Foreign/Ptr.hs libraries/base/Foreign/Safe.hs libraries/base/Foreign/StablePtr.hs libraries/base/Foreign/Storable.hs libraries/base/GHC/Arr.hs libraries/base/GHC/Base.hs libraries/base/GHC/ByteOrder.hs libraries/base/GHC/Char.hs _validate-bug/stage1/libraries/base/build/GHC/Clock.hs libraries/base/GHC/Conc.hs libraries/base/GHC/Conc/IO.hs libraries/base/GHC/Conc/Signal.hs libraries/base/GHC/Conc/Sync.hs libraries/base/GHC/ConsoleHandler.hs libraries/base/GHC/Constants.hs libraries/base/GHC/Desugar.hs libraries/base/GHC/Enum.hs libraries/base/GHC/Environment.hs libraries/base/GHC/Err.hs libraries/base/GHC/Event.hs libraries/base/GHC/Event/Arr.hs libraries/base/GHC/Event/Array.hs libraries/base/GHC/Event/Control.hs _validate-bug/stage1/libraries/base/build/GHC/Event/EPoll.hs libraries/base/GHC/Event/IntTable.hs libraries/base/GHC/Event/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Event/KQueue.hs libraries/base/GHC/Event/Manager.hs libraries/base/GHC/Event/PSQ.hs _validate-bug/stage1/libraries/base/build/GHC/Event/Poll.hs libraries/base/GHC/Event/Thread.hs libraries/base/GHC/Event/TimerManager.hs libraries/base/GHC/Event/Unique.hs libraries/base/GHC/Exception.hs libraries/base/GHC/Exception/Type.hs libraries/base/GHC/ExecutionStack.hs _validate-bug/stage1/libraries/base/build/GHC/ExecutionStack/Internal.hs libraries/base/GHC/Exts.hs libraries/base/GHC/Fingerprint.hs libraries/base/GHC/Fingerprint/Type.hs libraries/base/GHC/Float.hs libraries/base/GHC/Float/ConversionUtils.hs libraries/base/GHC/Float/RealFracMethods.hs libraries/base/GHC/Foreign.hs libraries/base/GHC/ForeignPtr.hs libraries/base/GHC/GHCi.hs libraries/base/GHC/Generics.hs libraries/base/GHC/IO.hs libraries/base/GHC/IO/Buffer.hs libraries/base/GHC/IO/BufferedIO.hs libraries/base/GHC/IO/Device.hs libraries/base/GHC/IO/Encoding.hs libraries/base/GHC/IO/Encoding/CodePage.hs libraries/base/GHC/IO/Encoding/Failure.hs libraries/base/GHC/IO/Encoding/Iconv.hs libraries/base/GHC/IO/Encoding/Latin1.hs libraries/base/GHC/IO/Encoding/Types.hs libraries/base/GHC/IO/Encoding/UTF16.hs libraries/base/GHC/IO/Encoding/UTF32.hs libraries/base/GHC/IO/Encoding/UTF8.hs libraries/base/GHC/IO/Exception.hs libraries/base/GHC/IO/FD.hs libraries/base/GHC/IO/Handle.hs libraries/base/GHC/IO/Handle/FD.hs libraries/base/GHC/IO/Handle/Internals.hs _validate-bug/stage1/libraries/base/build/GHC/IO/Handle/Lock.hs libraries/base/GHC/IO/Handle/Text.hs libraries/base/GHC/IO/Handle/Types.hs libraries/base/GHC/IO/IOMode.hs libraries/base/GHC/IO/Unsafe.hs libraries/base/GHC/IOArray.hs libraries/base/GHC/IORef.hs libraries/base/GHC/Int.hs libraries/base/GHC/List.hs libraries/base/GHC/MVar.hs libraries/base/GHC/Maybe.hs libraries/base/GHC/Natural.hs libraries/base/GHC/Num.hs libraries/base/GHC/OldList.hs libraries/base/GHC/OverloadedLabels.hs libraries/base/GHC/Pack.hs libraries/base/GHC/Profiling.hs libraries/base/GHC/Ptr.hs _validate-bug/stage1/libraries/base/build/GHC/RTS/Flags.hs libraries/base/GHC/Read.hs libraries/base/GHC/Real.hs libraries/base/GHC/Records.hs libraries/base/GHC/ResponseFile.hs libraries/base/GHC/ST.hs libraries/base/GHC/STRef.hs libraries/base/GHC/Show.hs libraries/base/GHC/Stable.hs libraries/base/GHC/StableName.hs libraries/base/GHC/Stack.hs _validate-bug/stage1/libraries/base/build/GHC/Stack/CCS.hs libraries/base/GHC/Stack/Types.hs libraries/base/GHC/StaticPtr.hs libraries/base/GHC/StaticPtr/Internal.hs _validate-bug/stage1/libraries/base/build/GHC/Stats.hs libraries/base/GHC/Storable.hs libraries/base/GHC/TopHandler.hs libraries/base/GHC/TypeLits.hs libraries/base/GHC/TypeNats.hs libraries/base/GHC/Unicode.hs libraries/base/GHC/Weak.hs libraries/base/GHC/Word.hs libraries/base/Numeric.hs libraries/base/Numeric/Natural.hs libraries/base/Prelude.hs _validate-bug/stage1/libraries/base/build/System/CPUTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/ClockGetTime.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/RUsage.hs _validate-bug/stage1/libraries/base/build/System/CPUTime/Posix/Times.hs libraries/base/System/CPUTime/Unsupported.hs libraries/base/System/CPUTime/Utils.hs libraries/base/System/Console/GetOpt.hs libraries/base/System/Environment.hs _validate-bug/stage1/libraries/base/build/System/Environment/Blank.hs _validate-bug/stage1/libraries/base/build/System/Environment/ExecutablePath.hs libraries/base/System/Exit.hs libraries/base/System/IO.hs libraries/base/System/IO/Error.hs libraries/base/System/IO/Unsafe.hs libraries/base/System/Info.hs libraries/base/System/Mem.hs libraries/base/System/Mem/StableName.hs libraries/base/System/Mem/Weak.hs libraries/base/System/Posix/Internals.hs libraries/base/System/Posix/Types.hs libraries/base/System/Timeout.hs libraries/base/Text/ParserCombinators/ReadP.hs libraries/base/Text/ParserCombinators/ReadPrec.hs libraries/base/Text/Printf.hs libraries/base/Text/Read.hs libraries/base/Text/Read/Lex.hs libraries/base/Text/Show.hs libraries/base/Text/Show/Functions.hs libraries/base/Type/Reflection.hs libraries/base/Type/Reflection/Unsafe.hs libraries/base/Unsafe/Coerce.hs +RTS -t_validate-bug/stage1/libraries/base/build/haddock.t --machine-readable -RTS\r\nExit code: -11\r\nStderr:\r\n)\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16237Run check-api-annotations and check-ppr on all parseable test code2019-07-07T18:00:51ZAlan ZimmermanRun check-api-annotations and check-ppr on all parseable test codeThe `check-ppr` utility checks that `parse (ppr (parse s)) === parse s` holds, when given a file to test.
Likewise, the `check-api-annotations` utility checks that all API annotations are actually attached to the `ParsedSource` output, ...The `check-ppr` utility checks that `parse (ppr (parse s)) === parse s` holds, when given a file to test.
Likewise, the `check-api-annotations` utility checks that all API annotations are actually attached to the `ParsedSource` output, and that they do not precede their attachment span.
At the moment these checks are only run on a subset of code, as explicitly called for in the `/testsuite/tests/printer` and `/testsuite/tests/ghc-api/annotations` tests.
These properties are supposed to hold for all GHC parseable haskell.
So rather than requiring individual developers to add specific tests to confirm their new features work properly, extend the test framework to make a pass over all the files that are expected to be parseable, and run these checks on them.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 8.6.3 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Test Suite |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Run check-api-annotations and check-ppr on all parseable test code","status":"New","operating_system":"","component":"Test Suite","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"The `check-ppr` utility checks that `parse (ppr (parse s)) === parse s` holds, when given a file to test.\r\n\r\nLikewise, the `check-api-annotations` utility checks that all API annotations are actually attached to the `ParsedSource` output, and that they do not precede their attachment span.\r\n\r\nAt the moment these checks are only run on a subset of code, as explicitly called for in the `/testsuite/tests/printer` and `/testsuite/tests/ghc-api/annotations` tests.\r\n\r\nThese properties are supposed to hold for all GHC parseable haskell.\r\n\r\nSo rather than requiring individual developers to add specific tests to confirm their new features work properly, extend the test framework to make a pass over all the files that are expected to be parseable, and run these checks on them.","type_of_failure":"OtherFailure","blocking":[]} -->https://gitlab.haskell.org/ghc/ghc/-/issues/16236API Annotations: AnnAt disconnected for TYPEAPP2019-07-07T18:00:51ZAlan ZimmermanAPI Annotations: AnnAt disconnected for TYPEAPPFor the code
```hs
type family F1 (a :: k) (f :: k -> Type) :: Type where
F1 @Peano a f = T @Peano f a
```
the API annotation for the first `@` is not attached to a `SourcSpan` in the `ParsedSource`
<details><summary>Trac metadata</...For the code
```hs
type family F1 (a :: k) (f :: k -> Type) :: Type where
F1 @Peano a f = T @Peano f a
```
the API annotation for the first `@` is not attached to a `SourcSpan` in the `ParsedSource`
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------- |
| Version | 8.6.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"API Annotations: AnnAt disconnected for TYPEAPP","status":"New","operating_system":"","component":"Compiler (Parser)","related":[],"milestone":"8.8.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"For the code\r\n\r\n{{{#!hs\r\ntype family F1 (a :: k) (f :: k -> Type) :: Type where\r\n F1 @Peano a f = T @Peano f a\r\n}}}\r\n\r\nthe API annotation for the first `@` is not attached to a `SourcSpan` in the `ParsedSource`","type_of_failure":"OtherFailure","blocking":[]} -->8.8.1Alan ZimmermanAlan Zimmermanhttps://gitlab.haskell.org/ghc/ghc/-/issues/16234Unable to resolve type families2020-01-23T16:37:37ZEric CrockettUnable to resolve type familiesThe following code
```
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
import Control.Monad.Classes (MonadReader)
--import Control.Monad.Primitive ()
import Control.Monad.Trans.State.Lazy (StateT)
main :: (n ~ Stat...The following code
```
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
import Control.Monad.Classes (MonadReader)
--import Control.Monad.Primitive ()
import Control.Monad.Trans.State.Lazy (StateT)
main :: (n ~ StateT () IO, MonadReader () n) => IO ()
main = undefined
```
produces the error (cleaned up for readability)
```
Main.hs:9:1: error:
* No instance for
(monad-classes.MonadReaderN
(monad-classes.FindTrue
'[monad-classes.CanDo
(StateT () IO)
(monad-classes.EffReader ()),
monad-classes.CanDo
IO
(monad-classes.EffReader ())])
()
(StateT () IO))
arising from a use of `main'
* In the expression: main
When checking the type of the IO action `main'
|
9 | main = undefined
| ^
```
This is the same error as #16211, but that ticket uses a slightly different example to trigger the error upon recompile.
The relevant instances are all available in `monad-classes`.
```
class Monad m => MonadReaderN (n :: Peano) r m
instance Monad m => MonadReaderN Zero r (StateT r m)
type family CanDo (m :: (* -> *)) (eff :: k) :: Bool
type instance CanDo (StateT s m) eff = StateCanDo s eff
type family StateCanDo s eff where
StateCanDo s (EffState s) = True
StateCanDo s (EffReader s) = True
type family FindTrue (bs :: [Bool]) :: Peano where
FindTrue (True ': t) = Zero
FindTrue (False ': t) = Succ (FindTrue t)
data EffReader (e :: *)
```
I can reproduce with the attached package using GHC-8.6.3 and cabal:
```
$ cabal sandbox init
$ cabal install --only-dependencies
$ cabal build
```
I was unable to minimize the attached example any further. Here's two ways to make the error go away:
1. `import Control.Monad.Primitive ()`. It's unclear why this would help because according to the maintainer of monad-classes, it has no transitive dependencies on `primitive`.
1. Change the signature of `main` to `main :: (MonadReader () (StateT () IO) => IO ()`
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 8.6.3 |
| 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":"Unable to resolve type families","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"8.6.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following code\r\n\r\n{{{\r\n{-# LANGUAGE FlexibleContexts #-}\r\n{-# LANGUAGE TypeFamilies #-}\r\n\r\nimport Control.Monad.Classes (MonadReader)\r\n--import Control.Monad.Primitive ()\r\nimport Control.Monad.Trans.State.Lazy (StateT)\r\n\r\nmain :: (n ~ StateT () IO, MonadReader () n) => IO ()\r\nmain = undefined\r\n}}}\r\n\r\nproduces the error (cleaned up for readability)\r\n\r\n{{{\r\nMain.hs:9:1: error:\r\n * No instance for \r\n (monad-classes.MonadReaderN\r\n (monad-classes.FindTrue\r\n '[monad-classes.CanDo\r\n (StateT () IO)\r\n (monad-classes.EffReader ()),\r\n monad-classes.CanDo\r\n IO\r\n (monad-classes.EffReader ())])\r\n ()\r\n (StateT () IO))\r\n arising from a use of `main'\r\n * In the expression: main\r\n When checking the type of the IO action `main'\r\n |\r\n9 | main = undefined\r\n | ^\r\n}}}\r\n\r\nThis is the same error as #16211, but that ticket uses a slightly different example to trigger the error upon recompile.\r\n\r\nThe relevant instances are all available in `monad-classes`. \r\n\r\n{{{\r\nclass Monad m => MonadReaderN (n :: Peano) r m\r\ninstance Monad m => MonadReaderN Zero r (StateT r m)\r\n\r\ntype family CanDo (m :: (* -> *)) (eff :: k) :: Bool\r\ntype instance CanDo (StateT s m) eff = StateCanDo s eff\r\n\r\ntype family StateCanDo s eff where\r\n StateCanDo s (EffState s) = True\r\n StateCanDo s (EffReader s) = True\r\n\r\ntype family FindTrue (bs :: [Bool]) :: Peano where\r\n FindTrue (True ': t) = Zero\r\n FindTrue (False ': t) = Succ (FindTrue t)\r\n\r\ndata EffReader (e :: *)\r\n}}}\r\n\r\nI can reproduce with the attached package using GHC-8.6.3 and cabal:\r\n\r\n{{{\r\n$ cabal sandbox init\r\n$ cabal install --only-dependencies\r\n$ cabal build\r\n}}}\r\n\r\nI was unable to minimize the attached example any further. Here's two ways to make the error go away:\r\n\r\n1. `import Control.Monad.Primitive ()`. It's unclear why this would help because according to the maintainer of monad-classes, it has no transitive dependencies on `primitive`.\r\n2. Change the signature of `main` to `main :: (MonadReader () (StateT () IO) => IO ()`\r\n\r\n\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->