GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2022-03-07T23:27:05Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/20649GC segfault with devel2 compiler on T16525a2022-03-07T23:27:05ZZubinGC segfault with devel2 compiler on T16525a```bash
$ cd testsuite/tests/ghci/T16525a/
$ ghc --interactive < T16525a.script
GHCi, version 9.3.20211109: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/zubin/dotfiles/.ghci
λ> λ> Ok, two modules loaded....```bash
$ cd testsuite/tests/ghci/T16525a/
$ ghc --interactive < T16525a.script
GHCi, version 9.3.20211109: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/zubin/dotfiles/.ghci
λ> λ> Ok, two modules loaded.
λ> λ> λ> Ok, no modules loaded.
λ> it :: ()
λ> ["a;lskdfa;lszkfsd;alkfjas"]
it :: ()
λ> it :: ()
λ> it :: ()
λ> zsh: segmentation fault (core dumped) $(cur_ghc) --interactive < T16525a.script
```
backtrace:
```
Core was generated by `/home/zubin/ghc/_build_devel2/stage1/bin/ghc --interactive'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 evacuate (p=0x40ea1018) at rts/sm/Evac.c:686
686 q = RELAXED_LOAD(p);
[Current thread is 1 (Thread 0x7fe5ea3c3100 (LWP 447135))]
(gdb) bt
#0 evacuate (p=0x40ea1018) at rts/sm/Evac.c:686
#1 0x0000000003cd9762 in mark_root (user=<optimized out>, root=<optimized out>) at rts/sm/GC.c:1883
#2 0x0000000003ce49e0 in markCAFs (evac=evac@entry=0x3cd9750 <mark_root>, user=0x47454e0) at rts/sm/GCAux.c:162
#3 0x0000000003cdaf4b in GarbageCollect (collect_gen=<optimized out>, collect_gen@entry=0, do_heap_census=do_heap_census@entry=false,
is_overflow_gc=is_overflow_gc@entry=true, deadlock_detect=deadlock_detect@entry=false, gc_type=gc_type@entry=2, cap=cap@entry=0x47454e0,
idle_cap=<optimized out>) at rts/sm/GC.c:508
#4 0x0000000003cc46dd in scheduleDoGC (pcap=pcap@entry=0x7fff7efc7098, task=task@entry=0x4756e80, force_major=force_major@entry=false,
is_overflow_gc=<optimized out>, deadlock_detect=deadlock_detect@entry=false) at rts/Schedule.c:1884
#5 0x0000000003cc5375 in schedule (initialCapability=initialCapability@entry=0x4601e00 <MainCapability>, task=task@entry=0x4756e80)
at rts/Schedule.c:579
#6 0x0000000003cc6c9e in scheduleWaitThread (tso=0x4200406ce8, ret=ret@entry=0x0, pcap=pcap@entry=0x7fff7efc7130) at rts/Schedule.c:2652
#7 0x0000000003cbc5e6 in rts_evalLazyIO (cap=cap@entry=0x7fff7efc7130, p=p@entry=0x3d12fa8, ret=ret@entry=0x0) at rts/RtsAPI.c:566
#8 0x0000000003cbf06f in hs_main (argc=<optimized out>, argv=<optimized out>, main_closure=0x3d12fa8, rts_config=...) at rts/RtsMain.c:72
#9 0x00000000004a56e2 in main ()
(gdb) p p
$1 = (StgClosure **) 0x40ea1018
(gdb) p *p
Cannot access memory at address 0x40ea1018
```
Seems to be a race condition since setting breakpoints in `markCAFs` or `mark_root` will result in successful execution.9.0.2Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/19993aarch64-darwin NCG appears to be broken2022-03-03T03:49:21ZMatthew Pickeringaarch64-darwin NCG appears to be brokenA recent CI build has many errors of the form:
```
/tmp/ghc75623_0/ghc_5.s:448:10: error:
error: invalid octal escape sequence (out of range) in '.string' directive
.string "\742\644\633"
^
|
448...A recent CI build has many errors of the form:
```
/tmp/ghc75623_0/ghc_5.s:448:10: error:
error: invalid octal escape sequence (out of range) in '.string' directive
.string "\742\644\633"
^
|
448 | .string "\742\644\633"
| ^
```
https://gitlab.haskell.org/ghc/ghc/-/jobs/706035
I actually can't find any jobs which are not broken in some way. It seems that the NCG is quite badly broken still..https://gitlab.haskell.org/ghc/ghc/-/issues/20625Data.Type.Ord.< is backwards in base-4.16.0.02022-02-24T15:35:45ZAndrew PritchardData.Type.Ord.< is backwards in base-4.16.0.0## Summary
Write a brief description of the issue.
`type x < y = (x >? y) ~ 'True` is in the released `base`.
This is fixed by the commit to improve error messages, but is not fixed in the 9.2 backport branch.
## Steps to reproduce
...## Summary
Write a brief description of the issue.
`type x < y = (x >? y) ~ 'True` is in the released `base`.
This is fixed by the commit to improve error messages, but is not fixed in the 9.2 backport branch.
## Steps to reproduce
`:kind! 5 < 2`
`:kind! 2 < 5`
## Expected behavior
`False ~ True`
`True ~ True`
## Environment
* GHC version used: 9.2.1
* `base` version: 4.16.0.0Ben GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/17472Ord1 instance for Down is broken2022-02-23T17:31:32ZVaibhav SagarOrd1 instance for Down is broken## Summary
https://twitter.com/Iceland_jack/status/1193558757122494466
## Steps to reproduce
```haskell
> import Data.Ord
> import Data.Functor.Classes
> compare1 (Down 1) (Down 2)
LT
```
## Expected behavior
```haskell
> compare1 (...## Summary
https://twitter.com/Iceland_jack/status/1193558757122494466
## Steps to reproduce
```haskell
> import Data.Ord
> import Data.Functor.Classes
> compare1 (Down 1) (Down 2)
LT
```
## Expected behavior
```haskell
> compare1 (Down 1) (Down 2)
GT
```
## Environment
* GHC version used: 8.6.5
Optional:
* Operating System: NixOS 19.09
* System Architecture: x86-649.4.1https://gitlab.haskell.org/ghc/ghc/-/issues/20136Build of aeson running out of memory in ghc 8.10.4 (pandoc)2022-02-23T13:39:31ZMarty HeymanBuild of aeson running out of memory in ghc 8.10.4 (pandoc)## Summary
`stack install` of `pandoc` cloned this morning on a
## Steps to reproduce
I installed the current `ghc` with "sudo apt install haskell-platform". I installed `stack` following the instructions on the `stack` website. I clo...## Summary
`stack install` of `pandoc` cloned this morning on a
## Steps to reproduce
I installed the current `ghc` with "sudo apt install haskell-platform". I installed `stack` following the instructions on the `stack` website. I cloned `pandoc` from project source. I went into the `pandoc/` directory and ran: `stack setup` and then `stack install`. It initially failed with an out of memory problem and I later restarted `stack install` and got:
mare:~/repos/pandoc$ stack install
aeson > configure
aeson > Configuring aeson-1.5.6.0...
aeson > build
aeson > Preprocessing library for aeson-1.5.6.0..
aeson > Building library for aeson-1.5.6.0..
aeson > [ 1 of 24] Compiling Data.Aeson.Internal.Functions
aeson > [ 2 of 24] Compiling Data.Aeson.Parser.UnescapePure
aeson > [ 3 of 24] Compiling Data.Aeson.Parser.Unescape
aeson > [ 4 of 24] Compiling Data.Aeson.Types.Generic
aeson > [ 5 of 24] Compiling Data.Aeson.Types.Internal
aeson > [ 6 of 24] Compiling Data.Aeson.Parser.Internal
aeson > ghc: internal error: Unable to commit 1048576 bytes of memory
aeson > (GHC version 8.10.4 for x86_64_unknown_linux)
aeson > Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Progress 1/32
## Expected behavior
It should have built and installed `pandoc`.
## Environment
* GHC version used: 8.10.4
Optional:
* Operating System: PRETTY_NAME="Debian GNU/Linux 10 (buster)"
* System Architecture: 64-bit intel compatible9.4.1ZubinZubinhttps://gitlab.haskell.org/ghc/ghc/-/issues/21038GHC 9.2.1 typechecking regression with RankNTypes and TemplateHaskell2022-02-14T13:59:23ZRyan ScottGHC 9.2.1 typechecking regression with RankNTypes and TemplateHaskellWhile porting some code over to use GHC 9.2.1, I noticed a typechecking regression that doesn't appear to be explained in the 9.2.1 release notes. Here is a minimal example:
```hs
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell...While porting some code over to use GHC 9.2.1, I noticed a typechecking regression that doesn't appear to be explained in the 9.2.1 release notes. Here is a minimal example:
```hs
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Bug where
data Foo = MkFoo (forall a. a -> a)
worksOnAllGHCs1 :: Foo
worksOnAllGHCs1 = MkFoo (\x -> x)
worksOnAllGHCs2 :: Foo
worksOnAllGHCs2 = MkFoo $ \x -> x
worksOnAllGHCs3 :: Foo
worksOnAllGHCs3 = $([| MkFoo |]) (\x -> x)
doesn'tWorkOnGHC9'2 :: Foo
doesn'tWorkOnGHC9'2 = $([| MkFoo |]) $ \x -> x
```
All four of these top-level functions will typecheck on GHC 9.0.2 and earlier. On GHC 9.2.1 and HEAD, `worksOnAllGHCs{1,2,3}` functions will typecheck, but the `doesn'tWorkOnGHC9'2` function will not typecheck:
```
$ ghc-9.2.1 Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o, Bug.dyn_o )
Bug.hs:17:24: error:
• Couldn't match type: forall a. a -> a
with: p0 -> p0
Expected: (p0 -> p0) -> Foo
Actual: (forall a. a -> a) -> Foo
• In the first argument of ‘($)’, namely ‘(MkFoo)’
In the expression: (MkFoo) $ \ x -> x
In an equation for ‘doesn'tWorkOnGHC9'2’:
doesn'tWorkOnGHC9'2 = (MkFoo) $ \ x -> x
|
17 | doesn'tWorkOnGHC9'2 = $([| MkFoo |]) $ \x -> x
| ^^^^^^^^^^^^^
```
I'm unclear why using a Template Haskell splice would affect typechecking like this, so I believe this is a bug.9.2.2Ryan ScottRyan Scotthttps://gitlab.haskell.org/ghc/ghc/-/issues/196319.2.1-alpha1 can't bootstrap? Data.Binary.FloatCast: Can't be safely imported2022-02-13T03:26:08Zjwaldmann9.2.1-alpha1 can't bootstrap? Data.Binary.FloatCast: Can't be safely importedI compiled the source tarball (ghc-9.2.0.20210331-src.tar.xz) with ghc-8.10.4 (`./configure --prefix=... && make -j`) and installed the result.
Then I wanted to compile the source again, with ghc-9.2.0.20210331 (just built) in the PATH....I compiled the source tarball (ghc-9.2.0.20210331-src.tar.xz) with ghc-8.10.4 (`./configure --prefix=... && make -j`) and installed the result.
Then I wanted to compile the source again, with ghc-9.2.0.20210331 (just built) in the PATH. This quickly fails with
```
[ 13 of 299] Compiling Data.Binary.Put ( libraries/binary/src/Data/Binary/Put.hs, bootstrapping/Data/Binary/Put.o )
libraries/binary/src/Data/Binary/Put.hs:103:1: error:
Data.Binary.FloatCast: Can't be safely imported!
The module itself isn't safe.
|
103 | import Data.Binary.FloatCast (floatToWord, doubleToWord)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
utils/genprimopcode/ghc.mk:19: utils/genprimopcode/dist/package-data.mk: No such file or directory
make[1]: *** [utils/ghc-cabal/ghc.mk:59: utils/ghc-cabal/dist/build/tmp/ghc-cabal] Error 1
make: *** [Makefile:124: all] Error 2
```9.2.2https://gitlab.haskell.org/ghc/ghc/-/issues/20598Segfault regression in GHC 9.2 due to CPR2022-02-11T15:28:05ZBodigrimSegfault regression in GHC 9.2 due to CPR## Summary
A simple executable available at https://github.com/Bodigrim/ghc92-segfault runs fine, when compiled with GHC 9.0.1, but fails with a segfault, when compiled with GHC 9.2.1: https://github.com/Bodigrim/ghc92-segfault/runs/407...## Summary
A simple executable available at https://github.com/Bodigrim/ghc92-segfault runs fine, when compiled with GHC 9.0.1, but fails with a segfault, when compiled with GHC 9.2.1: https://github.com/Bodigrim/ghc92-segfault/runs/4071678266?check_suite_focus=true#step:4:31
## Steps to reproduce
```sh
git clone https://github.com/Bodigrim/ghc92-segfault
cd ghc92-segfault
cabal run -w ghc-9.2 segfault
```
fails with "Segmentation fault (core dumped) cabal run segfault".
`segfault.cabal`:
```cabal
cabal-version: 1.16
name: segfault
version: 0.1
build-type: Simple
executable segfault
main-is: Main.hs
other-modules: Types, Class
build-depends: base, vector
default-language: Haskell2010
```
`Types.hs`:
```haskell
module Types where
import qualified Data.Vector as V
data Value = Unit Double | Number Int
deriving (Show)
mkArray :: [Value] -> Value
mkArray = mkVector . V.fromList
mkVector :: V.Vector Value -> Value
mkVector vs = case traverse extractNumber vs of
Nothing -> Unit 43.5
Just{} -> Number 42
extractNumber :: Value -> Maybe Int
extractNumber (Number i) = Just i
extractNumber _ = Nothing
```
`Class.hs`:
```haskell
module Class where
import Types
class ToValue a where
toValue :: a -> Value
instance ToValue Value where
toValue = id
instance ToValue a => ToValue [a] where
toValue = mkArray . map toValue
```
`Main.hs`:
```haskell
module Main where
import Types
import Class
main :: IO ()
main = print $ toValue [Number 1]
```
Certain variations of this code do not crash, but return an incorrect runtime result instead, so labelling as both.
## Expected behavior
I expect the executable to run without segfaults.
## Environment
* GHC version used: 9.2.19.2.2https://gitlab.haskell.org/ghc/ghc/-/issues/20769internal error: evacuate: strange closure type -1193213952 in shortbytestring...2022-02-10T13:55:53Zsterniinternal error: evacuate: strange closure type -1193213952 in shortbytestring test suite on aarch64-darwin with GHC 8.10.7## Summary
Test suite of `shortbytestring` 0.2.0.0 triggers the following issue on `aarch64-darwin`.
```
foldl1: prop-compiled: internal error: evacuate: strange closure type -1193213952
(GH...## Summary
Test suite of `shortbytestring` 0.2.0.0 triggers the following issue on `aarch64-darwin`.
```
foldl1: prop-compiled: internal error: evacuate: strange closure type -1193213952
(GHC version 8.10.7 for aarch64_apple_darwin)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
```
<details>
<summary>
full log
</summary>
```
setupCompilerEnvironmentPhase
Build with /nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7.
unpacking sources
unpacking source archive /nix/store/h05chc9cswniwpy8wr7vfa4w7niibn86-shortbytestring-0.2.0.0.tar.gz
source root is shortbytestring-0.2.0.0
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file shortbytestring-0.2.0.0/tests/Properties/ByteString/Short/Word16.hs
patching sources
compileBuildDriverPhase
setupCompileFlags: -package-db=/private/tmp/nix-build-shortbytestring-0.2.0.0.drv-0/setup-package.conf.d -j1 -threaded -rtsopts
[1 of 1] Compiling Main ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /private/tmp/nix-build-shortbytestring-0.2.0.0.drv-0/Main.o )
Linking Setup ...
updateAutotoolsGnuConfigScriptsPhase
configuring
configureFlags: --verbose --prefix=/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0 --libdir=$prefix/lib/$compiler --libsubdir=$abi/$libname --docdir=/nix/store/jfp2r6i9y5xd9gr6k2gfv69pbw7x4b2q-shortbytestring-0.2.0.0-doc/share/doc/shortbytestring-0.2.0.0 --with-gcc=clang --package-db=/private/tmp/nix-build-shortbytestring-0.2.0.0.drv-0/package.conf.d --ghc-options=-j1 --disable-split-objs --disable-library-profiling --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --extra-lib-dirs=/nix/store/vfx838xb8y5iifbpcj03fljagms0xvkc-ncurses-6.2/lib --extra-lib-dirs=/nix/store/92yf002wz1a2lz83pgx59hb8ng376wig-libffi-3.4.2/lib --extra-lib-dirs=/nix/store/hrmakx4jpq7b3zaj5cmsyclnrxfji8hb-gmp-6.2.1/lib --extra-include-dirs=/nix/store/hhydbralhhhfclxqr51kjpbv2gvz4g31-libiconv-50/include --extra-lib-dirs=/nix/store/hhydbralhhhfclxqr51kjpbv2gvz4g31-libiconv-50/lib --extra-include-dirs=/nix/store/cir5w76g2q5n7vbv5xzpmzlyl2j27gm2-libcxx-11.1.0-dev/include --extra-lib-dirs=/nix/store/v9h8pygmf5ld2p5fnnmcdnp073pnc3yj-libcxx-11.1.0/lib --extra-include-dirs=/nix/store/ajba7f9g3ijwjwrnshksyj21y3a57j4d-libcxxabi-11.1.0-dev/include --extra-lib-dirs=/nix/store/3hy11n7jlvd01fsxy43iipahhv5qv691-libcxxabi-11.1.0/lib --extra-lib-dirs=/nix/store/8draafqraz9q64i7lhg0wrs924gcgdqs-compiler-rt-libc-11.1.0/lib --extra-framework-dirs=/nix/store/k244b16r780gbzb63qwikg0p99gv33jm-apple-framework-CoreFoundation-11.0.0/Library/Frameworks --extra-include-dirs=/nix/store/p4k9fz4ym4f4kchy75sk8gwcd8fkndx4-libobjc-11.0.0/include --extra-lib-dirs=/nix/store/p4k9fz4ym4f4kchy75sk8gwcd8fkndx4-libobjc-11.0.0/lib
Using Parsec parser
Configuring shortbytestring-0.2.0.0...
Dependency base >=4.9.1.0 && <5: using base-4.14.3.0
Dependency bytestring >=0.10.8.1 && <0.11: using bytestring-0.10.12.0
Dependency exceptions ==0.10.*: using exceptions-0.10.4
Dependency primitive ==0.7.*: using primitive-0.7.3.0
Dependency template-haskell >=2.10 && <2.20: using template-haskell-2.16.0.0
Dependency text >=1.2.3.0 && <1.2.6: using text-1.2.4.1
Dependency word16 -any: using word16-0.1.0.0
Dependency word8 ==0.1.*: using word8-0.1.3
Dependency QuickCheck -any: using QuickCheck-2.14.2
Dependency base >=4.9.1.0 && <5: using base-4.14.3.0
Dependency bytestring >=0.10.8.1 && <0.11: using bytestring-0.10.12.0
Dependency deepseq -any: using deepseq-1.4.4.0
Dependency ghc-prim -any: using ghc-prim-0.6.1
Dependency shortbytestring -any: using shortbytestring-0.2.0.0
Dependency tasty -any: using tasty-1.4.2
Dependency tasty-quickcheck -any: using tasty-quickcheck-0.10.1.2
Dependency word16 -any: using word16-0.1.0.0
Dependency word8 -any: using word8-0.1.3
Source component graph:
component lib
component test:prop-compiled dependency lib
Configured component graph:
component shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
include base-4.14.3.0
include bytestring-0.10.12.0
include exceptions-0.10.4
include primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA
include template-haskell-2.16.0.0
include text-1.2.4.1
include word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
include word8-0.1.3-3suFTzfCtfW1njTS38c5W6
component shortbytestring-0.2.0.0-KjRlxMXoRd19CZqAbCVjYT-prop-compiled
include QuickCheck-2.14.2-LnAekkDY9lpEHhc1zrdrc6
include base-4.14.3.0
include bytestring-0.10.12.0
include deepseq-1.4.4.0
include ghc-prim-0.6.1
include shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
include tasty-1.4.2-8uNODzuO8iuERCqkmI6DdY
include tasty-quickcheck-0.10.1.2-1X1mgcPW5Q86feFgT0Kvk0
include word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
include word8-0.1.3-3suFTzfCtfW1njTS38c5W6
Linked component graph:
unit shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
include base-4.14.3.0
include bytestring-0.10.12.0
include exceptions-0.10.4
include primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA
include template-haskell-2.16.0.0
include text-1.2.4.1
include word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
include word8-0.1.3-3suFTzfCtfW1njTS38c5W6
Data.ByteString.Short=shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg:Data.ByteString.Short,Data.ByteString.Short.Decode=shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg:Data.ByteString.Short.Decode,Data.ByteString.Short.Encode=shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg:Data.ByteString.Short.Encode,Data.ByteString.Short.Internal=shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg:Data.ByteString.Short.Internal,Data.ByteString.Short.Word16=shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg:Data.ByteString.Short.Word16
unit shortbytestring-0.2.0.0-KjRlxMXoRd19CZqAbCVjYT-prop-compiled
include QuickCheck-2.14.2-LnAekkDY9lpEHhc1zrdrc6
include base-4.14.3.0
include bytestring-0.10.12.0
include deepseq-1.4.4.0
include ghc-prim-0.6.1
include shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
include tasty-1.4.2-8uNODzuO8iuERCqkmI6DdY
include tasty-quickcheck-0.10.1.2-1X1mgcPW5Q86feFgT0Kvk0
include word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
include word8-0.1.3-3suFTzfCtfW1njTS38c5W6
Ready component graph:
definite shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
depends base-4.14.3.0
depends bytestring-0.10.12.0
depends exceptions-0.10.4
depends primitive-0.7.3.0-HMedJdQUTCQ79SiIUfisnA
depends template-haskell-2.16.0.0
depends text-1.2.4.1
depends word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
depends word8-0.1.3-3suFTzfCtfW1njTS38c5W6
definite shortbytestring-0.2.0.0-KjRlxMXoRd19CZqAbCVjYT-prop-compiled
depends QuickCheck-2.14.2-LnAekkDY9lpEHhc1zrdrc6
depends base-4.14.3.0
depends bytestring-0.10.12.0
depends deepseq-1.4.4.0
depends ghc-prim-0.6.1
depends shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
depends tasty-1.4.2-8uNODzuO8iuERCqkmI6DdY
depends tasty-quickcheck-0.10.1.2-1X1mgcPW5Q86feFgT0Kvk0
depends word16-0.1.0.0-CExu9wJDHvECBYWFZZ3bUE
depends word8-0.1.3-3suFTzfCtfW1njTS38c5W6
Using Cabal-3.2.1.0 compiled by ghc-8.10
Using compiler: ghc-8.10.7
Using install prefix:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0
Executables installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/bin
Libraries installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/lib/ghc-8.10.7/aarch64-osx-ghc-8.10.7/shortbytestring-0.2.0.0-HjOnEPJtzhYEio6pCkQgqg
Dynamic Libraries installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/lib/ghc-8.10.7/aarch64-osx-ghc-8.10.7
Private executables installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/libexec/aarch64-osx-ghc-8.10.7/shortbytestring-0.2.0.0
Data files installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/share/aarch64-osx-ghc-8.10.7/shortbytestring-0.2.0.0
Documentation installed in:
/nix/store/jfp2r6i9y5xd9gr6k2gfv69pbw7x4b2q-shortbytestring-0.2.0.0-doc/share/doc/shortbytestring-0.2.0.0
Configuration files installed in:
/nix/store/8rpb4inrnn70nnd42vvqd0l0iagn0lsv-shortbytestring-0.2.0.0/etc
No alex found
Using ar found on system at:
/nix/store/nyl3gxdnjzidq7ky3nd65cblah1yfnyb-cctools-binutils-darwin-949.0.1/bin/ar
No c2hs found
No cpphs found
No doctest found
Using gcc version 11.1.0 given by user at:
/nix/store/39hmshy4x50snqsrhfrqv2klfdix1cj5-clang-wrapper-11.1.0/bin/clang
Using ghc version 8.10.7 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/ghc
Using ghc-pkg version 8.10.7 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/ghc-pkg
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.24.2 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/haddock
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/hpc
Using hsc2hs version 0.68.7 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/hsc2hs
Using hscolour version 1.24 found on system at:
/nix/store/fisv258lhaabkbirbxwp8hig8fiwc46d-hscolour-1.24.4/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/4sjvijh2aw94ljxbi564kgafwmxda991-cctools-binutils-darwin-wrapper-949.0.1/bin/ld
No pkg-config found
Using runghc version 8.10.7 found on system at:
/nix/store/fsnjsdqgdz2znslv0izw7d4mg6vl8rip-ghc-8.10.7/bin/runghc
Using strip found on system at:
/nix/store/39hmshy4x50snqsrhfrqv2klfdix1cj5-clang-wrapper-11.1.0/bin/strip
Using tar found on system at:
/nix/store/fih00xwmdhwc8zg8inc8hdm9kxf75vi4-gnutar-1.34/bin/tar
No uhc found
building
Preprocessing library for shortbytestring-0.2.0.0..
Building library for shortbytestring-0.2.0.0..
[1 of 5] Compiling Data.ByteString.Short.Internal ( lib/Data/ByteString/Short/Internal.hs, dist/build/Data/ByteString/Short/Internal.o, dist/build/Data/ByteString/Short/Internal.dyn_o )
[2 of 5] Compiling Data.ByteString.Short ( lib/Data/ByteString/Short.hs, dist/build/Data/ByteString/Short.o, dist/build/Data/ByteString/Short.dyn_o )
[3 of 5] Compiling Data.ByteString.Short.Encode ( lib/Data/ByteString/Short/Encode.hs, dist/build/Data/ByteString/Short/Encode.o, dist/build/Data/ByteString/Short/Encode.dyn_o )
[4 of 5] Compiling Data.ByteString.Short.Decode ( lib/Data/ByteString/Short/Decode.hs, dist/build/Data/ByteString/Short/Decode.o, dist/build/Data/ByteString/Short/Decode.dyn_o )
[5 of 5] Compiling Data.ByteString.Short.Word16 ( lib/Data/ByteString/Short/Word16.hs, dist/build/Data/ByteString/Short/Word16.o, dist/build/Data/ByteString/Short/Word16.dyn_o )
Preprocessing test suite 'prop-compiled' for shortbytestring-0.2.0.0..
Building test suite 'prop-compiled' for shortbytestring-0.2.0.0..
[1 of 3] Compiling Properties.ByteString.Short ( tests/Properties/ByteString/Short.hs, dist/build/prop-compiled/prop-compiled-tmp/Properties/ByteString/Short.o )
[2 of 3] Compiling Properties.ByteString.Short.Word16 ( tests/Properties/ByteString/Short/Word16.hs, dist/build/prop-compiled/prop-compiled-tmp/Properties/ByteString/Short/Word16.o )
[3 of 3] Compiling Main ( tests/Properties.hs, dist/build/prop-compiled/prop-compiled-tmp/Main.o )
Linking dist/build/prop-compiled/prop-compiled ...
running tests
Running 1 test suites...
Test suite prop-compiled: RUNNING...
All
StrictWord8
pack . unpack: OK
+++ OK, passed 100 tests.
unpack . pack: OK
+++ OK, passed 100 tests.
read . show: OK
+++ OK, passed 100 tests.
==: OK
+++ OK, passed 100 tests.
== refl: OK
+++ OK, passed 100 tests.
== symm: OK
+++ OK, passed 100 tests.
== pack unpack: OK
+++ OK, passed 100 tests.
compare: OK
+++ OK, passed 100 tests.
compare EQ: OK
+++ OK, passed 100 tests.
compare GT: OK
+++ OK, passed 100 tests.
compare LT: OK
+++ OK, passed 100 tests.
compare GT empty: OK
+++ OK, passed 100 tests; 21 discarded.
compare LT empty: OK
+++ OK, passed 100 tests; 31 discarded.
compare GT concat: OK
+++ OK, passed 100 tests; 27 discarded.
compare char: OK
+++ OK, passed 100 tests.
compare unsigned: OK
+++ OK, passed 1 test.
null: OK
+++ OK, passed 100 tests.
empty 0: OK
+++ OK, passed 1 test.
empty []: OK
+++ OK, passed 1 test.
mempty 0: OK
+++ OK, passed 1 test.
mempty []: OK
+++ OK, passed 1 test.
concat: OK (0.01s)
+++ OK, passed 100 tests.
concat [x,x]: OK
+++ OK, passed 100 tests.
concat [x,[]]: OK
+++ OK, passed 100 tests.
mconcat: OK (0.01s)
+++ OK, passed 100 tests.
mconcat [x,x]: OK
+++ OK, passed 100 tests.
mconcat [x,[]]: OK
+++ OK, passed 100 tests.
null: OK
+++ OK, passed 100 tests.
reverse: OK
+++ OK, passed 100 tests.
all: OK
+++ OK, passed 100 tests.
all ==: OK
+++ OK, passed 100 tests.
any: OK
+++ OK, passed 100 tests.
any ==: OK
+++ OK, passed 100 tests.
append: OK
+++ OK, passed 100 tests.
mappend: OK
+++ OK, passed 100 tests.
<>: OK
+++ OK, passed 100 tests.
stimes: OK
+++ OK, passed 100 tests.
break: OK
+++ OK, passed 100 tests.
break ==: OK
+++ OK, passed 100 tests.
break /=: OK
+++ OK, passed 100 tests.
break span: OK
+++ OK, passed 100 tests.
breakEnd: OK
+++ OK, passed 100 tests.
breakEnd: OK
+++ OK, passed 100 tests.
break breakSubstring: OK
+++ OK, passed 100 tests.
breakSubstring: OK
+++ OK, passed 100 tests; 27 discarded.
breakSubstring empty: OK
+++ OK, passed 100 tests.
break isSpace: OK
+++ OK, passed 100 tests.
singleton: OK
+++ OK, passed 100 tests.
cons: OK
+++ OK, passed 100 tests.
cons []: OK
+++ OK, passed 100 tests.
snoc: OK
+++ OK, passed 100 tests.
snoc []: OK
+++ OK, passed 100 tests.
drop: OK
+++ OK, passed 100 tests.
drop 10: OK
+++ OK, passed 100 tests.
dropWhile: OK
+++ OK, passed 100 tests.
dropWhile ==: OK
+++ OK, passed 100 tests.
dropWhile /=: OK
+++ OK, passed 100 tests.
dropWhile isSpace: OK
+++ OK, passed 100 tests.
take: OK
+++ OK, passed 100 tests.
take 10: OK
+++ OK, passed 100 tests.
takeWhile: OK
+++ OK, passed 100 tests.
takeWhile ==: OK
+++ OK, passed 100 tests.
takeWhile /=: OK
+++ OK, passed 100 tests.
takeWhile isSpace: OK
+++ OK, passed 100 tests.
dropEnd: OK
+++ OK, passed 100 tests.
dropWhileEnd: OK
+++ OK, passed 100 tests.
takeEnd: OK
+++ OK, passed 100 tests.
takeWhileEnd: OK
+++ OK, passed 100 tests.
length: OK
+++ OK, passed 100 tests.
count: OK
+++ OK, passed 100 tests.
filter: OK
+++ OK, passed 100 tests.
filter compose: OK
+++ OK, passed 100 tests.
filter ==: OK
+++ OK, passed 100 tests.
filter /=: OK
+++ OK, passed 100 tests.
partition: OK
+++ OK, passed 100 tests.
find: OK
+++ OK, passed 100 tests.
findIndex: OK
+++ OK, passed 100 tests.
findIndices: OK
+++ OK, passed 100 tests.
findIndices ==: OK
+++ OK, passed 100 tests.
elem: OK
+++ OK, passed 100 tests.
not elem: OK
+++ OK, passed 100 tests.
elemIndex: OK
+++ OK, passed 100 tests.
elemIndices: OK
+++ OK, passed 100 tests.
isPrefixOf: OK
+++ OK, passed 100 tests.
stripPrefix: OK
+++ OK, passed 100 tests.
isSuffixOf: OK
+++ OK, passed 100 tests.
stripSuffix: OK
+++ OK, passed 100 tests.
isInfixOf: OK
+++ OK, passed 100 tests.
map: OK
+++ OK, passed 100 tests.
map compose: OK
+++ OK, passed 100 tests.
replicate: OK
+++ OK, passed 100 tests.
replicate 0: OK
+++ OK, passed 100 tests.
span: OK
+++ OK, passed 100 tests.
span ==: OK
+++ OK, passed 100 tests.
span /=: OK
+++ OK, passed 100 tests.
spanEnd: OK
+++ OK, passed 100 tests.
split: OK
+++ OK, passed 100 tests.
split empty: OK
+++ OK, passed 100 tests.
splitWith: OK
+++ OK, passed 100 tests.
splitWith split: OK
+++ OK, passed 100 tests.
splitWith empty: OK
+++ OK, passed 100 tests.
splitWith length: OK
+++ OK, passed 100 tests.
splitAt: OK
+++ OK, passed 100 tests.
head: OK
+++ OK, passed 100 tests; 24 discarded.
last: OK
+++ OK, passed 100 tests; 34 discarded.
tail: OK
+++ OK, passed 100 tests; 32 discarded.
tail length: OK
+++ OK, passed 100 tests; 20 discarded.
init: OK
+++ OK, passed 100 tests; 19 discarded.
init length: OK
+++ OK, passed 100 tests; 28 discarded.
foldl: OK
+++ OK, passed 100 tests.
foldl': OK
+++ OK, passed 100 tests.
foldr: OK
+++ OK, passed 100 tests.
foldr': OK
+++ OK, passed 100 tests.
foldl cons: OK
+++ OK, passed 100 tests.
foldr cons: OK
+++ OK, passed 100 tests.
foldl special: OK
+++ OK, passed 100 tests.
foldr special: OK
+++ OK, passed 100 tests.
foldl1: prop-compiled: internal error: evacuate: strange closure type -1193213952
(GHC version 8.10.7 for aarch64_apple_darwin)
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
Test suite prop-compiled: FAIL
Test suite logged to: dist/test/shortbytestring-0.2.0.0-prop-compiled.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for '/nix/store/s39a39yj4n39l7dsx1ynas8aqn8f0n6i-shortbytestring-0.2.0.0.drv' failed with exit code 1
```
</details>
## Steps to reproduce
1. Checkout `6daa4a5c045d40e6eae60a3b6e427e8700f1c07f` of nixpkgs
2. Build `nix-build -A haskellPackages.shortbytestring` on `aarch64-darwin`
Unclear if this can be reproduced 100% or is flaky.
## Expected behavior
`shortbytestring`'s test suite either succeeds or fails without hitting RTS (?) bailing out.
## Environment
* GHC version used: 8.10.7
Optional:
* Operating System: macOS
* System Architecture: aarch64-darwinBen GamariBen Gamarihttps://gitlab.haskell.org/ghc/ghc/-/issues/21053Testsuite: Bogus error with "_build/stage1/lib" not found2022-02-09T08:57:59ZAndreas KlebingerTestsuite: Bogus error with "_build/stage1/lib" not foundAfter rebasing a number (10-20) of tests now seem to fail with this bogus error:
```
=====> CallArity1(normal) 1 of 1 [0, 0, 0]
cd "/tmp/ghctest-kejzo99g/test spaces/testsuite/tests/callarity/unittest/CallArity1.run" && "/home/andi/g...After rebasing a number (10-20) of tests now seem to fail with this bogus error:
```
=====> CallArity1(normal) 1 of 1 [0, 0, 0]
cd "/tmp/ghctest-kejzo99g/test spaces/testsuite/tests/callarity/unittest/CallArity1.run" && "/home/andi/ghc_infer/_build/stage1/bin/ghc" -o CallArity1 CallArity1.hs -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output -package ghc <
cd "/tmp/ghctest-kejzo99g/test spaces/testsuite/tests/callarity/unittest/CallArity1.run" && ./CallArity1 "_build/stage1/lib"<
Wrong exit code for CallArity1(normal)(expected 0 , actual 1 )
Stderr ( CallArity1 ):
CallArity1: Missing file: _build/stage1/lib/settings
*** unexpected failure for CallArity1(normal)
```
I suspect the path or content of the argument `"_build/stage1/lib"` is wrong. Either it should be an absolute path or contain a setting from that file? Not completely sure.Matthew PickeringMatthew Pickeringhttps://gitlab.haskell.org/ghc/ghc/-/issues/19768HEAD panics with toIfaceCoercionX when dumping core.2022-01-31T02:55:48ZAndreas KlebingerHEAD panics with toIfaceCoercionX when dumping core.I added dump flags to a file on head:
```
diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs
index feb984fc26..7e227653d0 100644
--- a/compiler/GHC/Tc/Gen/Head.hs
+++ b/compiler/GHC/Tc/Gen/Head.hs
@@ -8,7 +8,7 @@
{-...I added dump flags to a file on head:
```
diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs
index feb984fc26..7e227653d0 100644
--- a/compiler/GHC/Tc/Gen/Head.hs
+++ b/compiler/GHC/Tc/Gen/Head.hs
@@ -8,7 +8,7 @@
{-# LANGUAGE UndecidableInstances #-} -- Wrinkle in Note [Trees That Grow]
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-
+{-# OPTIONS_GHC -ddump-simpl -ddump-to-file -dverbose-core2core -ddump-stg-final #-}
{-
%
(c) The University of Glasgow 2006
```
I then tried to build the compiler but I get:
```
hadrian/build -j14 --flavour=default+no_profiled_libs -o_build2
...
!!! CoreTidy [GHC.Tc.Gen.Head]: finished in 375.00 milliseconds, allocated 510.122 megabytes
*** CorePrep [GHC.Tc.Gen.Head]:
ghc.exe: panic! (the 'impossible' happened)
(GHC version 9.3.20210428:
toIfaceCoercionX
Call stack:
CallStack (from HasCallStack):
callStackDoc, called at compiler\\GHC\\Utils\\Panic.hs:181:37 in ghc:GHC.Utils.Panic
pprPanic, called at compiler\\GHC\\CoreToIface.hs:316:35 in ghc:GHC.CoreToIface
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
```
This is likely caused by this commit as it introduced the panic:
https://gitlab.haskell.org/ghc/ghc/commit/6c7fff0b6f9514d6572cbe6bbfa4aafc259caebe
@simonpj9.4.1https://gitlab.haskell.org/ghc/ghc/-/issues/10321GHC.TypeLits.Nat types no longer fully simplified.2022-01-21T11:04:14ZdarchonGHC.TypeLits.Nat types no longer fully simplified.The following code:
```
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
import GHC.TypeLits
data Vec :: Nat -> * -> * where
Nil :: Vec 0 a
(:>) :: a ...The following code:
```
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
import GHC.TypeLits
data Vec :: Nat -> * -> * where
Nil :: Vec 0 a
(:>) :: a -> Vec n a -> Vec (n + 1) a
infixr 5 :>
```
when loaded in GHCi 7.8.3, and asking for the type of `(1 :> 2 :> 3 :> Nil)`, gives:
```
$ ghci example/vec.hs
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main ( example/vec.hs, interpreted )
Ok, modules loaded: Main.
*Main> :t (3:>4:>5:>Nil)
(3:>4:>5:>Nil) :: Num a => Vec 3 a
```
while in GHCi 7.10.1 it gives:
```
$ ghci example/vec.hs
GHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( example/vec.hs, interpreted )
Ok, modules loaded: Main.
*Main> :t (3:>4:>5:>Nil)
(3:>4:>5:>Nil) :: Num a => Vec (2 + 1) a
```
That is, the type-level computation, `((0 + 1) + 1) + 1` is only simplified to `2 + 1` in GHC 7.10.1, whereas in 7.8.3 `2+1` was further simplified to `3`.
The same still happens in HEAD (20150417)
```
$ ghci example/vec.hs
GHCi, version 7.11.20150417: http://www.haskell.org/ghc/ :? for help
[1 of 1] Compiling Main ( example/vec.hs, interpreted )
Ok, modules loaded: Main.
*Main> :t (3:>4:>5:>Nil)
(3:>4:>5:>Nil) :: Num a => Vec (2 + 1) a
```
I strongly feel that the behaviour in ghc 7.8.3 is the desired behaviour.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 7.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"GHC.TypeLits.Nat types no longer fully simplified.","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"7.10.2","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"7.10.1","keywords":["TypeLits"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"The following code:\r\n\r\n{{{\r\n{-# LANGUAGE DataKinds #-}\r\n{-# LANGUAGE GADTs #-}\r\n{-# LANGUAGE KindSignatures #-}\r\n{-# LANGUAGE TypeOperators #-}\r\n\r\nimport GHC.TypeLits\r\n\r\ndata Vec :: Nat -> * -> * where\r\n Nil :: Vec 0 a\r\n (:>) :: a -> Vec n a -> Vec (n + 1) a\r\n\r\ninfixr 5 :>\r\n}}}\r\n\r\nwhen loaded in GHCi 7.8.3, and asking for the type of `(1 :> 2 :> 3 :> Nil)`, gives:\r\n{{{\r\n$ ghci example/vec.hs \r\nGHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\n[1 of 1] Compiling Main ( example/vec.hs, interpreted )\r\nOk, modules loaded: Main.\r\n*Main> :t (3:>4:>5:>Nil)\r\n(3:>4:>5:>Nil) :: Num a => Vec 3 a\r\n}}}\r\n\r\nwhile in GHCi 7.10.1 it gives:\r\n{{{\r\n$ ghci example/vec.hs \r\nGHCi, version 7.10.1: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( example/vec.hs, interpreted )\r\nOk, modules loaded: Main.\r\n*Main> :t (3:>4:>5:>Nil)\r\n(3:>4:>5:>Nil) :: Num a => Vec (2 + 1) a\r\n}}}\r\n\r\nThat is, the type-level computation, `((0 + 1) + 1) + 1` is only simplified to `2 + 1` in GHC 7.10.1, whereas in 7.8.3 `2+1` was further simplified to `3`.\r\n\r\nThe same still happens in HEAD (20150417)\r\n{{{\r\n$ ghci example/vec.hs \r\nGHCi, version 7.11.20150417: http://www.haskell.org/ghc/ :? for help\r\n[1 of 1] Compiling Main ( example/vec.hs, interpreted )\r\nOk, modules loaded: Main.\r\n*Main> :t (3:>4:>5:>Nil)\r\n(3:>4:>5:>Nil) :: Num a => Vec (2 + 1) a\r\n}}}\r\n\r\nI strongly feel that the behaviour in ghc 7.8.3 is the desired behaviour.","type_of_failure":"OtherFailure","blocking":[]} -->7.10.2https://gitlab.haskell.org/ghc/ghc/-/issues/4966Type checking regression2022-01-13T11:32:31ZIan Lynagh <igloo@earth.li>Type checking regressionThis module:
```
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE OverlappingInstances #-}
module HTk.Toolkit.TreeList (getObjectFromTreeList) where
class Eq c => CI...This module:
```
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE OverlappingInstances #-}
module HTk.Toolkit.TreeList (getObjectFromTreeList) where
class Eq c => CItem c
data StateEntry a = StateEntry (TreeListObject a)
a -- Comment this 'a' out and it type checks
deriving Eq
getObjectFromTreeList :: CItem a => [StateEntry a] -> Bool
getObjectFromTreeList state = (head state == head state)
data CItem a => TreeListObject a
instance CItem a => Eq (TreeListObject a)
class GUIObject w where
toGUIObject :: w -> GUIOBJECT
instance GUIObject w => Eq w where
w1 == w2 = toGUIObject w1 == toGUIObject w2
data GUIOBJECT
instance Eq GUIOBJECT where
(==) = undefined
(/=) = undefined
```
is accepted by 7.0.1, but not by 7.0-branch or HEAD:
```
Q.hs:16:43:
Could not deduce (GUIObject a) arising from a use of `=='
from the context (CItem a)
bound by the type signature for
getObjectFromTreeList :: CItem a => [StateEntry a] -> Bool
at Q.hs:16:1-56
Possible fix:
add (GUIObject a) to the context of
the type signature for
getObjectFromTreeList :: CItem a => [StateEntry a] -> Bool
In the expression: (head state == head state)
In an equation for `getObjectFromTreeList':
getObjectFromTreeList state = (head state == head state)
```
If you comment out the `a` then it is accepted by all 3.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 7.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | highest |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Type checking regression","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"7.0.2","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"simonpj"},"version":"7.0.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This module:\r\n{{{\r\n{-# LANGUAGE EmptyDataDecls #-}\r\n{-# LANGUAGE FlexibleInstances #-}\r\n{-# LANGUAGE UndecidableInstances #-}\r\n{-# LANGUAGE OverlappingInstances #-}\r\n\r\nmodule HTk.Toolkit.TreeList (getObjectFromTreeList) where\r\n\r\nclass Eq c => CItem c\r\n\r\ndata StateEntry a = StateEntry (TreeListObject a)\r\n a -- Comment this 'a' out and it type checks\r\n deriving Eq\r\n\r\ngetObjectFromTreeList :: CItem a => [StateEntry a] -> Bool\r\ngetObjectFromTreeList state = (head state == head state)\r\n\r\ndata CItem a => TreeListObject a\r\n\r\ninstance CItem a => Eq (TreeListObject a)\r\n\r\nclass GUIObject w where\r\n toGUIObject :: w -> GUIOBJECT\r\n\r\ninstance GUIObject w => Eq w where\r\n w1 == w2 = toGUIObject w1 == toGUIObject w2\r\n\r\ndata GUIOBJECT\r\n\r\ninstance Eq GUIOBJECT where\r\n (==) = undefined\r\n (/=) = undefined\r\n}}}\r\nis accepted by 7.0.1, but not by 7.0-branch or HEAD:\r\n{{{\r\nQ.hs:16:43:\r\n Could not deduce (GUIObject a) arising from a use of `=='\r\n from the context (CItem a)\r\n bound by the type signature for\r\n getObjectFromTreeList :: CItem a => [StateEntry a] -> Bool\r\n at Q.hs:16:1-56\r\n Possible fix:\r\n add (GUIObject a) to the context of\r\n the type signature for\r\n getObjectFromTreeList :: CItem a => [StateEntry a] -> Bool\r\n In the expression: (head state == head state)\r\n In an equation for `getObjectFromTreeList':\r\n getObjectFromTreeList state = (head state == head state)\r\n}}}\r\nIf you comment out the `a` then it is accepted by all 3.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->7.0.2Simon Peyton JonesSimon Peyton Joneshttps://gitlab.haskell.org/ghc/ghc/-/issues/19846ghc-bignum version is not bumped2022-01-04T15:19:04ZOleg Grenrusghc-bignum version is not bumpedin GHC-9.0 nor GHC-9.2 branch, but it contains additions of new instances.
See my comment on https://gitlab.haskell.org/ghc/ghc/-/commit/882cc3638224674805e2b26e43cad853983575b5#note_352573
This is a release blocker for both GHC-9.0.2 ...in GHC-9.0 nor GHC-9.2 branch, but it contains additions of new instances.
See my comment on https://gitlab.haskell.org/ghc/ghc/-/commit/882cc3638224674805e2b26e43cad853983575b5#note_352573
This is a release blocker for both GHC-9.0.2 and GHC-9.2.1.9.0.2https://gitlab.haskell.org/ghc/ghc/-/issues/19976Mysterious issue with bytestring "LazyWord8.fromString literal" test2021-12-26T13:23:06ZBodigrimMysterious issue with bytestring "LazyWord8.fromString literal" test# Reproduction
```
git clone https://github.com/haskell/bytestring
cd bytestring
# git checkout 06cbef10f4869c6afdac210a22d9813b4f7f2fe6
```
Run tests with GHC 8.10 and 9.0, both should succeed:
```
$ cabal run -w ghc-8.10.4 prop-compi...# Reproduction
```
git clone https://github.com/haskell/bytestring
cd bytestring
# git checkout 06cbef10f4869c6afdac210a22d9813b4f7f2fe6
```
Run tests with GHC 8.10 and 9.0, both should succeed:
```
$ cabal run -w ghc-8.10.4 prop-compiled -- --hide-successes -p "LazyWord8.fromString literal"
All 1 tests passed (0.00s)
$ cabal run -w ghc-9.0.1 prop-compiled -- --hide-successes -p "LazyWord8.fromString literal"
All 1 tests passed (0.00s)
```
Now apply an innocent patch:
```
$ git show d701a2a9a51da47da8240a7d3adf2794ba891e90
--- a/Data/ByteString/Lazy/Internal.hs
+++ b/Data/ByteString/Lazy/Internal.hs
+packBytes [] = Empty
packBytes cs0 =
packChunks 32 cs0
...
packChars :: [Char] -> ByteString
+packChars [] = Empty
packChars cs0 = packChunks 32 cs0
$ git cherry-pick d701a2a9a51da47da8240a7d3adf2794ba891e90
Auto-merging Data/ByteString/Lazy/Internal.hs
```
and rerun tests.
# Expected results
Tests suceed both in GHC 8.10.4 and 9.0.1.
# Actual results
Tests succeed in GHC 8.10.4, but fail in 9.0.1:
```
$ cabal run -w ghc-8.10.4 prop-compiled -- --hide-successes -p "LazyWord8.fromString literal"
All 1 tests passed (0.00s)
$ cabal run -w ghc-9.0.1 prop-compiled -- --hide-successes -p "LazyWord8.fromString literal"
All
LazyWord8
fromString literal: FAIL
*** Failed! Falsified (after 1 test)
```
What surprises me most is that the failing test has no apparent connection to the patch in question:
```haskell
, testProperty "fromString literal" $
fromString "\0\1\2\3\4" == B.pack [0,1,2,3,4]
```
See earlier discussion at https://github.com/haskell/bytestring/pull/394
CC @sjakobi @phadej9.0.2Matthew PickeringMatthew Pickeringhttps://gitlab.haskell.org/ghc/ghc/-/issues/19411fromIntegral (2^64 :: Integer) == (0 :: Natural)2021-12-26T13:23:06ZBodigrimfromIntegral (2^64 :: Integer) == (0 :: Natural)## Summary
`powModNatural` returns a wrong answer.
## Steps to reproduce
```haskell
import Data.Bits
import GHC.Natural
main = print $ powModNatural 0 (fromIntegral n) 2
where
n = 1 `shiftL` 64 :: Integer
{-# NOINLINE n #...## Summary
`powModNatural` returns a wrong answer.
## Steps to reproduce
```haskell
import Data.Bits
import GHC.Natural
main = print $ powModNatural 0 (fromIntegral n) 2
where
n = 1 `shiftL` 64 :: Integer
{-# NOINLINE n #-}
```
```
$ ghc -O1 powmod.hs && ./powmod
[1 of 1] Compiling Main ( powmod.hs, powmod.o )
Linking powmod ...
1
```
## Expected behavior
Expected answer is 0. Removing `NOINLINE`, changing `fromIntegral` to `fromInteger`, or switching to `-O0` all rectify the situation.
## Environment
* GHC version used: 9.0.1
Optional:
* Operating System: MacOS
* System Architecture: x649.0.2Sylvain HenrySylvain Henryhttps://gitlab.haskell.org/ghc/ghc/-/issues/197349.2.1-alpha2 fails to install on OS X2021-12-25T13:22:23ZEdward Kmett9.2.1-alpha2 fails to install on OS X## Summary
Attempting to install on a normal OSX machine fails.
## Steps to reproduce
Install:
In my case using
```
$ ghcup install ghc -u file:///Users/ekmett/ghc/ghc-9.2.0.20210422-x86_64-apple-darwin.tar.xz head
```
leads to
```...## Summary
Attempting to install on a normal OSX machine fails.
## Steps to reproduce
Install:
In my case using
```
$ ghcup install ghc -u file:///Users/ekmett/ghc/ghc-9.2.0.20210422-x86_64-apple-darwin.tar.xz head
```
leads to
```
[ ghc-make ] "/Users/ekmett/.ghcup/ghc/head/lib/ghc-9.2.0.20210422/bin/ghc-pkg" --force --global-package-db "/Users/ekmet...
a... dyld: Library not loaded: /nix/store/wxx8sfsa5x1753r8d1x8dx2927qncwbw-ncurses-6.2/lib/libncursesw.6.dylib
a...c-make ] Referenced from: /Users/ekmett/.ghcup/ghc/head/lib/ghc-9.2.0.20210422/terminfo-0.4.1.4/libHSterminfo-0.4.1...
[ ghc-make ] Reason: image not found
[ ghc-make ] make[1]: *** [install_packages] Abort trap: 6
a... make: *** [install] Error 2
```
I get the same error if I extract the distribution, `xattr -rc` and then `./configure` and `make install` as normal.
It appears that the distribution includes fixed path links to `nix-darwin` specific build paths.
## Expected behavior
Installation of ghc 9.2.1-alpha2.
## Environment
* GHC version used: 9.2.1-alpha2
Optional:
* Operating System: OSX
* System Architecture: Darwin9.2.1https://gitlab.haskell.org/ghc/ghc/-/issues/20079Strange IO and segmentation fault in ghci on Macos (aarch64)2021-12-25T13:21:44ZAlexey ProninStrange IO and segmentation fault in ghci on Macos (aarch64)## Summary
After moving the cursor left using arrow keys and pressing any keys, right part of previously inserted input duplicates.
Also, window resizing causes a segmentation fault.
## Steps to reproduce
1. Run ghci, press any keys, ...## Summary
After moving the cursor left using arrow keys and pressing any keys, right part of previously inserted input duplicates.
Also, window resizing causes a segmentation fault.
## Steps to reproduce
1. Run ghci, press any keys, move cursor left using arrow keys, press any keys
2. Resize terminal window
## Environment
* GHC version used: 8.10.5
Optional:
* Operating System: MacOS 11.4
* System Architecture: aarch64
![Screen_Recording_2021-07-04_at_23.37.40](/uploads/5586c7b867206097ab1024919332c656/Screen_Recording_2021-07-04_at_23.37.40.mov)8.10.6https://gitlab.haskell.org/ghc/ghc/-/issues/19684DerivedConstants.h not produced atomically2021-12-20T01:39:27ZSylvain HenryDerivedConstants.h not produced atomicallyWe have seen the following issue on CI (https://gitlab.haskell.org/ghc/ghc/-/jobs/645999):
```
| Run DeriveConstants: none => _build/stage1/lib/DerivedConstants.h (and 1 more)
| Run Cc FindCDependencies Stage1: rts/linker/elf_util.c => ...We have seen the following issue on CI (https://gitlab.haskell.org/ghc/ghc/-/jobs/645999):
```
| Run DeriveConstants: none => _build/stage1/lib/DerivedConstants.h (and 1 more)
| Run Cc FindCDependencies Stage1: rts/linker/elf_util.c => _build/stage1/rts/build/c/linker/elf_util.o.d
| Run Cc FindCDependencies Stage1: rts/sm/Storage.c => _build/stage1/rts/build/c/sm/Storage.o.d
| Run Cc FindCDependencies Stage1: rts/Hpc.c => _build/stage1/rts/build/c/Hpc.o.d
| Run Cc FindCDependencies Stage1: rts/StgPrimFloat.c => _build/stage1/rts/build/c/StgPrimFloat.o.d
| Run Cc FindCDependencies Stage1: rts/sm/NonMoving.c => _build/stage1/rts/build/c/sm/NonMoving.o.d
| Run Cc FindCDependencies Stage1: rts/RaiseAsync.c => _build/stage1/rts/build/c/RaiseAsync.o.d
| Run Cc FindCDependencies Stage1: rts/posix/Itimer.c => _build/stage1/rts/build/c/posix/Itimer.o.d
| Run Cc FindCDependencies Stage1: rts/hooks/MallocFail.c => _build/stage1/rts/build/c/hooks/MallocFail.o.d
| Run Cc FindCDependencies Stage1: rts/sm/MarkWeak.c => _build/stage1/rts/build/c/sm/MarkWeak.o.d
| Run Cc FindCDependencies Stage1: rts/StaticPtrTable.c => _build/stage1/rts/build/c/StaticPtrTable.o.d
| Run Cc FindCDependencies Stage1: rts/linker/elf_reloc.c => _build/stage1/rts/build/c/linker/elf_reloc.o.d
| Run Cc FindCDependencies Stage1: rts/OldARMAtomic.c => _build/stage1/rts/build/c/OldARMAtomic.o.d
| Run Ghc CompileCWithGhc Stage1: rts/hooks/MallocFail.c => _build/stage1/rts/build/c/hooks/MallocFail.o
| Run Ghc CompileCWithGhc Stage1: rts/hooks/StackOverflow.c => _build/stage1/rts/build/c/hooks/StackOverflow.o
| Run Cc FindCDependencies Stage1: rts/posix/Signals.c => _build/stage1/rts/build/c/posix/Signals.o.d
| Run Cc FindCDependencies Stage1: rts/PrimOps.cmm => _build/stage1/rts/build/cmm/PrimOps.o.d
| Run Cc FindCDependencies Stage1: rts/linker/MachO.c => _build/stage1/rts/build/c/linker/MachO.o.d
| Run Cc FindCDependencies Stage1: rts/ClosureFlags.c => _build/stage1/rts/build/c/ClosureFlags.o.d
| Run Ghc CompileCWithGhc Stage1: rts/OldARMAtomic.c => _build/stage1/rts/build/c/OldARMAtomic.o
| Run Cc FindCDependencies Stage1: rts/Inlines.c => _build/stage1/rts/build/c/Inlines.o.d
ghc: panic! (the 'impossible' happened)
(GHC version 9.1.20210410:
Couldn't find #define HS_CONSTANTS " in _build/stage1/lib/DerivedConstants.h
CallStack (from HasCallStack):
error, called at _build/stage0/compiler/build/GHC/Platform/Constants.hs:143:20 in ghc:GHC.Platform.Constants
```
It's because `DerivedConstants.h` file is not created atomically. Fix incoming.https://gitlab.haskell.org/ghc/ghc/-/issues/19994Darwin x86_64 fails during tests with out-of-memory2021-12-17T13:40:35ZMoritz AngermannDarwin x86_64 fails during tests with out-of-memoryWhile debugging the odd test failure issues on macOS (x86_64) with @mpickering we came up with the following test-program (against 8.10.5), that illustrates the issue:
```haskell
module Main where
import Outputable
import GHC.IO
import...While debugging the odd test failure issues on macOS (x86_64) with @mpickering we came up with the following test-program (against 8.10.5), that illustrates the issue:
```haskell
module Main where
import Outputable
import GHC.IO
import SysTools.Process
import Data.List ( isInfixOf, isPrefixOf )
import Data.IORef
import System.IO
import System.Process
import System.Environment
import Exception
-- See Note [Run-time linker info].
getCompilerInfo' :: String -> IO String
getCompilerInfo' pgm = do
let -- Try to grab the info from the process output.
parseCompilerInfo _stdo stde _exitc
-- Regular GCC
| any ("gcc version" `isInfixOf`) stde =
return "GCC"
-- Regular clang
| any ("clang version" `isInfixOf`) stde =
return "Clang"
-- FreeBSD clang
| any ("FreeBSD clang version" `isInfixOf`) stde =
return "Clang"
-- Xcode 5.1 clang
| any ("Apple LLVM version 5.1" `isPrefixOf`) stde =
return "AppleClang51"
-- Xcode 5 clang
| any ("Apple LLVM version" `isPrefixOf`) stde =
return "AppleClang"
-- Xcode 4.1 clang
| any ("Apple clang version" `isPrefixOf`) stde =
return "AppleClang"
-- Unknown compiler.
| otherwise = fail $ "invalid -v output, or compiler is unsupported (" ++ pgm ++ "): " ++ unlines stde
-- Process the executable call
catchIO (do
(exitc, stdo, stde) <- do
env <- getEnvironment
readCreateProcessWithExitCode ((proc pgm ["-v"]) { env = Just env }) ""
env <- show <$> getEnvironment
print $ length env
-- Split the output by lines to make certain kinds
-- of processing easier.
parseCompilerInfo (lines stdo) (lines stde) exitc
)
(\err -> do
print $ "Warning:\nCouldn't figure out C compiler information!\nMake sure you're using GNU gcc, or clang\n" ++ show err
return "UnknownCC"
)
main = do
print =<< getCompilerInfo' "clang"
main
```
fundamentally the issue appears to be due to the large ENV in a nix shell and `readCreateProcessWithExitCode` not handling large env strings. Notabley the lengh of the show on env is `29299`.8.10.6Ben GamariBen Gamari