GHC issueshttps://gitlab.haskell.org/ghc/ghc/-/issues2019-07-07T19:02:45Zhttps://gitlab.haskell.org/ghc/ghc/-/issues/3694Image link in User's Guide is broken2019-07-07T19:02:45ZjliImage link in User's Guide is brokenIn section 5.1.1 "Inserting cost centres by hand" of the user's guide, there's an image of a heap profile, but the image doesn't exist.
section 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html\#id514538
imag...In section 5.1.1 "Inserting cost centres by hand" of the user's guide, there's an image of a heap profile, but the image doesn't exist.
section 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html\#id514538
image link: http://www.haskell.org/ghc/docs/latest/html/users_guide/prof_scc
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------- |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Documentation |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Image link in User's Guide is broken","status":"New","operating_system":"","component":"Documentation","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In section 5.1.1 \"Inserting cost centres by hand\" of the user's guide, there's an image of a heap profile, but the image doesn't exist.\r\n\r\nsection 5.1.1: http://www.haskell.org/ghc/docs/latest/html/users_guide/profiling.html#id514538\r\nimage link: http://www.haskell.org/ghc/docs/latest/html/users_guide/prof_scc","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3685"double free or corruption" error when running Setup.hs with other GHC in PATH2019-07-07T19:02:48Zajd"double free or corruption" error when running Setup.hs with other GHC in PATHInside network-2.2.1.5 source directory:
```
$ /home/alex/usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6...Inside network-2.2.1.5 source directory:
```
$ /home/alex/usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121
$ /usr/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.10.4
$ echo $PATH
/home/alex/.cabal/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
$ /home/alex/usr/bin/ghc --make Setup.hs
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Setup.hs:3:0:
Warning: In the use of `defaultUserHooks'
(imported from Distribution.Simple):
Deprecated: "Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2
compatibility in which case you must stick with defaultUserHooks"
Linking Setup ...
$ ./Setup configure
Warning: defaultUserHooks in Setup script is deprecated.
Configuring network-2.2.1.5...
Setup: fd:5: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)
*** glibc detected *** ./Setup: double free or corruption (!prev): 0x08e21050 ***
======= Backtrace: =========
/lib/libc.so.6(+0x6b6c1)[0xb76166c1]
/lib/libc.so.6(+0x6cf18)[0xb7617f18]
/lib/libc.so.6(cfree+0x6d)[0xb761af8d]
/lib/libc.so.6(+0x1829c)[0xb75c329c]
/lib/libc.so.6(iconv_close+0x1c)[0xb75c27ec]
./Setup[0x821f6b9]
======= Memory map: ========
08048000-082be000 r-xp 00000000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup
082be000-082ed000 rwxp 00275000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup
082ed000-082f0000 rwxp 00000000 00:00 0
08dbf000-08e4a000 rwxp 00000000 00:00 0 [heap]
b6f00000-b6f21000 rwxp 00000000 00:00 0
b6f21000-b7000000 ---p 00000000 00:00 0
b70c8000-b70e5000 r-xp 00000000 08:03 385336 /usr/lib/libgcc_s.so.1
b70e5000-b70e6000 rwxp 0001c000 08:03 385336 /usr/lib/libgcc_s.so.1
b7100000-b7300000 rwxp 00000000 00:00 0
b7391000-b7591000 r-xp 00000000 08:03 396531 /usr/lib/locale/locale-archive
b7591000-b7592000 rwxp 00000000 00:00 0
b7592000-b75a7000 r-xp 00000000 08:03 262160 /lib/libpthread-2.11.so
b75a7000-b75a8000 r-xp 00014000 08:03 262160 /lib/libpthread-2.11.so
b75a8000-b75a9000 rwxp 00015000 08:03 262160 /lib/libpthread-2.11.so
b75a9000-b75ab000 rwxp 00000000 00:00 0
b75ab000-b76eb000 r-xp 00000000 08:03 262169 /lib/libc-2.11.so
b76eb000-b76ed000 r-xp 00140000 08:03 262169 /lib/libc-2.11.so
b76ed000-b76ee000 rwxp 00142000 08:03 262169 /lib/libc-2.11.so
b76ee000-b76f1000 rwxp 00000000 00:00 0
b76f1000-b7715000 r-xp 00000000 08:03 262184 /lib/libm-2.11.so
b7715000-b7716000 r-xp 00023000 08:03 262184 /lib/libm-2.11.so
b7716000-b7717000 rwxp 00024000 08:03 262184 /lib/libm-2.11.so
b7717000-b7718000 rwxp 00000000 00:00 0
b7718000-b7762000 r-xp 00000000 08:03 388239 /usr/lib/libgmp.so.3.5.0
b7762000-b7765000 rwxp 00049000 08:03 388239 /usr/lib/libgmp.so.3.5.0
b7765000-b7767000 r-xp 00000000 08:03 262188 /lib/libdl-2.11.so
b7767000-b7768000 r-xp 00001000 08:03 262188 /lib/libdl-2.11.so
b7768000-b7769000 rwxp 00002000 08:03 262188 /lib/libdl-2.11.so
b7769000-b776b000 r-xp 00000000 08:03 262274 /lib/libutil-2.11.so
b776b000-b776c000 r-xp 00001000 08:03 262274 /lib/libutil-2.11.so
b776c000-b776d000 rwxp 00002000 08:03 262274 /lib/libutil-2.11.so
b776d000-b7774000 r-xp 00000000 08:03 262277 /lib/librt-2.11.so
b7774000-b7775000 r-xp 00006000 08:03 262277 /lib/librt-2.11.so
b7775000-b7776000 rwxp 00007000 08:03 262277 /lib/librt-2.11.so
b778c000-b778e000 r-xp 00000000 08:03 184559 /usr/lib/gconv/UTF-32.so
b778e000-b778f000 r-xp 00001000 08:03 184559 /usr/lib/gconv/UTF-32.so
b778f000-b7790000 rwxp 00002000 08:03 184559 /usr/lib/gconv/UTF-32.so
b7790000-b7791000 rwxp 00000000 00:00 0
b7791000-b7792000 r-xp 00000000 00:00 0 [vdso]
b7792000-b77ae000 r-xp 00000000 08:03 262276 /lib/ld-2.11.so
b77ae000-b77af000 r-xp 0001b000 08:03 262276 /lib/ld-2.11.so
b77af000-b77b0000 rwxp 0001c000 08:03 262276 /lib/ld-2.11.so
bffe2000-bfff7000 rwxp 00000000 00:00 0 [stack]
Aborted
```
Basically, a Setup script compiled with a different GHC than the one that Setup is using fails with a memory error.
See attached file for `/usr/bin/ghc-pkg dump` output.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.11 |
| 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":"\"double free or corruption\" error when running Setup.hs with other GHC in PATH","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.11","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Inside network-2.2.1.5 source directory:\r\n\r\n{{{\r\n$ /home/alex/usr/bin/ghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 6.12.0.20091121\r\n$ /usr/bin/ghc --version\r\nThe Glorious Glasgow Haskell Compilation System, version 6.10.4\r\n$ echo $PATH\r\n/home/alex/.cabal/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core\r\n$ /home/alex/usr/bin/ghc --make Setup.hs \r\n[1 of 1] Compiling Main ( Setup.hs, Setup.o )\r\n\r\nSetup.hs:3:0:\r\n Warning: In the use of `defaultUserHooks'\r\n (imported from Distribution.Simple):\r\n Deprecated: \"Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2\r\n compatibility in which case you must stick with defaultUserHooks\"\r\nLinking Setup ...\r\n$ ./Setup configure\r\nWarning: defaultUserHooks in Setup script is deprecated.\r\nConfiguring network-2.2.1.5...\r\nSetup: fd:5: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)\r\n*** glibc detected *** ./Setup: double free or corruption (!prev): 0x08e21050 ***\r\n======= Backtrace: =========\r\n/lib/libc.so.6(+0x6b6c1)[0xb76166c1]\r\n/lib/libc.so.6(+0x6cf18)[0xb7617f18]\r\n/lib/libc.so.6(cfree+0x6d)[0xb761af8d]\r\n/lib/libc.so.6(+0x1829c)[0xb75c329c]\r\n/lib/libc.so.6(iconv_close+0x1c)[0xb75c27ec]\r\n./Setup[0x821f6b9]\r\n======= Memory map: ========\r\n08048000-082be000 r-xp 00000000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup\r\n082be000-082ed000 rwxp 00275000 fe:00 1603797 /home/alex/src/network-2.2.1.5/Setup\r\n082ed000-082f0000 rwxp 00000000 00:00 0 \r\n08dbf000-08e4a000 rwxp 00000000 00:00 0 [heap]\r\nb6f00000-b6f21000 rwxp 00000000 00:00 0 \r\nb6f21000-b7000000 ---p 00000000 00:00 0 \r\nb70c8000-b70e5000 r-xp 00000000 08:03 385336 /usr/lib/libgcc_s.so.1\r\nb70e5000-b70e6000 rwxp 0001c000 08:03 385336 /usr/lib/libgcc_s.so.1\r\nb7100000-b7300000 rwxp 00000000 00:00 0 \r\nb7391000-b7591000 r-xp 00000000 08:03 396531 /usr/lib/locale/locale-archive\r\nb7591000-b7592000 rwxp 00000000 00:00 0 \r\nb7592000-b75a7000 r-xp 00000000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a7000-b75a8000 r-xp 00014000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a8000-b75a9000 rwxp 00015000 08:03 262160 /lib/libpthread-2.11.so\r\nb75a9000-b75ab000 rwxp 00000000 00:00 0 \r\nb75ab000-b76eb000 r-xp 00000000 08:03 262169 /lib/libc-2.11.so\r\nb76eb000-b76ed000 r-xp 00140000 08:03 262169 /lib/libc-2.11.so\r\nb76ed000-b76ee000 rwxp 00142000 08:03 262169 /lib/libc-2.11.so\r\nb76ee000-b76f1000 rwxp 00000000 00:00 0 \r\nb76f1000-b7715000 r-xp 00000000 08:03 262184 /lib/libm-2.11.so\r\nb7715000-b7716000 r-xp 00023000 08:03 262184 /lib/libm-2.11.so\r\nb7716000-b7717000 rwxp 00024000 08:03 262184 /lib/libm-2.11.so\r\nb7717000-b7718000 rwxp 00000000 00:00 0 \r\nb7718000-b7762000 r-xp 00000000 08:03 388239 /usr/lib/libgmp.so.3.5.0\r\nb7762000-b7765000 rwxp 00049000 08:03 388239 /usr/lib/libgmp.so.3.5.0\r\nb7765000-b7767000 r-xp 00000000 08:03 262188 /lib/libdl-2.11.so\r\nb7767000-b7768000 r-xp 00001000 08:03 262188 /lib/libdl-2.11.so\r\nb7768000-b7769000 rwxp 00002000 08:03 262188 /lib/libdl-2.11.so\r\nb7769000-b776b000 r-xp 00000000 08:03 262274 /lib/libutil-2.11.so\r\nb776b000-b776c000 r-xp 00001000 08:03 262274 /lib/libutil-2.11.so\r\nb776c000-b776d000 rwxp 00002000 08:03 262274 /lib/libutil-2.11.so\r\nb776d000-b7774000 r-xp 00000000 08:03 262277 /lib/librt-2.11.so\r\nb7774000-b7775000 r-xp 00006000 08:03 262277 /lib/librt-2.11.so\r\nb7775000-b7776000 rwxp 00007000 08:03 262277 /lib/librt-2.11.so\r\nb778c000-b778e000 r-xp 00000000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb778e000-b778f000 r-xp 00001000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb778f000-b7790000 rwxp 00002000 08:03 184559 /usr/lib/gconv/UTF-32.so\r\nb7790000-b7791000 rwxp 00000000 00:00 0 \r\nb7791000-b7792000 r-xp 00000000 00:00 0 [vdso]\r\nb7792000-b77ae000 r-xp 00000000 08:03 262276 /lib/ld-2.11.so\r\nb77ae000-b77af000 r-xp 0001b000 08:03 262276 /lib/ld-2.11.so\r\nb77af000-b77b0000 rwxp 0001c000 08:03 262276 /lib/ld-2.11.so\r\nbffe2000-bfff7000 rwxp 00000000 00:00 0 [stack]\r\nAborted\r\n}}}\r\n\r\nBasically, a Setup script compiled with a different GHC than the one that Setup is using fails with a memory error.\r\n\r\nSee attached file for {{{/usr/bin/ghc-pkg dump}}} output.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3604Use of template-haskell is broken with shared libraries2019-07-07T19:03:09ZguestUse of template-haskell is broken with shared librariesConsider the following program:
TH.hs:
```
{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH
spliceMe = [| (\xs -> tail xs ++ init xs) |]
```
Library.hs
```
{-# LANGUAGE TemplateHaskell #-}
module Library ...Consider the following program:
TH.hs:
```
{-# LANGUAGE TemplateHaskell #-}
module TH where
import Language.Haskell.TH
spliceMe = [| (\xs -> tail xs ++ init xs) |]
```
Library.hs
```
{-# LANGUAGE TemplateHaskell #-}
module Library where
import TH
main = print ($(spliceMe) [1, 2])
```
Build it like so:
```
ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/a
utogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e
12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC
```
And observe the wonderful error:
```
Creating dist/build (and its parents)
Creating dist/build/autogen (and its parents)
Preprocessing library foo-0.2.3...
Building foo-0.2.3...
Building library...
Creating dist/build (and its parents)
/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library
/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC
[2 of 2] Compiling Library ( Library.hs, dist/build/Library.dyn_o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.3.0.0 ... linking ... done.
Loading package containers-0.3.0.0 ... linking ... done.
Loading package pretty-1.0.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
ghc-stage2: dist/build/TH.dyn_o: unknown symbol `__stginit_base_Prelude_dyn'
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------------------------------------ |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | batterseapower@hotmail.com, ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Use of template-haskell is broken with shared libraries","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["batterseapower@hotmail.com","ndmitchell@gmail.com"],"type":"Bug","description":"Consider the following program:\r\n\r\nTH.hs:\r\n{{{\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule TH where\r\n\r\nimport Language.Haskell.TH\r\n\r\nspliceMe = [| (\\xs -> tail xs ++ init xs) |]\r\n}}}\r\n\r\nLibrary.hs\r\n{{{\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Library where\r\n\r\nimport TH\r\n\r\nmain = print ($(spliceMe) [1, 2])\r\n}}}\r\n\r\nBuild it like so:\r\n\r\n{{{\r\nghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/a\r\nutogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e\r\n12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC\r\n}}}\r\n\r\nAnd observe the wonderful error:\r\n\r\n{{{\r\nCreating dist/build (and its parents)\r\nCreating dist/build/autogen (and its parents)\r\nPreprocessing library foo-0.2.3...\r\nBuilding foo-0.2.3...\r\nBuilding library...\r\nCreating dist/build (and its parents)\r\n/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library\r\n/home/a1333478/bin/ghc --make -package-name foo-0.2.3 -hide-all-packages -fbuilding-cabal-package -no-user-package-conf -i -idist/build -i. -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -odir dist/build -hidir dist/build -stubdir dist/build -package-id base-4.2.0.0-e0460a0a4effe0aca049da0e12eab4d3 -package-id template-haskell-2.4.0.0-fa9ea4aecb54a2910620fe9afd9f40f1 -O Library -dynamic -hisuf dyn_hi -osuf dyn_o -fPIC\r\n[2 of 2] Compiling Library ( Library.hs, dist/build/Library.dyn_o )\r\nLoading package ghc-prim ... linking ... done.\r\nLoading package integer-gmp ... linking ... done.\r\nLoading package base ... linking ... done.\r\nLoading package array-0.3.0.0 ... linking ... done.\r\nLoading package containers-0.3.0.0 ... linking ... done.\r\nLoading package pretty-1.0.1.1 ... linking ... done.\r\nLoading package template-haskell ... linking ... done.\r\nLoading package ffi-1.0 ... linking ... done.\r\nghc-stage2: dist/build/TH.dyn_o: unknown symbol `__stginit_base_Prelude_dyn'\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3600Template Haskell mis-coverting empty list to empty string2021-11-02T09:27:33ZSimon Peyton JonesTemplate Haskell mis-coverting empty list to empty stringAntoine Latter aslatter\@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2...Antoine Latter aslatter\@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2-5
myFunction[aLQ] = Demo2.testFun []
Ok, modules loaded: Demo2, Main.
```
In 6.12rc1:
```
Demo.hs:1:0:
Demo.hs:1:0: Splicing declarations
test
======>
Demo.hs:6:2-5
myFunction[aNX] = testFun ""
Demo.hs:6:2:
Couldn't match expected type `[Char]' against inferred type `Char'
Expected type: [String]
Inferred type: [Char]
In the first argument of `testFun', namely `""'
In the expression: testFun ""
Failed, modules loaded: Demo2.
```
The code is short:
```
---------- Demo.hs ---------------
{-# LANGUAGE TemplateHaskell #-}
module Demo where
import Demo2
$(test)
---------- Demo2.hs ---------------
{-# LANGUAGE TemplateHaskell #-}
module Demo2 where
import Language.Haskell.TH
test :: Q [Dec]
test = do
let args = [] :: [String]
body = [| testFun args |]
decNm <- newName "myFunction"
(:[]) `fmap` funD decNm [clause [] (normalB body) []]
testFun :: [String] -> String
testFun _ = "hello"
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ---------------- |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Template Haskell |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Template Haskell mis-coverting empty list to empty string","status":"New","operating_system":"","component":"Template Haskell","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Antoine Latter aslatter@gmail.com writes: the program Demo.hs compiles on 6.10, but not on 6.12rc1. The output --ddump-splices for 6.10:\r\n{{{\r\nDemo.hs:1:0:\r\n Demo.hs:1:0: Splicing declarations\r\n test\r\n ======>\r\n Demo.hs:6:2-5\r\n myFunction[aLQ] = Demo2.testFun []\r\nOk, modules loaded: Demo2, Main.\r\n}}}\r\nIn 6.12rc1:\r\n{{{\r\nDemo.hs:1:0:\r\n Demo.hs:1:0: Splicing declarations\r\n test\r\n ======>\r\n Demo.hs:6:2-5\r\n myFunction[aNX] = testFun \"\"\r\n\r\nDemo.hs:6:2:\r\n Couldn't match expected type `[Char]' against inferred type `Char'\r\n Expected type: [String]\r\n Inferred type: [Char]\r\n In the first argument of `testFun', namely `\"\"'\r\n In the expression: testFun \"\"\r\nFailed, modules loaded: Demo2.\r\n}}}\r\nThe code is short:\r\n{{{\r\n---------- Demo.hs ---------------\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Demo where\r\nimport Demo2\r\n$(test)\r\n\r\n---------- Demo2.hs ---------------\r\n{-# LANGUAGE TemplateHaskell #-}\r\nmodule Demo2 where\r\n\r\nimport Language.Haskell.TH\r\n\r\ntest :: Q [Dec]\r\ntest = do\r\n let args = [] :: [String]\r\n body = [| testFun args |]\r\n decNm <- newName \"myFunction\"\r\n (:[]) `fmap` funD decNm [clause [] (normalB body) []]\r\n\r\ntestFun :: [String] -> String\r\ntestFun _ = \"hello\"\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3591A working program reports <<loop>> when compiled with -O2021-04-07T16:37:52ZGhost UserA working program reports <<loop>> when compiled with -OIf the attached module Trampoline.hs is compiled with no optimizations it works:
```
$ ghc --make Trampoline.hs
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
...
((5,2),(1,...If the attached module Trampoline.hs is compiled with no optimizations it works:
```
$ ghc --make Trampoline.hs
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
...
((5,2),(1,2,6))
$
```
With optimizations on, it hangs:
```
$ ghc --make Trampoline.hs -O
[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )
Linking Trampoline ...
$ ./Trampoline
bounce start
bounce end
liftOut
inject suspend
Trampoline: <<loop>>
```
That doesn't seem right. Oh, GHCi runs it with no problem as well.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| 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":"A working program reports <<loop>> when compiled with -O","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If the attached module Trampoline.hs is compiled with no optimizations it works:\r\n\r\n{{{\r\n$ ghc --make Trampoline.hs \r\n[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )\r\nLinking Trampoline ...\r\n$ ./Trampoline \r\n...\r\n((5,2),(1,2,6))\r\n$ \r\n}}}\r\n\r\nWith optimizations on, it hangs:\r\n\r\n{{{\r\n$ ghc --make Trampoline.hs -O\r\n[1 of 1] Compiling Main ( Trampoline.hs, Trampoline.o )\r\nLinking Trampoline ...\r\n$ ./Trampoline \r\nbounce start\r\nbounce end\r\nliftOut\r\ninject suspend\r\nTrampoline: <<loop>>\r\n}}}\r\n\r\nThat doesn't seem right. Oh, GHCi runs it with no problem as well.\r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3579Error: symbol `Bug_compose1_closure' is already defined2019-07-07T19:03:16ZIan Lynagh <igloo@earth.li>Error: symbol `Bug_compose1_closure' is already definedIn http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:
```
module Bug where
compose :: [a -> a] -> a -> a
compose = foldr (.) id
class Compose a where
compose1 :: a -> a -> a
```
```
$ g...In http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:
```
module Bug where
compose :: [a -> a] -> a -> a
compose = foldr (.) id
class Compose a where
compose1 :: a -> a -> a
```
```
$ ghc -c -O p.hs
/tmp/ghc12944_0/ghc12944_0.s: Assembler messages:
/tmp/ghc12944_0/ghc12944_0.s:22:0:
Error: symbol `Bug_compose1_closure' is already defined
/tmp/ghc12944_0/ghc12944_0.s:98:0:
Error: symbol `Bug_compose1_info' is already defined
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Error: symbol `Bug_compose1_closure' is already defined","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"In http://www.haskell.org/pipermail/glasgow-haskell-bugs/2009-October/020608.html Serge reports:\r\n\r\n{{{\r\nmodule Bug where\r\n\r\ncompose :: [a -> a] -> a -> a\r\ncompose = foldr (.) id\r\n\r\nclass Compose a where\r\n compose1 :: a -> a -> a\r\n}}}\r\n\r\n{{{\r\n$ ghc -c -O p.hs\r\n/tmp/ghc12944_0/ghc12944_0.s: Assembler messages:\r\n\r\n/tmp/ghc12944_0/ghc12944_0.s:22:0:\r\n Error: symbol `Bug_compose1_closure' is already defined\r\n\r\n/tmp/ghc12944_0/ghc12944_0.s:98:0:\r\n Error: symbol `Bug_compose1_info' is already defined\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3578internal error: evacuate(static): strange closure type 422019-07-07T19:03:17Znccbinternal error: evacuate(static): strange closure type 42I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):
chp-boids: internal error: evacuate(static): strange closur...I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):
chp-boids: internal error: evacuate(static): strange closure type 42
(GHC version 6.12.0.20091010 for i386_unknown_linux)
> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Aborted
It produces it much sooner with +RTS -N2 than +RTS -N1, but both settings can produce the error. The output doesn't look like it will be very useful to you -- what can I run to give a better output?
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.13 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"internal error: evacuate(static): strange closure type 42","status":"New","operating_system":"","component":"Runtime System","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.13","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"I have a concurrent program (using CHP, which sits on top of STM+forkIO), that is able to produce this error on GHC 6.12.1-rc1 (which doesn't appear on your version drop-down):\r\n\r\nchp-boids: internal error: evacuate(static): strange closure type 42\r\n (GHC version 6.12.0.20091010 for i386_unknown_linux)\r\n Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\nAborted\r\n\r\nIt produces it much sooner with +RTS -N2 than +RTS -N1, but both settings can produce the error. The output doesn't look like it will be very useful to you -- what can I run to give a better output?\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3546Use of float type in unregistered build freezes program2019-07-07T19:03:24ZdtereiUse of float type in unregistered build freezes programIf you compile a ghc HEAD version in unregistered mode there is a bug that causes any programs compiled by this ghc to freeze when they try to access a float.
## build.mk
```
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcO...If you compile a ghc HEAD version in unregistered mode there is a bug that causes any programs compiled by this ghc to freeze when they try to access a float.
## build.mk
```
SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O
GhcStage2HcOpts = -O2
GhcHcOpts = -Rghc-timing
GhcLibHcOpts = -O2 -XGenerics
GhcLibWays += p
SplitObjs = NO
HADDOCK_DOCS = NO
BUILD_DOCBOOK_HTML = NO
BUILD_DOCBOOK_PS = NO
BUILD_DOCBOOK_PDF = NO
GhcUnregisterised = YES
GhcWithNativeCodeGen = NO
```
## Program which produces bug:
```
main = do
putStrLn "Print float test"
putStrLn (show (1.2312341::Float))
```
## Steps to reproduce
1. Compile latest version of ghc from darcs using the above build.mk configuration (other build.mk trigger the bug as well, must be unregistered though).
1. Compile the above haskell program with this ghc.
1. Run the program, it will freeze indefinitely
1. The test case *arith006* also triggers the bug.
## My machine
- x86, Ubuntu 9.04, 32 bit.
- uname -v
```
Linux david-laptop 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux
```
- gcc -v
```
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | |
| 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":"Use of float type in unregistered build freezes program","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"","keywords":["float","freezes","unregistered"],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"If you compile a ghc HEAD version in unregistered mode there is a bug that causes any programs compiled by this ghc to freeze when they try to access a float.\r\n\r\n== build.mk ==\r\n{{{\r\nSRC_HC_OPTS = -O -H64m\r\nGhcStage1HcOpts = -O\r\nGhcStage2HcOpts = -O2\r\nGhcHcOpts = -Rghc-timing\r\nGhcLibHcOpts = -O2 -XGenerics\r\nGhcLibWays += p\r\nSplitObjs = NO\r\n\r\nHADDOCK_DOCS = NO\r\nBUILD_DOCBOOK_HTML = NO\r\nBUILD_DOCBOOK_PS = NO\r\nBUILD_DOCBOOK_PDF = NO\r\n\r\nGhcUnregisterised = YES\r\nGhcWithNativeCodeGen = NO\r\n}}}\r\n\r\n== Program which produces bug: ==\r\n{{{\r\nmain = do\r\n putStrLn \"Print float test\"\r\n putStrLn (show (1.2312341::Float))\r\n}}}\r\n\r\n\r\n== Steps to reproduce ==\r\n 1. Compile latest version of ghc from darcs using the above build.mk configuration (other build.mk trigger the bug as well, must be unregistered though).\r\n 2. Compile the above haskell program with this ghc.\r\n 3. Run the program, it will freeze indefinitely\r\n 4. The test case ''arith006'' also triggers the bug.\r\n\r\n== My machine ==\r\n * x86, Ubuntu 9.04, 32 bit.\r\n * uname -v\r\n{{{\r\nLinux david-laptop 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux\r\n}}}\r\n * gcc -v\r\n{{{\r\nUsing built-in specs.\r\nTarget: i486-linux-gnu\r\nConfigured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu\r\nThread model: posix\r\ngcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3303Allow multi-line deprecation messages.2019-07-07T19:04:30ZduncanAllow multi-line deprecation messages.Sometimes one line just isn't enough. There's two related issues, pretty source code and pretty warning messages.
It is a bit annoying when a `DEPRECATED` pragma stretches on past 80-100 columns or whatever. Does the ordinary multi-line...Sometimes one line just isn't enough. There's two related issues, pretty source code and pretty warning messages.
It is a bit annoying when a `DEPRECATED` pragma stretches on past 80-100 columns or whatever. Does the ordinary multi-line Haskell string syntax work in this situation? Even if it does it's not useful in practice due to the cpp-incompatibility, and because it's a pragma, we cannot use the normal `++` trick.
The other is presenting multi-line error messages to the user. Sometimes we want to present more info, like not just what the alternative is but for example when the alternative was added and when the deprecated thing will be removed.
In Cabal for example we've got ugly hack:
```
{-# DEPRECATED defaultUserHooks
"Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2\n compatibility in which case you must stick with defaultUserHooks" #-}
```
Yes it's really that wide :-)
Reformatted:
```
{-# DEPRECATED defaultUserHooks
"Use simpleUserHooks or autoconfUserHooks, unless you \
need Cabal-1.2\n compatibility in which \
case you must stick with defaultUserHooks" #-}
```
Note the silly `"\n "` to make the multi-line message line up ok in current ghc versions.
To allow embedded '\\n' more sensibly, it just needs a slight tweak in the rendering. Split the message into lines and then use `hsep` or equivalent. That way we get correct indenting for free.
I'm not sure how long single-line messages get printed, but Cabal solves this problem for its error messages by re-wrapping text, though it also respects embedded newlines (to force line breaks or paragraph breaks).
```
-- | Wraps text to the default line width. Existing newlines are preserved.
wrapText :: String -> String
wrapText = unlines
. concatMap (map unwords
. wrapLine 79
. words)
. lines
-- | Wraps a list of words to a list of lines of words of a particular width.
wrapLine :: Int -> [String] -> [[String]]
wrapLine width = wrap 0 []
where wrap :: Int -> [String] -> [String] -> [[String]]
wrap 0 [] (w:ws)
| length w + 1 > width
= wrap (length w) [w] ws
wrap col line (w:ws)
| col + length w + 1 > width
= reverse line : wrap 0 [] (w:ws)
wrap col line (w:ws)
= let col' = col + length w + 1
in wrap col' (w:line) ws
wrap _ [] [] = []
wrap _ line [] = [reverse line]
```
There's also a more sophisticated version of this using the `Doc` type in the gtk2hs code gen utils. It has a parameter for the line width and handles prefix text on the first line.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.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":"Allow multi-line deprecation messages.","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Sometimes one line just isn't enough. There's two related issues, pretty source code and pretty warning messages.\r\n\r\nIt is a bit annoying when a `DEPRECATED` pragma stretches on past 80-100 columns or whatever. Does the ordinary multi-line Haskell string syntax work in this situation? Even if it does it's not useful in practice due to the cpp-incompatibility, and because it's a pragma, we cannot use the normal `++` trick.\r\n\r\nThe other is presenting multi-line error messages to the user. Sometimes we want to present more info, like not just what the alternative is but for example when the alternative was added and when the deprecated thing will be removed.\r\n\r\nIn Cabal for example we've got ugly hack:\r\n{{{\r\n{-# DEPRECATED defaultUserHooks\r\n \"Use simpleUserHooks or autoconfUserHooks, unless you need Cabal-1.2\\n compatibility in which case you must stick with defaultUserHooks\" #-}\r\n}}}\r\n\r\nYes it's really that wide :-)\r\n\r\nReformatted:\r\n{{{\r\n{-# DEPRECATED defaultUserHooks\r\n \"Use simpleUserHooks or autoconfUserHooks, unless you \\\r\n need Cabal-1.2\\n compatibility in which \\\r\n case you must stick with defaultUserHooks\" #-}\r\n}}}\r\n\r\nNote the silly `\"\\n \"` to make the multi-line message line up ok in current ghc versions.\r\n\r\nTo allow embedded '\\n' more sensibly, it just needs a slight tweak in the rendering. Split the message into lines and then use `hsep` or equivalent. That way we get correct indenting for free.\r\n\r\nI'm not sure how long single-line messages get printed, but Cabal solves this problem for its error messages by re-wrapping text, though it also respects embedded newlines (to force line breaks or paragraph breaks).\r\n\r\n{{{\r\n-- | Wraps text to the default line width. Existing newlines are preserved.\r\nwrapText :: String -> String\r\nwrapText = unlines\r\n . concatMap (map unwords\r\n . wrapLine 79\r\n . words)\r\n . lines\r\n\r\n-- | Wraps a list of words to a list of lines of words of a particular width.\r\nwrapLine :: Int -> [String] -> [[String]]\r\nwrapLine width = wrap 0 []\r\n where wrap :: Int -> [String] -> [String] -> [[String]]\r\n wrap 0 [] (w:ws)\r\n | length w + 1 > width\r\n = wrap (length w) [w] ws\r\n wrap col line (w:ws)\r\n | col + length w + 1 > width\r\n = reverse line : wrap 0 [] (w:ws)\r\n wrap col line (w:ws)\r\n = let col' = col + length w + 1\r\n in wrap col' (w:line) ws\r\n wrap _ [] [] = []\r\n wrap _ line [] = [reverse line]\r\n}}}\r\n\r\nThere's also a more sophisticated version of this using the `Doc` type in the gtk2hs code gen utils. It has a parameter for the line width and handles prefix text on the first line.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3301Update Haskeline2021-11-02T09:27:33ZcjsUpdate HaskelineGHC 6.10.3 switched from readline/editline to [Haskeline](http://trac.haskell.org/haskeline) as the command-line editor in ghci. Unfortunately, this lost a lot of the vi-mode editing functionality, as the version of Haskeline ghci uses h...GHC 6.10.3 switched from readline/editline to [Haskeline](http://trac.haskell.org/haskeline) as the command-line editor in ghci. Unfortunately, this lost a lot of the vi-mode editing functionality, as the version of Haskeline ghci uses had very limited support for vi mode.
This support has been improving quickly in Haskeline's trunk, thanks to vi-mode users using the release and submitting bug reports. When the next version of GHC is released, a new release of Haskeline with all of these updates should be cut, and incorporated into GHC.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.3 |
| Type | MergeReq |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | GHCi |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Update Haskeline","status":"New","operating_system":"","component":"GHCi","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.3","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"MergeReq","description":"GHC 6.10.3 switched from readline/editline to [http://trac.haskell.org/haskeline Haskeline] as the command-line editor in ghci. Unfortunately, this lost a lot of the vi-mode editing functionality, as the version of Haskeline ghci uses had very limited support for vi mode.\r\n\r\nThis support has been improving quickly in Haskeline's trunk, thanks to vi-mode users using the release and submitting bug reports. When the next version of GHC is released, a new release of Haskeline with all of these updates should be cut, and incorporated into GHC.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3263Warnings for monadic values not used2019-07-07T19:04:41ZNeil MitchellWarnings for monadic values not usedI would like two warnings. The first `-fwarn-unused-monad-bind`:
```
do doesFileExist "foo" ; return 1
```
`doesFileExist` returns a value of `IO Bool`, not `IO ()`, and does not bind it's result. This warning should be applied to both...I would like two warnings. The first `-fwarn-unused-monad-bind`:
```
do doesFileExist "foo" ; return 1
```
`doesFileExist` returns a value of `IO Bool`, not `IO ()`, and does not bind it's result. This warning should be applied to both `do` notation and `>>` and should fire on all values which aren't `m ()`.
The second `-fwarn-wrong-bind`:
```
do return (doesFileExist "foo") ; return 1
```
`doesFileExist` returns a value of type `IO (IO a)`, which is not bound. This warning should fire on all `m (m a)` values and also in `>>`.
The names of the flags are intended to be placeholders for a sensibly chosen name. I would make `-fwarn-wrong-bind` on as a default warning, and both turned on under `-Wall`. I'm not sure anyone has ever written the second construction without it being a serious error. In the case of `IO` it's really easy to miss that some side effects are no longer happening after a refactoring. I've just made this very mistake in fairly public way.
It seems that problems such as `mapM` space leaks are common, and that it is not widely known that such constructions without a named binding are always wrong. I've had to explain the problem to fairly experienced Haskell programmers.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------------- |
| Version | 6.10.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | ndmitchell@gmail.com |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Warnings for monadic values not used","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.2","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":["ndmitchell@gmail.com"],"type":"FeatureRequest","description":"I would like two warnings. The first {{{-fwarn-unused-monad-bind}}}:\r\n\r\n{{{\r\ndo doesFileExist \"foo\" ; return 1\r\n}}}\r\n\r\n{{{doesFileExist}}} returns a value of {{{IO Bool}}}, not {{{IO ()}}}, and does not bind it's result. This warning should be applied to both {{{do}}} notation and {{{>>}}} and should fire on all values which aren't {{{m ()}}}.\r\n\r\nThe second {{{-fwarn-wrong-bind}}}:\r\n\r\n{{{\r\ndo return (doesFileExist \"foo\") ; return 1\r\n}}}\r\n\r\n{{{doesFileExist}}} returns a value of type {{{IO (IO a)}}}, which is not bound. This warning should fire on all {{{m (m a)}}} values and also in {{{>>}}}.\r\n\r\nThe names of the flags are intended to be placeholders for a sensibly chosen name. I would make {{{-fwarn-wrong-bind}}} on as a default warning, and both turned on under {{{-Wall}}}. I'm not sure anyone has ever written the second construction without it being a serious error. In the case of {{{IO}}} it's really easy to miss that some side effects are no longer happening after a refactoring. I've just made this very mistake in fairly public way.\r\n\r\nIt seems that problems such as {{{mapM}}} space leaks are common, and that it is not widely known that such constructions without a named binding are always wrong. I've had to explain the problem to fairly experienced Haskell programmers.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3119Make ghc-6.10 use a non-executable stack (by bumping libffi)2019-07-07T19:05:17Zkolmodin@dtek.chalmers.seMake ghc-6.10 use a non-executable stack (by bumping libffi)Attached patch:
```
Mon Mar 23 08:08:32 CET 2009 Lennart Kolmodin <kolmodin@gentoo.org>
* Replace libffi 3.0.4 with libffi 3.0.8
Use the latest version of libffi, which compiles with a non-executable
stack. libffi 3.0.4 was the s...Attached patch:
```
Mon Mar 23 08:08:32 CET 2009 Lennart Kolmodin <kolmodin@gentoo.org>
* Replace libffi 3.0.4 with libffi 3.0.8
Use the latest version of libffi, which compiles with a non-executable
stack. libffi 3.0.4 was the single piece of ghc using the executable stack,
forcing the whole toolchain to use executable stacks (including all
executables it compiled).
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.1 |
| 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":"Make ghc-6.10 use a non-executable stack (by bumping libffi)","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Attached patch:\r\n\r\n{{{\r\nMon Mar 23 08:08:32 CET 2009 Lennart Kolmodin <kolmodin@gentoo.org>\r\n * Replace libffi 3.0.4 with libffi 3.0.8\r\n Use the latest version of libffi, which compiles with a non-executable\r\n stack. libffi 3.0.4 was the single piece of ghc using the executable stack,\r\n forcing the whole toolchain to use executable stacks (including all\r\n executables it compiled).\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3102The impossible happened with implicit parameters2019-07-07T19:05:23ZAshley YakeleyThe impossible happened with implicit parameters```
{-# OPTIONS -XImplicitParams -XRankNTypes #-}
module Bug where
t :: forall a. ((?p :: Int) => a) -> String
t _ = "Hello"
f :: (forall a. a -> String) -> Int
f _ = 3
result :: Int
result = f t
```
```
$ ghc -c Bug.hs
ghc: panic! (...```
{-# OPTIONS -XImplicitParams -XRankNTypes #-}
module Bug where
t :: forall a. ((?p :: Int) => a) -> String
t _ = "Hello"
f :: (forall a. a -> String) -> Int
f _ = 3
result :: Int
result = f t
```
```
$ ghc -c Bug.hs
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.1 for x86_64-unknown-linux):
TcTyFuns.flattenType: unexpected PredType
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ----------------------- |
| Version | 6.10.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Type checker) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"The impossible happened with implicit parameters","status":"New","operating_system":"","component":"Compiler (Type checker)","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"{{{\r\n{-# OPTIONS -XImplicitParams -XRankNTypes #-}\r\nmodule Bug where\r\n\r\nt :: forall a. ((?p :: Int) => a) -> String\r\nt _ = \"Hello\"\r\n\r\nf :: (forall a. a -> String) -> Int\r\nf _ = 3\r\n\r\nresult :: Int\r\nresult = f t\r\n}}}\r\n\r\n{{{\r\n$ ghc -c Bug.hs\r\nghc: panic! (the 'impossible' happened)\r\n (GHC version 6.10.1 for x86_64-unknown-linux):\r\n\tTcTyFuns.flattenType: unexpected PredType\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/2978Add support for more characters to UnicodeSyntax2019-07-07T19:06:02ZPorgesAdd support for more characters to UnicodeSyntaxHere is a short patch to add support for some more Unicode characters when GHC is used with the -XUnicodeSyntax extension.
1. The following are enabled when used with Arrows:
- `⤙` (LEFTWARDS ARROW-TAIL) = `-<`
- `⤚` (RIGHTWARDS ARROW-...Here is a short patch to add support for some more Unicode characters when GHC is used with the -XUnicodeSyntax extension.
1. The following are enabled when used with Arrows:
- `⤙` (LEFTWARDS ARROW-TAIL) = `-<`
- `⤚` (RIGHTWARDS ARROW-TAIL) = `>-`
- `⤛` (LEFTWARDS DOUBLE ARROW-TAIL) = `-<<`
- `⤜` (RIGHTWARDS DOUBLE ARROW-TAIL) = `>>-`
1. The star '`★`' is allowed instead of '`*`' in kind signatures.
I would also like to propose a couple of changes that I have been unable to figure out how to implement myself (I tried adding them to Lexer.x but this had no effect). They all follow a similar theme:
- For TemplateHaskell: `⟦ ⟧` (MATHEMATICAL _ WHITE SQUARE BRACKET) can be used instead of `[| |]`
- For Generics: `⦃ ⦄` (_ WHITE CURLY BRACKET) can be used instead of `{| |}`
- For Arrows: `⦇ ⦈` (Z NOTATION _ IMAGE BRACKET) can be used instead of `(| |)`
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.10.1 |
| 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":"Add support for more characters to UnicodeSyntax","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.10.1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"FeatureRequest","description":"Here is a short patch to add support for some more Unicode characters when GHC is used with the -XUnicodeSyntax extension.\r\n\r\n1. The following are enabled when used with Arrows:\r\n * `⤙` (LEFTWARDS ARROW-TAIL) = `-<`\r\n * `⤚` (RIGHTWARDS ARROW-TAIL) = `>-`\r\n * `⤛` (LEFTWARDS DOUBLE ARROW-TAIL) = `-<<`\r\n * `⤜` (RIGHTWARDS DOUBLE ARROW-TAIL) = `>>-`\r\n2. The star '`★`' is allowed instead of '`*`' in kind signatures.\r\n\r\nI would also like to propose a couple of changes that I have been unable to figure out how to implement myself (I tried adding them to Lexer.x but this had no effect). They all follow a similar theme:\r\n\r\n * For TemplateHaskell: `⟦ ⟧` (MATHEMATICAL _ WHITE SQUARE BRACKET) can be used instead of `[| |]`\r\n * For Generics: `⦃ ⦄` (_ WHITE CURLY BRACKET) can be used instead of `{| |}`\r\n * For Arrows: `⦇ ⦈` (Z NOTATION _ IMAGE BRACKET) can be used instead of `(| |)` \r\n\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/2063x86_64: RTS linker depends on working MAP_32BIT2019-07-07T19:10:22Zdonsx86_64: RTS linker depends on working MAP_32BITGHC head since the 6.8 split back in October, is broken on OpenBSD, due to changes in mmap use
```
Thu Oct 18 05:52:20 PDT 2007 Simon Marlow <simonmar <at> microsoft.com>
* add PIC relocations for x86_64, and use a simpler hack in p...GHC head since the 6.8 split back in October, is broken on OpenBSD, due to changes in mmap use
```
Thu Oct 18 05:52:20 PDT 2007 Simon Marlow <simonmar <at> microsoft.com>
* add PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra
commentary by me. It turns out that this patch is not just a cleanup,
it is also necessary for GHCi to work on x86_64 with shared libraries,
because previously lookupSymbol() was creating jump-table entries for
all symbols looked up that resolved outside 2Gb, whereas Wolfgang's
version only generates jump-table entries for 32-bit symbol references
in object code that we load.
```
It appears to still be broken:
```
../compiler/ghc-inplace -optc-O -optc-L/usr/local/lib -optc-I/usr/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H128m -O2 -L/usr/local/lib -I/usr/local/include -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -optc-fno-stack-protector -dcmm-lint -optc-O0 -H128m -O2 -L/usr/local/lib -I/usr/local/include -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -optc-fno-stack-protector -dcmm-lint -c Main.c -o Main.o
Linker.c:1599:10:
#error ocAllocateSymbolExtras doesnt want USE_MMAP to be defined
Linker.c: In function `ocAllocateSymbolExtras':
Linker.c:1623:0:
warning: implicit declaration of function `mremap'
Linker.c:1623:0:
error: `MREMAP_MAYMOVE' undeclared (first use in this function)
Linker.c:1623:0:
error: (Each undeclared identifier is reported only once
Linker.c:1623:0: error: for each function it appears in.)
```
originally reported on the mailing list, http://thread.gmane.org/gmane.comp.lang.haskell.cvs.ghc/24330
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | --------------- |
| Version | 6.8.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | dons@galois.com |
| Operating system | OpenBSD |
| Architecture | Multiple |
</details>
<!-- {"blocked_by":[],"summary":"Breackage on OpenBSD due to mmap remap","status":"New","operating_system":"OpenBSD","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.8.2","keywords":["OpenBSD"],"differentials":[],"test_case":"","architecture":"Multiple","cc":["dons@galois.com"],"type":"Bug","description":"GHC head since the 6.8 split back in October, is broken on OpenBSD, due to changes in mmap use\r\n\r\n{{{\r\nThu Oct 18 05:52:20 PDT 2007 Simon Marlow <simonmar <at> microsoft.com>\r\n\r\n * add PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()\r\n\r\n This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra\r\n commentary by me. It turns out that this patch is not just a cleanup,\r\n it is also necessary for GHCi to work on x86_64 with shared libraries,\r\n because previously lookupSymbol() was creating jump-table entries for\r\n all symbols looked up that resolved outside 2Gb, whereas Wolfgang's\r\n version only generates jump-table entries for 32-bit symbol references\r\n in object code that we load.\r\n}}}\r\n\r\nIt appears to still be broken:\r\n\r\n{{{\r\n../compiler/ghc-inplace -optc-O -optc-L/usr/local/lib -optc-I/usr/local/include -optc-Wall -optc-W -optc-Wstrict-prototypes -optc-Wmissing-prototypes -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-I../includes -optc-I. -optc-Iparallel -optc-Ism -optc-DCOMPILING_RTS -optc-fomit-frame-pointer -optc-I../gmp/gmpbuild -optc-fno-strict-aliasing -H128m -O2 -L/usr/local/lib -I/usr/local/include -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -optc-fno-stack-protector -dcmm-lint -optc-O0 -H128m -O2 -L/usr/local/lib -I/usr/local/include -optc-O2 -I../includes -I. -Iparallel -Ism -DCOMPILING_RTS -package-name rts -static -I../gmp/gmpbuild -I. -#include HCIncludes.h -optc-fno-stack-protector -dcmm-lint -c Main.c -o Main.o\r\n\r\nLinker.c:1599:10:\r\n #error ocAllocateSymbolExtras doesnt want USE_MMAP to be defined\r\nLinker.c: In function `ocAllocateSymbolExtras':\r\n\r\nLinker.c:1623:0:\r\n warning: implicit declaration of function `mremap'\r\n\r\nLinker.c:1623:0:\r\n error: `MREMAP_MAYMOVE' undeclared (first use in this function)\r\n\r\nLinker.c:1623:0:\r\n error: (Each undeclared identifier is reported only once\r\n\r\nLinker.c:1623:0: error: for each function it appears in.)\r\n}}}\r\n\r\noriginally reported on the mailing list, http://thread.gmane.org/gmane.comp.lang.haskell.cvs.ghc/24330","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Simon MarlowSimon Marlowhttps://gitlab.haskell.org/ghc/ghc/-/issues/1185can't do I/O in the child of forkProcess with -threaded2019-07-07T19:14:49ZSimon Marlowcan't do I/O in the child of forkProcess with -threaded`forkProcess` kills all threads, as advertised. Unfortunately this includes the I/O manager thread, so trying to do I/O in the child of `forkProcess` leads to deadlock. It might be possible to fix this, but we'd need to add a way to rest...`forkProcess` kills all threads, as advertised. Unfortunately this includes the I/O manager thread, so trying to do I/O in the child of `forkProcess` leads to deadlock. It might be possible to fix this, but we'd need to add a way to restart the I/O manager thread.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | -------------- |
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Runtime System |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |
</details>
<!-- {"blocked_by":[],"summary":"can't do I/O in the child of forkProcess with -threaded","status":"New","operating_system":"Unknown","component":"Runtime System","related":[],"milestone":"_|_","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.6","keywords":[],"differentials":[],"test_case":"","architecture":"Unknown","cc":[""],"type":"Bug","description":"`forkProcess` kills all threads, as advertised. Unfortunately this includes the I/O manager thread, so trying to do I/O in the child of `forkProcess` leads to deadlock. It might be possible to fix this, but we'd need to add a way to restart the I/O manager thread.","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3669haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: inval...2019-07-07T19:02:51ZIan Lynagh <igloo@earth.li>haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)This change to `gen_contents_index`:
```
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \t]//'`
```
looks like it has caused this problem for SPJ on MSYS:
```
cd libraries && sh gen_contents_index --inplace
haddock: in...This change to `gen_contents_index`:
```
VERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \t]//'`
```
looks like it has caused this problem for SPJ on MSYS:
```
cd libraries && sh gen_contents_index --inplace
haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)
make[1]: *** [libraries/index.html] Error 1
make: *** [all] Error 2
sh-3.1$
```
Presumably the problem is that the sed didn't remove what it was meant to, presumably because the '\\t' didn't end up matching the tab character in the file.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"haddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"igloo"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"This change to `gen_contents_index`:\r\n{{{\r\nVERSION=`grep -i '^version:' $LIBPATH/$NAME.cabal | sed 's/.*[ \\t]//'`\r\n}}}\r\nlooks like it has caused this problem for SPJ on MSYS:\r\n{{{\r\ncd libraries && sh gen_contents_index --inplace\r\nhaddock: internal Haddock or GHC error: Win32-version:: openBinaryFile: invalid argument (Invalid argument)\r\nmake[1]: *** [libraries/index.html] Error 1\r\nmake: *** [all] Error 2\r\nsh-3.1$\r\n}}}\r\nPresumably the problem is that the sed didn't remove what it was meant to, presumably because the '\\t' didn't end up matching the tab character in the file.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>https://gitlab.haskell.org/ghc/ghc/-/issues/3657ffi-1.0 causes panic in 6.12.200910102019-07-07T19:02:56Ztobsanffi-1.0 causes panic in 6.12.20091010After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:\[\[BR\]\]
```
tobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs
GHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help
Loading pac...After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:\[\[BR\]\]
```
tobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs
GHCi, version 6.12.0.20091010: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
ghc-stage2: This ELF file contains no symtab
Loading package ffi-1.0 ... ghc-stage2: panic! (the 'impossible' happened)
(GHC version 6.12.0.20091010 for x86_64-unknown-linux):
loadObj: failed
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
```
```
tobsan@magrathea ~/programming/HQmpd/src $ cat Test.hs
module Test where
hej = print "Hej"
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.12.1 RC1 |
| 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":"fff-1.0 causes panic in 6.12.20091010","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"After upgrading GHC to 6.12, any Haskell file I try to compile yields this result:[[BR]]\r\n\r\n{{{\r\ntobsan@magrathea ~/programming/HQmpd/src $ ghci Test.hs\r\nGHCi, version 6.12.0.20091010: 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\nghc-stage2: This ELF file contains no symtab\r\nLoading package ffi-1.0 ... ghc-stage2: panic! (the 'impossible' happened)\r\n (GHC version 6.12.0.20091010 for x86_64-unknown-linux):\r\n\tloadObj: failed\r\n\r\nPlease report this as a GHC bug: http://www.haskell.org/ghc/reportabug\r\n}}}\r\n{{{\r\ntobsan@magrathea ~/programming/HQmpd/src $ cat Test.hs \r\nmodule Test where\r\n\r\nhej = print \"Hej\"\r\n}}}","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3653"Missing header file: HsDirectory.h" with old kernel/glibc2019-07-07T19:02:57Zroland"Missing header file: HsDirectory.h" with old kernel/glibcConfiguring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:
```
$ ./configure
[...]
Configuring directory-1.0.1.0...
[...]
configure: creating ./config.status
config.status: creating include/HsDirectoryConfig.h...Configuring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:
```
$ ./configure
[...]
Configuring directory-1.0.1.0...
[...]
configure: creating ./config.status
config.status: creating include/HsDirectoryConfig.h
ghc-cabal: Missing dependency on a foreign library:
* Missing header file: HsDirectory.h
[...]
```
The file `HsDirectory.h` is actually there, but it fails to compile.
```
$ cd libraries/directory
$ runhaskell Setup configure -v3
[...]
include/HsDirectory.h:58: error: syntax error before "__hscore_S_IRUSR"
include/HsDirectory.h:59: error: syntax error before "__hscore_S_IWUSR"
include/HsDirectory.h:60: error: syntax error before "__hscore_S_IXUSR"
include/HsDirectory.h:61: error: syntax error before "__hscore_S_IFDIR"
[...]
```
The problem can be fixed by adding `#include <sys/types.h>` at the beginning of `HsDirectory.h`.
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------------- |
| Version | 6.12.1 RC1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/directory |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"\"Missing header file: HsDirectory.h\" with old kernel/glibc","status":"New","operating_system":"","component":"libraries/directory","related":[],"milestone":"","resolution":"Unresolved","owner":{"tag":"Unowned"},"version":"6.12.1 RC1","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Bug","description":"Configuring ghc-6.12.1rc1 on a machine with linux kernel 2.6.9 and glibc 2.3.4 gives:\r\n{{{\r\n$ ./configure\r\n[...]\r\nConfiguring directory-1.0.1.0...\r\n[...]\r\nconfigure: creating ./config.status\r\nconfig.status: creating include/HsDirectoryConfig.h\r\nghc-cabal: Missing dependency on a foreign library:\r\n* Missing header file: HsDirectory.h\r\n[...]\r\n}}}\r\nThe file {{{HsDirectory.h}}} is actually there, but it fails to compile.\r\n{{{\r\n$ cd libraries/directory\r\n$ runhaskell Setup configure -v3\r\n[...]\r\ninclude/HsDirectory.h:58: error: syntax error before \"__hscore_S_IRUSR\"\r\ninclude/HsDirectory.h:59: error: syntax error before \"__hscore_S_IWUSR\"\r\ninclude/HsDirectory.h:60: error: syntax error before \"__hscore_S_IXUSR\"\r\ninclude/HsDirectory.h:61: error: syntax error before \"__hscore_S_IFDIR\"\r\n[...]\r\n}}}\r\nThe problem can be fixed by adding {{{#include <sys/types.h>}}} at the beginning of {{{HsDirectory.h}}}.\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1https://gitlab.haskell.org/ghc/ghc/-/issues/3648Release a new containers version2019-07-07T19:02:58ZIan Lynagh <igloo@earth.li>Release a new containers versionTo include:
```
Wed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>
* doc bugfix: correct description of index argument
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| --------...To include:
```
Wed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>
* doc bugfix: correct description of index argument
```
<details><summary>Trac metadata</summary>
| Trac field | Value |
| ---------------------- | ------------ |
| Version | 6.10.4 |
| Type | Task |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | |
</details>
<!-- {"blocked_by":[],"summary":"Release a new containers version","status":"New","operating_system":"","component":"Compiler","related":[],"milestone":"6.12.1","resolution":"Unresolved","owner":{"tag":"OwnedBy","contents":"igloo"},"version":"6.10.4","keywords":[],"differentials":[],"test_case":"","architecture":"","cc":[""],"type":"Task","description":"To include:\r\n{{{\r\nWed Oct 28 03:55:32 PDT 2009 Ross Paterson <ross@soi.city.ac.uk>\r\n * doc bugfix: correct description of index argument\r\n}}}\r\n","type_of_failure":"OtherFailure","blocking":[]} -->6.12.1Ian Lynagh <igloo@earth.li>Ian Lynagh <igloo@earth.li>