[Git][ghc/ghc][wip/fendor/ghc-stack-profiler] Sample Profiler commit
by Hannes Siebenhandl (@fendor) 03 Nov '25
by Hannes Siebenhandl (@fendor) 03 Nov '25
03 Nov '25
Hannes Siebenhandl pushed to branch wip/fendor/ghc-stack-profiler at Glasgow Haskell Compiler / GHC
Commits:
4e563a0e by fendor at 2025-11-03T17:50:22+01:00
Sample Profiler commit
- - - - -
7 changed files:
- .gitmodules
- + eventlog-live-profiling-prototype
- ghc/Main.hs
- ghc/ghc-bin.cabal.in
- hadrian/src/Packages.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
Changes:
=====================================
.gitmodules
=====================================
@@ -124,3 +124,6 @@
[submodule "libraries/template-haskell-quasiquoter"]
path = libraries/template-haskell-quasiquoter
url = https://gitlab.haskell.org/ghc/template-haskell-quasiquoter.git
+[submodule "eventlog-live-profiling-prototype"]
+ path = eventlog-live-profiling-prototype
+ url = git@gitlab.well-typed.com:well-typed/eventlog-live-profiling-prototype.git
=====================================
eventlog-live-profiling-prototype
=====================================
@@ -0,0 +1 @@
+Subproject commit b575347b8d17703e9ab77cf998c680fc60039096
=====================================
ghc/Main.hs
=====================================
@@ -80,6 +80,7 @@ import GHC.Iface.Errors.Ppr
import GHC.Driver.Session.Mode
import GHC.Driver.Session.Lint
import GHC.Driver.Session.Units
+import GHC.Driver.Monad
-- Standard Haskell libraries
import System.IO
@@ -91,6 +92,17 @@ import Control.Monad.Trans.Except (throwE, runExceptT)
import Data.List ( isPrefixOf, partition, intercalate )
import Prelude
import qualified Data.List.NonEmpty as NE
+#if defined(SAMPLE_TRACER)
+import qualified GHC.Stack.Profiler.Sampler as Sampler
+#endif
+
+runWithStackProfiler :: IO () -> IO ()
+runWithStackProfiler =
+#if defined(SAMPLE_TRACER)
+ Sampler.withStackProfiler (SampleIntervalMs 10)
+#else
+ id
+#endif
-----------------------------------------------------------------------------
-- ToDo:
@@ -153,7 +165,8 @@ main = do
ShowGhciUsage -> showGhciUsage dflags
PrintWithDynFlags f -> putStrLn (f dflags)
Right postLoadMode ->
- main' postLoadMode units dflags argv3 flagWarnings
+ reifyGhc $ \session -> runWithStackProfiler $
+ reflectGhc (main' postLoadMode units dflags argv3 flagWarnings) session
main' :: PostLoadMode -> [String] -> DynFlags -> [Located String] -> [Warn]
-> Ghc ()
=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -27,6 +27,11 @@ Flag threaded
Default: True
Manual: True
+Flag sampleTracer
+ Description: Whether we instrument the ghc binary with sample tracer when the eventlog is enabled
+ Default: False
+ Manual: True
+
Executable ghc
Default-Language: GHC2021
@@ -45,6 +50,10 @@ Executable ghc
ghc-boot == @ProjectVersionMunged@,
ghc == @ProjectVersionMunged@
+ if flag(sampleTracer)
+ build-depends: ghc-stack-profiler
+ CPP-OPTIONS: -DSAMPLE_TRACER
+
if os(windows)
Build-Depends: Win32 >= 2.3 && < 2.15
else
=====================================
hadrian/src/Packages.hs
=====================================
@@ -13,6 +13,7 @@ module Packages (
transformers, unlit, unix, win32, xhtml,
lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace,
ghcPackages, isGhcPackage,
+ ghc_stack_profiler, ghc_stack_profiler_core,
-- * Package information
crossPrefix, programName, nonHsMainPackage, programPath, timeoutPath,
@@ -43,7 +44,9 @@ ghcPackages =
, terminfo, text, time, transformers, unlit, unix, win32, xhtml, fileio
, timeout
, lintersCommon
- , lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace ]
+ , ghc_stack_profiler_core
+ , ghc_stack_profiler
+ ]
-- TODO: Optimise by switching to sets of packages.
isGhcPackage :: Package -> Bool
@@ -135,6 +138,8 @@ unlit = util "unlit"
unix = lib "unix"
win32 = lib "Win32"
xhtml = lib "xhtml"
+ghc_stack_profiler = lib "ghc-stack-profiler" `setPath` "eventlog-live-profiling-prototype/ghc-stack-profiler"
+ghc_stack_profiler_core = lib "ghc-stack-profiler-core" `setPath` "eventlog-live-profiling-prototype/ghc-stack-profiler-core"
lintersCommon = lib "linters-common" `setPath` "linters/linters-common"
lintNotes = linter "lint-notes"
=====================================
hadrian/src/Settings/Default.hs
=====================================
@@ -180,6 +180,8 @@ stage1Packages = do
, unlit
, xhtml
, if winTarget then win32 else unix
+ , ghc_stack_profiler
+ , ghc_stack_profiler_core
]
, when (not cross)
[ hpcBin
=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -108,6 +108,12 @@ packageArgs = do
, builder (Haddock BuildPackage) ? arg ("--optghc=-I" ++ path) ]
+ , package ghc_stack_profiler ? mconcat
+ [ builder (Cabal Flags) ? mconcat
+ [ arg "-use-ghc-trace-events"
+ ]
+ ]
+
---------------------------------- ghc ---------------------------------
, package ghc ? mconcat
[ builder Ghc ? mconcat
@@ -116,6 +122,7 @@ packageArgs = do
, builder (Cabal Flags) ? mconcat
[ (expr (ghcWithInterpreter stage)) `cabalFlag` "internal-interpreter"
+ , notStage0 `cabalFlag` "sampleTracer"
, ifM stage0
-- We build a threaded stage 1 if the bootstrapping compiler
-- supports it.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4e563a0e1f79d0b2fc0f85ea564e924…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4e563a0e1f79d0b2fc0f85ea564e924…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/fendor/ghc-stack-profiler] Sample Profiler commit
by Hannes Siebenhandl (@fendor) 03 Nov '25
by Hannes Siebenhandl (@fendor) 03 Nov '25
03 Nov '25
Hannes Siebenhandl pushed to branch wip/fendor/ghc-stack-profiler at Glasgow Haskell Compiler / GHC
Commits:
b5dc992c by fendor at 2025-11-03T17:42:50+01:00
Sample Profiler commit
- - - - -
7 changed files:
- .gitmodules
- + eventlog-live-profiling-prototype
- ghc/Main.hs
- ghc/ghc-bin.cabal.in
- hadrian/src/Packages.hs
- hadrian/src/Settings/Default.hs
- hadrian/src/Settings/Packages.hs
Changes:
=====================================
.gitmodules
=====================================
@@ -124,3 +124,6 @@
[submodule "libraries/template-haskell-quasiquoter"]
path = libraries/template-haskell-quasiquoter
url = https://gitlab.haskell.org/ghc/template-haskell-quasiquoter.git
+[submodule "eventlog-live-profiling-prototype"]
+ path = eventlog-live-profiling-prototype
+ url = git@gitlab.well-typed.com:well-typed/eventlog-live-profiling-prototype.git
=====================================
eventlog-live-profiling-prototype
=====================================
@@ -0,0 +1 @@
+Subproject commit 67d128df85e0ebfac54e566e1cdb3bf5d5149031
=====================================
ghc/Main.hs
=====================================
@@ -80,6 +80,7 @@ import GHC.Iface.Errors.Ppr
import GHC.Driver.Session.Mode
import GHC.Driver.Session.Lint
import GHC.Driver.Session.Units
+import GHC.Driver.Monad
-- Standard Haskell libraries
import System.IO
@@ -91,6 +92,17 @@ import Control.Monad.Trans.Except (throwE, runExceptT)
import Data.List ( isPrefixOf, partition, intercalate )
import Prelude
import qualified Data.List.NonEmpty as NE
+#if defined(SAMPLE_TRACER)
+import qualified GHC.Stack.Profiler.Sampler as Sampler
+#endif
+
+runWithSampleProfiler :: IO () -> IO ()
+runWithSampleProfiler =
+#if defined(SAMPLE_TRACER)
+ Sampler.withSampleProfiler 10000 {- Every 10 ms -}
+#else
+ id
+#endif
-----------------------------------------------------------------------------
-- ToDo:
@@ -153,7 +165,8 @@ main = do
ShowGhciUsage -> showGhciUsage dflags
PrintWithDynFlags f -> putStrLn (f dflags)
Right postLoadMode ->
- main' postLoadMode units dflags argv3 flagWarnings
+ reifyGhc $ \session -> runWithSampleProfiler $
+ reflectGhc (main' postLoadMode units dflags argv3 flagWarnings) session
main' :: PostLoadMode -> [String] -> DynFlags -> [Located String] -> [Warn]
-> Ghc ()
=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -27,6 +27,11 @@ Flag threaded
Default: True
Manual: True
+Flag sampleTracer
+ Description: Whether we instrument the ghc binary with sample tracer when the eventlog is enabled
+ Default: False
+ Manual: True
+
Executable ghc
Default-Language: GHC2021
@@ -45,6 +50,10 @@ Executable ghc
ghc-boot == @ProjectVersionMunged@,
ghc == @ProjectVersionMunged@
+ if flag(sampleTracer)
+ build-depends: ghc-stack-profiler
+ CPP-OPTIONS: -DSAMPLE_TRACER
+
if os(windows)
Build-Depends: Win32 >= 2.3 && < 2.15
else
=====================================
hadrian/src/Packages.hs
=====================================
@@ -13,6 +13,7 @@ module Packages (
transformers, unlit, unix, win32, xhtml,
lintersCommon, lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace,
ghcPackages, isGhcPackage,
+ ghc_stack_profiler, ghc_stack_profiler_core,
-- * Package information
crossPrefix, programName, nonHsMainPackage, programPath, timeoutPath,
@@ -43,7 +44,9 @@ ghcPackages =
, terminfo, text, time, transformers, unlit, unix, win32, xhtml, fileio
, timeout
, lintersCommon
- , lintNotes, lintCodes, lintCommitMsg, lintSubmoduleRefs, lintWhitespace ]
+ , ghc_stack_profiler_core
+ , ghc_stack_profiler
+ ]
-- TODO: Optimise by switching to sets of packages.
isGhcPackage :: Package -> Bool
@@ -135,6 +138,8 @@ unlit = util "unlit"
unix = lib "unix"
win32 = lib "Win32"
xhtml = lib "xhtml"
+ghc_stack_profiler = lib "ghc-stack-profiler" `setPath` "eventlog-live-profiling-prototype/ghc-stack-profiler"
+ghc_stack_profiler_core = lib "ghc-stack-profiler-core" `setPath` "eventlog-live-profiling-prototype/ghc-stack-profiler-core"
lintersCommon = lib "linters-common" `setPath` "linters/linters-common"
lintNotes = linter "lint-notes"
=====================================
hadrian/src/Settings/Default.hs
=====================================
@@ -180,6 +180,8 @@ stage1Packages = do
, unlit
, xhtml
, if winTarget then win32 else unix
+ , ghc_stack_profiler
+ , ghc_stack_profiler_core
]
, when (not cross)
[ hpcBin
=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -108,6 +108,12 @@ packageArgs = do
, builder (Haddock BuildPackage) ? arg ("--optghc=-I" ++ path) ]
+ , package ghc_stack_profiler ? mconcat
+ [ builder (Cabal Flags) ? mconcat
+ [ arg "-use-ghc-trace-events"
+ ]
+ ]
+
---------------------------------- ghc ---------------------------------
, package ghc ? mconcat
[ builder Ghc ? mconcat
@@ -116,6 +122,7 @@ packageArgs = do
, builder (Cabal Flags) ? mconcat
[ (expr (ghcWithInterpreter stage)) `cabalFlag` "internal-interpreter"
+ , notStage0 `cabalFlag` "sampleTracer"
, ifM stage0
-- We build a threaded stage 1 if the bootstrapping compiler
-- supports it.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b5dc992c16b1edf1801f97d3d7be21f…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b5dc992c16b1edf1801f97d3d7be21f…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc] Pushed new branch wip/fendor/ghc-stack-profiler
by Hannes Siebenhandl (@fendor) 03 Nov '25
by Hannes Siebenhandl (@fendor) 03 Nov '25
03 Nov '25
Hannes Siebenhandl pushed new branch wip/fendor/ghc-stack-profiler at Glasgow Haskell Compiler / GHC
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/tree/wip/fendor/ghc-stack-profiler
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED] Increase timeout for emulators
by Sven Tennie (@supersven) 03 Nov '25
by Sven Tennie (@supersven) 03 Nov '25
03 Nov '25
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC
Commits:
ca612978 by Sven Tennie at 2025-11-03T15:54:01+01:00
Increase timeout for emulators
Test runs with emulators naturally take longer than on native machines.
- - - - -
2 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
Changes:
=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -20,6 +20,7 @@ import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.Set as S
import System.Environment
import Data.List
+import Data.Char (isSpace)
{-
Note [Generating the CI pipeline]
@@ -885,14 +886,24 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} }
Emulator s -> "CROSS_EMULATOR" =: s
NoEmulatorNeeded -> mempty
, if withNuma buildConfig then "ENABLE_NUMA" =: "1" else mempty
- , let runtestArgs =
+ , let testTimeoutArg =
+ case crossEmulator buildConfig of
+ -- Emulators are naturally slower than native machines.
+ -- Triple the default of 300.
+ Emulator _ -> "-e config.timeout=900" :: String
+ _ -> mempty
+ runtestArgs =
+ testTimeoutArg :
[ "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity"
| validateNonmovingGc buildConfig
]
- in "RUNTEST_ARGS" =: unwords runtestArgs
+ in "RUNTEST_ARGS" =: (trim . unwords) runtestArgs
, if testsuiteUsePerf buildConfig then "RUNTEST_ARGS" =: "--config perf_path=perf" else mempty
]
+ trim :: String -> String
+ trim = dropWhileEnd isSpace . dropWhile isSpace
+
jobArtifacts = Artifacts
{ junitReport = "junit.xml"
, expireIn = "2 weeks"
=====================================
.gitlab/jobs.yaml
=====================================
@@ -389,7 +389,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -471,7 +471,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -1060,7 +1060,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -1143,7 +1143,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -2055,7 +2055,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -2122,7 +2122,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
"XZ_OPT": "-9"
}
@@ -2504,7 +2504,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "riscv64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -3518,7 +3518,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "loongarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -6165,7 +6165,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
}
},
@@ -6231,7 +6231,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate"
}
},
@@ -6608,7 +6608,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "riscv64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-validate"
}
},
@@ -7607,7 +7607,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "loongarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "-e config.timeout=900",
"TEST_ENV": "x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate"
}
},
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ca6129780c811d78cfbc04fde5f1ac5…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/ca6129780c811d78cfbc04fde5f1ac5…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED] Increase timeout for emulators
by Sven Tennie (@supersven) 03 Nov '25
by Sven Tennie (@supersven) 03 Nov '25
03 Nov '25
Sven Tennie pushed to branch wip/romes/hadrian-cross-stage2-rebase_SVEN_FIXED at Glasgow Haskell Compiler / GHC
Commits:
0de5dfde by Sven Tennie at 2025-11-03T09:52:18+01:00
Increase timeout for emulators
Test runs with emulators naturally take longer than on native machines.
- - - - -
2 changed files:
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
Changes:
=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -20,6 +20,7 @@ import qualified Data.ByteString.Lazy.Char8 as B
import qualified Data.Set as S
import System.Environment
import Data.List
+import Data.Char (isSpace)
{-
Note [Generating the CI pipeline]
@@ -885,14 +886,24 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} }
Emulator s -> "CROSS_EMULATOR" =: s
NoEmulatorNeeded -> mempty
, if withNuma buildConfig then "ENABLE_NUMA" =: "1" else mempty
- , let runtestArgs =
+ , let testTimeoutArg =
+ case crossEmulator buildConfig of
+ -- Emulators are naturally slower than native machines.
+ -- Triple the default of 300.
+ Emulator _ -> "--config=\"config.timeout=900\"" :: String
+ _ -> mempty
+ runtestArgs =
+ testTimeoutArg :
[ "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity"
| validateNonmovingGc buildConfig
]
- in "RUNTEST_ARGS" =: unwords runtestArgs
+ in "RUNTEST_ARGS" =: (trim . unwords) runtestArgs
, if testsuiteUsePerf buildConfig then "RUNTEST_ARGS" =: "--config perf_path=perf" else mempty
]
+ trim :: String -> String
+ trim = dropWhileEnd isSpace . dropWhile isSpace
+
jobArtifacts = Artifacts
{ junitReport = "junit.xml"
, expireIn = "2 weeks"
=====================================
.gitlab/jobs.yaml
=====================================
@@ -389,7 +389,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -471,7 +471,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -1060,7 +1060,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -1143,7 +1143,7 @@
"OBJCOPY": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objcopy",
"OBJDUMP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-objdump",
"RANLIB": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-llvm-ranlib",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"SIZE": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-size",
"STRINGS": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strings",
"STRIP": "/opt/llvm-mingw-linux/bin/aarch64-w64-mingw32-strip",
@@ -2055,7 +2055,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -2122,7 +2122,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
"XZ_OPT": "-9"
}
@@ -2504,7 +2504,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "riscv64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -3518,7 +3518,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "loongarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate",
"XZ_OPT": "-9"
}
@@ -6165,7 +6165,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
}
},
@@ -6231,7 +6231,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate"
}
},
@@ -6608,7 +6608,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "riscv64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-validate"
}
},
@@ -7607,7 +7607,7 @@
"CROSS_STAGE": "2",
"CROSS_TARGET": "loongarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
- "RUNTEST_ARGS": "",
+ "RUNTEST_ARGS": "--config=\"config.timeout=900\"",
"TEST_ENV": "x86_64-linux-ubuntu24_04-loongarch-cross_loongarch64-linux-gnu-validate"
}
},
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0de5dfde13e10a1166ae91f42a2d4a1…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0de5dfde13e10a1166ae91f42a2d4a1…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
Simon Peyton Jones pushed to branch wip/T26514 at Glasgow Haskell Compiler / GHC
Commits:
4f516544 by Simon Peyton Jones at 2025-11-03T08:37:37+00:00
Wibble imports
- - - - -
1 changed file:
- compiler/GHC/Types/SourceText.hs
Changes:
=====================================
compiler/GHC/Types/SourceText.hs
=====================================
@@ -38,7 +38,6 @@ import GHC.Utils.Binary
import GHC.Utils.Panic
import Data.Function (on)
-import Data.Semigroup as S ((<>))
import Data.Data
import GHC.Real ( Ratio(..) )
import GHC.Types.SrcLoc
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4f516544b4d3207d6c93566d4a7ecf1…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4f516544b4d3207d6c93566d4a7ecf1…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T23162-spj] 19 commits: ghc-toolchain: detect PowerPC 64 bit ABI
by Simon Peyton Jones (@simonpj) 03 Nov '25
by Simon Peyton Jones (@simonpj) 03 Nov '25
03 Nov '25
Simon Peyton Jones pushed to branch wip/T23162-spj at Glasgow Haskell Compiler / GHC
Commits:
f75ab223 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: detect PowerPC 64 bit ABI
Check preprocessor macro defined for ABI v2 and assume v1 otherwise.
Fixes #26521
- - - - -
d086c474 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: refactor, move lastLine to Utils
- - - - -
995dfe0d by Vladislav Zavialov at 2025-10-31T18:43:54-04:00
Tests for -Wduplicate-exports, -Wdodgy-exports
Add test cases for the previously untested diagnostics:
[GHC-51876] TcRnDupeModuleExport
[GHC-64649] TcRnNullExportedModule
This also revealed a typo (incorrect capitalization of "module") in the
warning text for TcRnDupeModuleExport, which is now fixed.
- - - - -
f6961b02 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: reformat dyld source code
This commit reformats dyld source code with prettier, to avoid
introducing unnecessary diffs in subsequent patches when they're
formatted before committing.
- - - - -
0c9032a0 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: simplify _initialize logic in dyld
This commit simplifies how we _initialize a wasm shared library in
dyld and removes special treatment for libc.so, see added comment for
detailed explanation.
- - - - -
ec1b40bd by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: support running dyld fully client side in the browser
This commit refactors the wasm dyld script so that it can be used to
load and run wasm shared libraries fully client-side in the browser
without needing a wasm32-wasi-ghci backend:
- A new `DyLDBrowserHost` class is exported, which runs in the browser
and uses the in-memory vfs without any RPC calls. This meant to be
used to create a `rpc` object for the fully client side use cases.
- The exported `main` function now can be used to load user-specified
shared libraries, and the user can use the returned `DyLD` instance
to run their own exported Haskell functions.
- The in-browser wasi implementation is switched to
https://github.com/haskell-wasm/browser_wasi_shim for bugfixes and
major performance improvements not landed upstream yet.
- When being run by deno, it now correctly switches to non-nodejs code
paths, so it's more convenient to test dyld logic with deno.
See added comments for details, as well as the added `playground001`
test case for an example of using it to build an in-browser Haskell
playground.
- - - - -
8f3e481f by Cheng Shao at 2025-11-01T00:08:01+01:00
testsuite: add playground001 to test haskell playground
This commit adds the playground001 test case to test the haskell
playground in browser, see comments for details.
- - - - -
af40606a by Cheng Shao at 2025-11-01T00:08:04+01:00
Revert "testsuite: add T26431 test case"
This reverts commit 695036686f8c6d78611edf3ed627608d94def6b7. T26431
is now retired, wasm ghc internal-interpreter logic is tested by
playground001.
- - - - -
86c82745 by Vladislav Zavialov at 2025-11-01T07:24:29-04:00
Supplant TcRnExportHiddenComponents with TcRnDodgyExports (#26534)
Remove a bogus special case in lookup_ie_kids_all,
making TcRnExportHiddenComponents obsolete.
- - - - -
fcf6331e by Richard Eisenberg at 2025-11-03T08:33:05+00:00
Refactor fundep solving
This commit is a large-scale refactor of the increasingly-messy code that
handles functional dependencies. It has virtually no effect on what compiles
but improves error messages a bit. And it does the groundwork for #23162.
The big picture is described in
Note [Overview of functional dependencies in type inference]
in GHC.Tc.Solver.FunDeps
* New module GHC.Tc.Solver.FunDeps contains all the fundep-handling
code for the constraint solver.
* Fundep-equalities are solved in a nested scope; they may generate
unifications but otherwise have no other effect.
See GHC.Tc.Solver.FunDeps.solveFunDeps
The nested needs to start from the Givens in the inert set, but
not the Wanteds; hence a new function `resetInertCans`, used in
`nestFunDepsTcS`.
* That in turn means that fundep equalities never show up in error
messages, so the complicated FunDepOrigin tracking can all disappear.
* We need to be careful about tracking unifications, so we kick out
constraints from the inert set after doing unifications. Unification
tracking has been majorly reformed: see Note [WhatUnifications] in
GHC.Tc.Utils.Unify.
A good consequence is that the hard-to-grok `resetUnificationFlag`
has been replaced with a simpler use of
`reportCoarseGrainUnifications`
Smaller things:
* Rename `FunDepEqn` to `FunDepEqns` since it contains multiple
type equalities.
Some compile time improvement
Metrics: compile_time/bytes allocated
Baseline
Test value New value Change
---------------------- --------------------------------------
T5030(normal) 173,839,232 148,115,248 -14.8% GOOD
hard_hole_fits(normal) 286,768,048 284,015,416 -1.0%
geo. mean -0.2%
minimum -14.8%
maximum +0.3%
Metric Decrease:
T5030
- - - - -
231adc30 by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
QuickLook's tcInstFun should make instantiation variables directly
tcInstFun must make "instantiation variables", not regular
unification variables, when instantiating function types. That was
previously implemented by a hack: set the /ambient/ level to QLInstTyVar.
But the hack finally bit me, when I was refactoring WhatUnifications.
And it was always wrong: see the now-expunged (TCAPP2) note.
This commit does it right, by making tcInstFun call its own
instantiation functions. That entails a small bit of duplication,
but the result is much, much cleaner.
- - - - -
39d4a24b by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Build implication for constraints from (static e)
This commit addresses #26466, by buiding an implication for the
constraints arising from a (static e) form. The implication has
a special ic_info field of StaticFormSkol, which tells the constraint
solver to use an empty set of Givens.
See (SF3) in Note [Grand plan for static forms]
in GHC.Iface.Tidy.StaticPtrTable
This commit also reinstates an `assert` in GHC.Tc.Solver.Equality.
The test `StaticPtrTypeFamily` was failing with an assertion failure,
but it now works.
- - - - -
2e2aec1e by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Comments about defaulting representation equalities
- - - - -
52a4d1da by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Improve tracking of rewriter-sets
This refactor substantially improves the treatment of so-called
"rewriter-sets" in the constraint solver.
The story is described in the rewritten
Note [Wanteds rewrite Wanteds: rewriter-sets]
in GHC.Tc.Types.Constraint
Some highlights
* Trace the free coercion holes of a filled CoercionHole,
in CoercionPlusHoles. See Note [Coercion holes] (COH5)
This avoids taking having to take the free coercion variables
of a coercion when zonking a rewrriter-set
* Many knock on changes
* Make fillCoercionHole take CoercionPlusHoles as its argument
rather than to separate arguments.
* Similarly setEqIfWanted, setWantedE, wrapUnifierAndEmit.
* Be more careful about passing the correct CoHoleSet to
`rewriteEqEvidence` and friends
* Make kickOurAfterFillingCoercionHole more clever. See
new Note [Kick out after filling a coercion hole]
Smaller matters
* Rename RewriterSet to CoHoleSet
* Add special-case helper `rewriteEqEvidenceSwapOnly`
- - - - -
3e78e1ba by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Tidy up constraint solving for foralls
* In `can_eq_nc_forall` make sure to track Givens that are used
in the nested solve step.
* Tiny missing-swap bug-fix in `lookup_eq_in_qcis`
* Fix some leftover mess from
commit 14123ee646f2b9738a917b7cec30f9d3941c13de
Author: Simon Peyton Jones <simon.peytonjones(a)gmail.com>
Date: Wed Aug 20 00:35:48 2025 +0100
Solve forall-constraints via an implication, again
Specifically, trySolveImplication is now dead.
- - - - -
973f2c25 by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Do not treat CoercionHoles as free variables in coercions
This fixes a long-standing wart in the free-variable finder;
now CoercionHoles are no longer treated as a "free variable"
of a coercion.
I got big and unexpected performance regressions when making
this change. Turned out that CallArity didn't discover that
the free variable finder could be eta-expanded, which gave very
poor code.
So I re-used Note [The one-shot state monad trick] for Endo,
resulting in GHC.Utils.EndoOS. Very simple, big win.
- - - - -
c2b8a0f9 by Simon Peyton Jones at 2025-11-03T08:33:05+00:00
Update debug-tracing in CallArity
No effect on behaviour, and commented out anyway
- - - - -
9aa5ee99 by Simon Peyton Jones at 2025-11-03T08:33:28+00:00
Comments only -- remove dangling Note references
- - - - -
6683f183 by Simon Peyton Jones at 2025-11-03T08:33:28+00:00
Accept error message wibbles
- - - - -
121 changed files:
- compiler/GHC/Core/Opt/CallArity.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Iface/Tidy/StaticPtrTable.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Sig.hs
- compiler/GHC/Tc/Instance/FunDeps.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/Default.hs
- compiler/GHC/Tc/Solver/Dict.hs
- compiler/GHC/Tc/Solver/Equality.hs
- + compiler/GHC/Tc/Solver/FunDeps.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Irred.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Solver/Rewrite.hs
- compiler/GHC/Tc/Solver/Solve.hs
- compiler/GHC/Tc/Solver/Solve.hs-boot
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Types/Constraint.hs
- compiler/GHC/Tc/Types/Evidence.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Utils/Concrete.hs
- compiler/GHC/Tc/Utils/Instantiate.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Tc/Utils/TcMType.hs
- compiler/GHC/Tc/Utils/TcType.hs
- compiler/GHC/Tc/Utils/Unify.hs
- compiler/GHC/Tc/Zonk/TcType.hs
- compiler/GHC/Tc/Zonk/Type.hs
- compiler/GHC/Types/Basic.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Unique/DSM.hs
- + compiler/GHC/Utils/EndoOS.hs
- compiler/ghc.cabal.in
- testsuite/tests/count-deps/CountDepsAst.stdout
- testsuite/tests/count-deps/CountDepsParser.stdout
- testsuite/tests/default/default-fail05.stderr
- testsuite/tests/dependent/should_fail/T13135_simple.stderr
- testsuite/tests/deriving/should_fail/T3621.stderr
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/ghc-api-browser/README.md
- + testsuite/tests/ghc-api-browser/all.T
- + testsuite/tests/ghc-api-browser/index.html
- + testsuite/tests/ghc-api-browser/playground001.hs
- + testsuite/tests/ghc-api-browser/playground001.js
- + testsuite/tests/ghc-api-browser/playground001.sh
- testsuite/tests/ghci-wasm/T26431.stdout → testsuite/tests/ghc-api-browser/playground001.stdout
- − testsuite/tests/ghci-wasm/T26431.hs
- testsuite/tests/ghci-wasm/all.T
- testsuite/tests/indexed-types/should_fail/T14369.stderr
- testsuite/tests/indexed-types/should_fail/T1897b.stderr
- testsuite/tests/linters/notes.stdout
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail10.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail13.stderr
- testsuite/tests/parser/should_fail/T20654a.stderr
- testsuite/tests/partial-sigs/should_fail/T14584a.stderr
- testsuite/tests/polykinds/T6068.stdout
- testsuite/tests/quantified-constraints/T15359.hs
- testsuite/tests/rep-poly/RepPolyNPlusK.stderr
- testsuite/tests/rep-poly/RepPolyRightSection.stderr
- testsuite/tests/rep-poly/T13233.stderr
- testsuite/tests/rep-poly/T19709b.stderr
- testsuite/tests/rep-poly/T23903.stderr
- testsuite/tests/typecheck/no_skolem_info/T13499.stderr
- testsuite/tests/typecheck/should_compile/T13651.hs
- − testsuite/tests/typecheck/should_compile/T13651.stderr
- + testsuite/tests/typecheck/should_compile/T14745.hs
- testsuite/tests/typecheck/should_compile/all.T
- testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
- testsuite/tests/typecheck/should_compile/tc126.hs
- testsuite/tests/typecheck/should_fail/AmbigFDs.hs
- − testsuite/tests/typecheck/should_fail/AmbigFDs.stderr
- testsuite/tests/typecheck/should_fail/FD3.stderr
- testsuite/tests/typecheck/should_fail/FDsFromGivens2.stderr
- testsuite/tests/typecheck/should_fail/T13506.stderr
- testsuite/tests/typecheck/should_fail/T16512a.stderr
- testsuite/tests/typecheck/should_fail/T18851b.hs
- − testsuite/tests/typecheck/should_fail/T18851b.stderr
- testsuite/tests/typecheck/should_fail/T18851c.hs
- − testsuite/tests/typecheck/should_fail/T18851c.stderr
- testsuite/tests/typecheck/should_fail/T19415.stderr
- testsuite/tests/typecheck/should_fail/T19415b.stderr
- testsuite/tests/typecheck/should_fail/T22684.stderr
- + testsuite/tests/typecheck/should_fail/T23162a.hs
- + testsuite/tests/typecheck/should_fail/T23162a.stderr
- testsuite/tests/typecheck/should_fail/T25325.stderr
- testsuite/tests/typecheck/should_fail/T5246.stderr
- testsuite/tests/typecheck/should_fail/T5978.stderr
- testsuite/tests/typecheck/should_fail/T7368a.stderr
- testsuite/tests/typecheck/should_fail/T7696.stderr
- testsuite/tests/typecheck/should_fail/T8603.stderr
- testsuite/tests/typecheck/should_fail/T9612.stderr
- testsuite/tests/typecheck/should_fail/TcStaticPointersFail03.stderr
- testsuite/tests/typecheck/should_fail/all.T
- testsuite/tests/typecheck/should_fail/tcfail122.stderr
- testsuite/tests/typecheck/should_fail/tcfail143.stderr
- + testsuite/tests/warnings/should_compile/DodgyExports02.hs
- + testsuite/tests/warnings/should_compile/DodgyExports02.stderr
- + testsuite/tests/warnings/should_compile/DodgyExports03.hs
- + testsuite/tests/warnings/should_compile/DodgyExports03.stderr
- + testsuite/tests/warnings/should_compile/DuplicateModExport.hs
- + testsuite/tests/warnings/should_compile/DuplicateModExport.stderr
- + testsuite/tests/warnings/should_compile/EmptyModExport.hs
- + testsuite/tests/warnings/should_compile/EmptyModExport.stderr
- testsuite/tests/warnings/should_compile/all.T
- utils/ghc-toolchain/ghc-toolchain.cabal
- utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs
- + utils/ghc-toolchain/src/GHC/Toolchain/CheckPower.hs
- utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
- utils/jsffi/dyld.mjs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/09161c1fd6bad28b2c43fefee4100d…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/09161c1fd6bad28b2c43fefee4100d…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/spj-apporv-Oct24] 3 commits: accept new test output
by Apoorv Ingle (@ani) 03 Nov '25
by Apoorv Ingle (@ani) 03 Nov '25
03 Nov '25
Apoorv Ingle pushed to branch wip/spj-apporv-Oct24 at Glasgow Haskell Compiler / GHC
Commits:
81d9fe03 by Apoorv Ingle at 2025-11-02T21:39:48-06:00
accept new test output
- - - - -
e75752ed by Apoorv Ingle at 2025-11-02T22:44:08-06:00
Do not use HsPar in Last statement
- - - - -
f556b226 by Apoorv Ingle at 2025-11-02T22:44:31-06:00
accept test cases
- - - - -
21 changed files:
- compiler/GHC/Tc/Gen/Do.hs
- compiler/GHC/Tc/Gen/Head.hs
- testsuite/tests/default/default-fail05.stderr
- testsuite/tests/indexed-types/should_fail/T2693.stderr
- testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr
- testsuite/tests/plugins/test-defaulting-plugin.stderr
- testsuite/tests/polykinds/T13393.stderr
- testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
- testsuite/tests/typecheck/should_fail/T10971d.stderr
- testsuite/tests/typecheck/should_fail/T13311.stderr
- testsuite/tests/typecheck/should_fail/T24064.stderr
- testsuite/tests/typecheck/should_fail/T3613.stderr
- testsuite/tests/typecheck/should_fail/T6069.stderr
- testsuite/tests/typecheck/should_fail/T7851.stderr
- testsuite/tests/typecheck/should_fail/T8603.stderr
- testsuite/tests/typecheck/should_fail/T9612.stderr
- testsuite/tests/typecheck/should_fail/tcfail128.stderr
- testsuite/tests/typecheck/should_fail/tcfail140.stderr
- testsuite/tests/typecheck/should_fail/tcfail168.stderr
- testsuite/tests/typecheck/should_fail/tcfail181.stderr
- testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr
Changes:
=====================================
compiler/GHC/Tc/Gen/Do.hs
=====================================
@@ -81,15 +81,15 @@ expand_do_stmts flav [stmt@(L sloc (LastStmt _ body@(L body_loc _) _ ret_expr))]
-- See `checkLastStmt` and `Syntax.Expr.StmtLR.LastStmt`
| NoSyntaxExprRn <- ret_expr
-- Last statement is just body if we are not in ListComp context. See Syntax.Expr.LastStmt
- = return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField body))
+ = return $ L sloc (mkExpandedStmt stmt flav (unLoc body))
| SyntaxExprRn ret <- ret_expr -- We have unfortunately lost the location on the return function :(
--
-- ------------------------------------------------
-- return e ~~> return e
-- to make T18324 work
- = do let expansion = L body_loc (genHsApp ret body)
- return $ L sloc (mkExpandedStmt stmt flav (HsPar noExtField expansion))
+ = do let expansion = HsApp noExtField (L body_loc ret) body
+ return $ L sloc (mkExpandedStmt stmt flav expansion)
expand_do_stmts doFlavour (stmt@(L loc (LetStmt _ bs)) : lstmts) =
-- See Note [Expanding HsDo with XXExprGhcRn] Equation (3) below
=====================================
compiler/GHC/Tc/Gen/Head.hs
=====================================
@@ -1119,6 +1119,9 @@ addExprCtxt e thing_inside
addLExprCtxt :: LHsExpr GhcRn -> TcRn a -> TcRn a
addLExprCtxt (L lspan e) thing_inside
+ | (RealSrcSpan{}) <- locA lspan
+ , (HsPar _ e') <- e
+ = addExprCtxt (unLoc e') thing_inside
| (RealSrcSpan{}) <- locA lspan
= addExprCtxt e thing_inside
| otherwise
=====================================
testsuite/tests/default/default-fail05.stderr
=====================================
@@ -11,7 +11,7 @@ default-fail05.hs:11:10: error: [GHC-39999]
(use -fprint-potential-instances to see them all)
• In the first argument of ‘($)’, namely ‘toList’
In the first argument of ‘print’, namely ‘(toList $ pure 21)’
- In the expression: print (toList $ pure 21)
+ In a stmt of a 'do' block: print (toList $ pure 21)
default-fail05.hs:11:19: error: [GHC-39999]
• Ambiguous type variable ‘t0’ arising from a use of ‘pure’
@@ -25,10 +25,10 @@ default-fail05.hs:11:19: error: [GHC-39999]
(use -fprint-potential-instances to see them all)
• In the second argument of ‘($)’, namely ‘pure 21’
In the first argument of ‘print’, namely ‘(toList $ pure 21)’
- In the expression: print (toList $ pure 21)
+ In a stmt of a 'do' block: print (toList $ pure 21)
default-fail05.hs:12:3: error: [GHC-39999]
- • Ambiguous type variable ‘t1’ arising from a use of ‘traverse’
+ • Ambiguous type variable ‘t1’ arising from a do statement
prevents the constraint ‘(Traversable t1)’ from being solved.
Relevant bindings include
main :: IO (t1 ()) (bound at default-fail05.hs:10:1)
=====================================
testsuite/tests/indexed-types/should_fail/T2693.stderr
=====================================
@@ -42,8 +42,5 @@ T2693.hs:29:20: error: [GHC-83865]
The type variable ‘a0’ is ambiguous
• In the first argument of ‘mapM’, namely ‘g’
In the expression: mapM g undefined
- In the expression:
- do pvs <- mapM g undefined
- let n = (map ...) `min` (map ...)
- undefined
+ In a stmt of a 'do' block: pvs <- mapM g undefined
=====================================
testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr
=====================================
@@ -42,7 +42,7 @@ T26480b.hs:43:12: error: [GHC-39999]
T26480b.hs:47:10: error: [GHC-39999]
• No instance for ‘HasField "xyzzywyzzydyzzd" G H’
- arising from the record selector ‘xyzzywyzzydyzzd’
+ arising from the expression (.xyzzywyzzydyzzd)
NB: ‘G’ does not have a record field named ‘xyzzywyzzydyzzd’.
• In the expression: (.xyzzywyzzydyzzd)
In an equation for ‘test3a’: test3a = (.xyzzywyzzydyzzd)
@@ -50,6 +50,7 @@ T26480b.hs:47:10: error: [GHC-39999]
T26480b.hs:50:10: error: [GHC-39999]
• No instance for ‘HasField "xyzzywyzzydyzze" G H’
+ arising from the expression (.field1.xyzzywyzzydyzze)
NB: ‘G’ does not have a record field named ‘xyzzywyzzydyzze’.
• In the expression: (.field1.xyzzywyzzydyzze)
In an equation for ‘test3b’: test3b = (.field1.xyzzywyzzydyzze)
@@ -66,6 +67,7 @@ T26480b.hs:54:12: error: [GHC-39999]
T26480b.hs:57:12: error: [GHC-39999]
• No instance for ‘HasField "xyzzywyzzydyzzg" G H’
+ arising from a record update
NB: ‘G’ does not have a record field named ‘xyzzywyzzydyzzg’.
• In the expression: d {field1.xyzzywyzzydyzzg = MkH 3}
In an equation for ‘test4b’:
=====================================
testsuite/tests/plugins/test-defaulting-plugin.stderr
=====================================
@@ -3,7 +3,7 @@ test-defaulting-plugin.hs:28:11: warning: [GHC-18042] [-Wtype-defaults (in -Wall
KnownNat a0 arising from a use of ‘q’
• In the first argument of ‘(+)’, namely ‘q’
In the second argument of ‘($)’, namely ‘q + w’
- In the expression: print $ q + w
+ In a stmt of a 'do' block: print $ q + w
test-defaulting-plugin.hs:28:15: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
• Defaulting the type variable ‘a0’ to type ‘2’ in the following constraints
@@ -15,7 +15,7 @@ test-defaulting-plugin.hs:28:15: warning: [GHC-18042] [-Wtype-defaults (in -Wall
arising from a use of ‘w’ at test-defaulting-plugin.hs:28:15
• In the second argument of ‘(+)’, namely ‘w’
In the second argument of ‘($)’, namely ‘q + w’
- In the expression: print $ q + w
+ In a stmt of a 'do' block: print $ q + w
test-defaulting-plugin.hs:29:11: warning: [GHC-18042] [-Wtype-defaults (in -Wall)]
• Defaulting the type variable ‘b0’ to type ‘0’ in the following constraint
=====================================
testsuite/tests/polykinds/T13393.stderr
=====================================
@@ -1,25 +1,26 @@
T13393.hs:61:3: error: [GHC-39999]
- • Ambiguous type variable ‘t0’ arising from a use of ‘mapM’
+ • Ambiguous type variable ‘t0’ arising from a do statement
prevents the constraint ‘(Traversable t0)’ from being solved.
Probable fix: use a type annotation to specify what ‘t0’ should be.
Potentially matching instances:
- instance Traversable (Either a)
- -- Defined in ‘GHC.Internal.Data.Traversable’
- instance Traversable Identity
- -- Defined in ‘GHC.Internal.Data.Traversable’
- ...plus four others
- ...plus 27 instances involving out-of-scope types
- (use -fprint-potential-instances to see them all)
- • In the expression:
- mapM putBackLeftOverInputAndReturnOutput undefined
+ instance Traversable (Either a)
+ -- Defined in ‘GHC.Internal.Data.Traversable’
+ instance Traversable Identity
+ -- Defined in ‘GHC.Internal.Data.Traversable’
+ ...plus four others
+ ...plus 27 instances involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In a stmt of a 'do' block:
+ mapM putBackLeftOverInputAndReturnOutput undefined
In the expression:
- do mapM putBackLeftOverInputAndReturnOutput undefined
- undefined
+ do mapM putBackLeftOverInputAndReturnOutput undefined
+ undefined
In an equation for ‘encodeLinearToAac’:
- encodeLinearToAac
- = do mapM putBackLeftOverInputAndReturnOutput undefined
- undefined
- where
- putBackLeftOverInputAndReturnOutput (MkEncodeResult x)
- = do leftOvers .= x
- undefined
+ encodeLinearToAac
+ = do mapM putBackLeftOverInputAndReturnOutput undefined
+ undefined
+ where
+ putBackLeftOverInputAndReturnOutput (MkEncodeResult x)
+ = do leftOvers .= x
+ undefined
+
=====================================
testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
=====================================
@@ -12,15 +12,11 @@ valid_hole_fits.hs:9:6: warning: [GHC-88464] [-Wdeferred-out-of-scope-variables
valid_hole_fits.hs:17:17: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int -> IO Int
• In the expression: _ x
+ In a stmt of a 'do' block: y <- _ x
In the expression:
do x <- a 0
y <- _ x
return y
- In an equation for ‘c’:
- c _
- = do x <- a 0
- y <- _ x
- return y
• Relevant bindings include
x :: Int (bound at valid_hole_fits.hs:16:12)
c :: Int -> IO Int (bound at valid_hole_fits.hs:16:1)
=====================================
testsuite/tests/typecheck/should_fail/T10971d.stderr
=====================================
@@ -3,14 +3,14 @@ T10971d.hs:4:14: error: [GHC-83865]
with actual type: Maybe a3
• In the first argument of ‘f’, namely ‘(Just 1)’
In the second argument of ‘($)’, namely ‘f (Just 1)’
- In the expression: print $ f (Just 1)
+ In a stmt of a 'do' block: print $ f (Just 1)
T10971d.hs:5:19: error: [GHC-83865]
• Couldn't match expected type: [b0]
with actual type: Maybe a4
• In the second argument of ‘g’, namely ‘(Just 5)’
In the second argument of ‘($)’, namely ‘g (+ 1) (Just 5)’
- In the expression: print $ g (+ 1) (Just 5)
+ In a stmt of a 'do' block: print $ g (+ 1) (Just 5)
T10971d.hs:6:23: error: [GHC-83865]
• Couldn't match expected type: [a2]
=====================================
testsuite/tests/typecheck/should_fail/T13311.stderr
=====================================
@@ -2,7 +2,7 @@ T13311.hs:9:3: error: [GHC-83865]
• Couldn't match expected type: IO a0
with actual type: Maybe a1 -> Maybe b0
• Probable cause: ‘f’ is applied to too few arguments
- In the expression: f
+ In a stmt of a 'do' block: f
In the expression:
do f
putChar 'a'
=====================================
testsuite/tests/typecheck/should_fail/T24064.stderr
=====================================
@@ -10,7 +10,7 @@ T24064.hs:42:3: error: [GHC-25897]
the type signature for:
test :: forall (m :: * -> *). (C2 m, F2 m ~ Y) => m ()
at T24064.hs:40:1-32
- • In the expression: fun1
+ • In a stmt of a 'do' block: fun1
In the expression:
do fun1
fun2
=====================================
testsuite/tests/typecheck/should_fail/T3613.stderr
=====================================
@@ -10,7 +10,7 @@ T3613.hs:17:24: error: [GHC-83865]
• Couldn't match type ‘IO’ with ‘Maybe’
Expected: Maybe ()
Actual: IO ()
- • In the expression: bar
+ • In a stmt of a 'do' block: bar
In the first argument of ‘fooThen’, namely
‘(do bar
undefined)’
=====================================
testsuite/tests/typecheck/should_fail/T6069.stderr
=====================================
@@ -1,4 +1,3 @@
-
T6069.hs:13:15: error: [GHC-83865]
• Couldn't match type: forall s. ST s b0
with: ST s0 Int
@@ -24,4 +23,5 @@ T6069.hs:15:16: error: [GHC-83865]
Actual: (forall s. ST s b2) -> b2
• In the second argument of ‘(.)’, namely ‘runST’
In the expression: print . runST
- In the expression: ((print . runST) $) fourty_two
+ In the expression: (print . runST) $
+
=====================================
testsuite/tests/typecheck/should_fail/T7851.stderr
=====================================
@@ -2,7 +2,7 @@ T7851.hs:5:10: error: [GHC-83865]
• Couldn't match expected type: IO a0
with actual type: a1 -> IO ()
• Probable cause: ‘print’ is applied to too few arguments
- In the expression: print
+ In a stmt of a 'do' block: print
In the expression:
do print
print "Hello"
=====================================
testsuite/tests/typecheck/should_fail/T8603.stderr
=====================================
@@ -10,7 +10,5 @@ T8603.hs:33:17: error: [GHC-18872]
m a -> t m a’
has only one
In the expression: lift uniform [1, 2, 3]
- In the expression:
- do prize <- lift uniform [1, 2, 3]
- return False
+ In a stmt of a 'do' block: prize <- lift uniform [1, 2, 3]
=====================================
testsuite/tests/typecheck/should_fail/T9612.stderr
=====================================
@@ -3,9 +3,9 @@ T9612.hs:16:9: error: [GHC-18872]
with: (Int, a)
arising from a functional dependency between:
constraint ‘MonadWriter (Int, a) (WriterT [(Int, a)] Identity)’
- arising from a use of ‘tell’
+ arising from a do statement
instance ‘MonadWriter w (WriterT w m)’ at T9612.hs:20:10-59
- • In the expression: tell (n, x)
+ • In a stmt of a 'do' block: tell (n, x)
In the expression:
do tell (n, x)
return (1, y)
=====================================
testsuite/tests/typecheck/should_fail/tcfail128.stderr
=====================================
@@ -6,6 +6,7 @@ tcfail128.hs:18:16: error: [GHC-39999]
one instance involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: thaw tmp
+ In a stmt of a 'do' block: v <- thaw tmp
In the expression:
do let sL = [...]
dim = length sL
@@ -13,11 +14,4 @@ tcfail128.hs:18:16: error: [GHC-39999]
...
v <- thaw tmp
return ()
- In an equation for ‘main’:
- main
- = do let sL = ...
- dim = length sL
- ...
- v <- thaw tmp
- return ()
=====================================
testsuite/tests/typecheck/should_fail/tcfail140.stderr
=====================================
@@ -17,7 +17,8 @@ tcfail140.hs:13:10: error: [GHC-83865]
tcfail140.hs:15:15: error: [GHC-83865]
• Couldn't match expected type ‘t -> b’ with actual type ‘Int’
- • In the first argument of ‘map’, namely ‘(3 `f`)’
+ • Possible cause: ‘f’ is applied to too many arguments
+ In the first argument of ‘map’, namely ‘(3 `f`)’
In the expression: map (3 `f`) xs
In an equation for ‘bot’: bot xs = map (3 `f`) xs
• Relevant bindings include
=====================================
testsuite/tests/typecheck/should_fail/tcfail168.stderr
=====================================
@@ -1,19 +1,20 @@
tcfail168.hs:7:11: error: [GHC-83865]
• Couldn't match expected type: IO a0
- with actual type: Char -> IO ()
+ with actual type: Char -> IO ()
• Probable cause: ‘putChar’ is applied to too few arguments
- In the expression: putChar
+ In a stmt of a 'do' block: putChar
In the expression:
- do putChar
- putChar 'a'
- putChar 'a'
- putChar 'a'
- putChar 'a'
- ...
+ do putChar
+ putChar 'a'
+ putChar 'a'
+ putChar 'a'
+ putChar 'a'
+ ...
In an equation for ‘foo’:
- foo
- = do putChar
- putChar 'a'
- putChar 'a'
- putChar 'a'
- ...
+ foo
+ = do putChar
+ putChar 'a'
+ putChar 'a'
+ putChar 'a'
+ ...
+
=====================================
testsuite/tests/typecheck/should_fail/tcfail181.stderr
=====================================
@@ -1,6 +1,5 @@
-
tcfail181.hs:17:9: error: [GHC-39999]
- • Could not deduce ‘Monad m0’ arising from a use of ‘foo’
+ • Could not deduce ‘Monad m0’ arising from a record update
from the context: Monad m
bound by the inferred type of
wog :: Monad m => p -> Something (m Bool) e
@@ -12,8 +11,9 @@ tcfail181.hs:17:9: error: [GHC-39999]
...plus six others
...plus one instance involving out-of-scope types
(use -fprint-potential-instances to see them all)
- • In the expression: foo
- In a record update at field ‘bar’,
+ • In a record update at field ‘bar’,
with type constructor ‘Something’
and data constructor ‘Something’.
In the expression: foo {bar = return True}
+ In an equation for ‘wog’: wog x = foo {bar = return True}
+
=====================================
testsuite/tests/warnings/should_fail/CaretDiagnostics1.stderr
=====================================
@@ -1,7 +1,7 @@
CaretDiagnostics1.hs:7:8-15: error: [GHC-83865]
• Couldn't match expected type ‘IO a0’ with actual type ‘Int’
• In the second argument of ‘(+)’, namely ‘(3 :: Int)’
- In the expression:
+ In a stmt of a 'do' block:
10000000000000000000000000000000000000 + 2 + (3 :: Int)
In the expression:
do 10000000000000000000000000000000000000 + 2 + (3 :: Int)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc871fb970034810dc8854affdd642…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dc871fb970034810dc8854affdd642…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T24464] 28 commits: Improve error handling in 'getPackageArchives'
by Simon Peyton Jones (@simonpj) 02 Nov '25
by Simon Peyton Jones (@simonpj) 02 Nov '25
02 Nov '25
Simon Peyton Jones pushed to branch wip/T24464 at Glasgow Haskell Compiler / GHC
Commits:
91b6be10 by Julian Ospald at 2025-10-20T18:21:03-04:00
Improve error handling in 'getPackageArchives'
When the library dirs in the package conf files are not set up correctly,
the JS linker will happily ignore such packages and not link against them,
although they're part of the link plan.
Fixes #26383
- - - - -
6c5269da by Sven Tennie at 2025-10-20T18:21:44-04:00
Align coding style
Improve readability by using the same style for all constructor calls in
this function.
- - - - -
3d305889 by Sven Tennie at 2025-10-20T18:21:44-04:00
Reduce complexity by removing joins with mempty
ldArgs, cArgs and cppArgs are all `mempty`. Thus concatenating them adds
nothing but some complexity while reading the code.
- - - - -
38d65187 by Matthew Pickering at 2025-10-21T13:12:20+01:00
Fix stack decoding when using profiled runtime
There are three fixes in this commit.
* We need to replicate the `InfoTable` and `InfoTableProf`
approach for the other stack constants (see the new Stack.ConstantsProf
file).
* Then we need to appropiately import the profiled or non-profiled
versions.
* Finally, there was an incorrect addition in `stackFrameSize`. We need
to cast after performing addition on words.
Fixes #26507
- - - - -
17231bfb by fendor at 2025-10-21T13:12:20+01:00
Add regression test for #26507
- - - - -
4f5bf93b by Simon Peyton Jones at 2025-10-25T04:05:34-04:00
Postscript to fix for #26255
This MR has comments only
- - - - -
6ef22fa0 by IC Rainbow at 2025-10-26T18:23:01-04:00
Add SIMD primops for bitwise logical operations
This adds 128-bit wide and/or/xor instructions for X86 NCG,
with both SSE and AVX encodings.
```
andFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- andps / vandps
andDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- andpd / vandpd
andInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- pand / vpand
```
The new primops are available on ARM when using LLVM backend.
Tests added:
- simd015 (floats and doubles)
- simd016 (integers)
- simd017 (words)
Fixes #26417
- - - - -
fbdc623a by sheaf at 2025-10-26T18:23:52-04:00
Add hints for unsolved HasField constraints
This commit adds hints and explanations for unsolved 'HasField'
constraints.
GHC will now provide additional explanations for an unsolved constraint
of the form 'HasField fld_name rec_ty fld_ty'; the details are laid out in
Note [Error messages for unsolved HasField constraints], but briefly:
1. Provide similar name suggestions (e.g. mis-spelled field name)
and import suggestions (record field not in scope).
These result in actionable 'GhcHints', which is helpful to provide
code actions in HLS.
2. Explain why GHC did not solve the constraint, e.g.:
- 'fld_name' is not a string literal (e.g. a type variable)
- 'rec_ty' is a TyCon without any fields, e.g. 'Int' or 'Bool'.
- 'fld_ty' contains existentials variables or foralls.
- The record field is a pattern synonym field (GHC does not generate
HasField instances for those).
- 'HasField' is a custom 'TyCon', not actually the built-in
'HasField' typeclass from 'GHC.Records'.
On the way, we slightly refactor the mechanisms for import suggestions
in GHC.Rename.Unbound. This is to account for the fact that, for
'HasField', we don't care whether the field is imported qualified or
unqualified. 'importSuggestions' was refactored, we now have
'sameQualImportSuggestions' and 'anyQualImportSuggestions'.
Fixes #18776 #22382 #26480
- - - - -
99d5707f by sheaf at 2025-10-26T18:23:52-04:00
Rename PatSyn MatchContext to PatSynCtx to avoid punning
- - - - -
5dc2e9ea by Julian Ospald at 2025-10-27T18:17:23-04:00
Skip uniques test if sources are not available
- - - - -
544b9ec9 by Vladislav Zavialov at 2025-10-27T18:18:06-04:00
Re-export GHC.Hs.Basic from GHC.Hs
Clean up some import sections in GHC by re-exporting GHC.Hs.Basic
from GHC.Hs.
- - - - -
643ce801 by Julian Ospald at 2025-10-28T18:18:55-04:00
rts: remove unneccesary cabal flags
We perform those checks via proper autoconf macros
instead that do the right thing and then add those
libs to the rts buildinfo.
- - - - -
d69ea8fe by Vladislav Zavialov at 2025-10-28T18:19:37-04:00
Test case for #17705
Starting with GHC 9.12 (the first release to include 5745dbd3),
all examples in this ticket are handled as expected.
- - - - -
4038a28b by Andreas Klebinger at 2025-10-30T12:38:52-04:00
Add a perf test for #26425
- - - - -
f997618e by Andreas Klebinger at 2025-10-30T12:38:52-04:00
OccAnal: Be stricter for better compiler perf.
In particular we are now stricter:
* When combining usageDetails.
* When computing binder info.
In combineUsageDetails when combining the underlying adds we compute a
new `LocalOcc` for each entry by combining the two existing ones.
Rather than wait for those entries to be forced down the road we now
force them immediately. Speeding up T26425 by about 10% with little
effect on the common case.
We also force binders we put into the Core AST everywhere now.
Failure to do so risks leaking the occ env used to set the binders
OccInfo.
For T26425 compiler residency went down by a factor of ~10x.
Compile time also improved by a factor of ~1.6.
-------------------------
Metric Decrease:
T18698a
T26425
T9233
-------------------------
- - - - -
5618645b by Vladislav Zavialov at 2025-10-30T12:39:33-04:00
Fix namespace specifiers in subordinate exports (#12488)
This patch fixes an oversight in the `lookupChildrenExport` function that
caused explicit namespace specifiers of subordinate export items to be
ignored:
module M (T (type A)) where -- should be rejected
data T = A
Based on the `IEWrappedName` data type, there are 5 cases to consider:
1. Unadorned name: P(X)
2. Named default: P(default X)
3. Pattern synonym: P(pattern X)
4. Type name: P(type X)
5. Data name: P(data X)
Case 1 is already handled correctly; cases 2 and 3 are parse errors; and
it is cases 4 and 5 that we are concerned with in this patch.
Following the precedent established in `LookupExactName`, we introduce
a boolean flag in `LookupChildren` to control whether to look up in all
namespaces or in a specific one. If an export item is accompanied by an
explicit namespace specifier `type` or `data`, we restrict the lookup in
`lookupGRE` to a specific namespace.
The newly introduced diagnostic `TcRnExportedSubordinateNotFound`
provides error messages and suggestions more tailored to this context
than the previously used `reportUnboundName`.
- - - - -
f75ab223 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: detect PowerPC 64 bit ABI
Check preprocessor macro defined for ABI v2 and assume v1 otherwise.
Fixes #26521
- - - - -
d086c474 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: refactor, move lastLine to Utils
- - - - -
995dfe0d by Vladislav Zavialov at 2025-10-31T18:43:54-04:00
Tests for -Wduplicate-exports, -Wdodgy-exports
Add test cases for the previously untested diagnostics:
[GHC-51876] TcRnDupeModuleExport
[GHC-64649] TcRnNullExportedModule
This also revealed a typo (incorrect capitalization of "module") in the
warning text for TcRnDupeModuleExport, which is now fixed.
- - - - -
f6961b02 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: reformat dyld source code
This commit reformats dyld source code with prettier, to avoid
introducing unnecessary diffs in subsequent patches when they're
formatted before committing.
- - - - -
0c9032a0 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: simplify _initialize logic in dyld
This commit simplifies how we _initialize a wasm shared library in
dyld and removes special treatment for libc.so, see added comment for
detailed explanation.
- - - - -
ec1b40bd by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: support running dyld fully client side in the browser
This commit refactors the wasm dyld script so that it can be used to
load and run wasm shared libraries fully client-side in the browser
without needing a wasm32-wasi-ghci backend:
- A new `DyLDBrowserHost` class is exported, which runs in the browser
and uses the in-memory vfs without any RPC calls. This meant to be
used to create a `rpc` object for the fully client side use cases.
- The exported `main` function now can be used to load user-specified
shared libraries, and the user can use the returned `DyLD` instance
to run their own exported Haskell functions.
- The in-browser wasi implementation is switched to
https://github.com/haskell-wasm/browser_wasi_shim for bugfixes and
major performance improvements not landed upstream yet.
- When being run by deno, it now correctly switches to non-nodejs code
paths, so it's more convenient to test dyld logic with deno.
See added comments for details, as well as the added `playground001`
test case for an example of using it to build an in-browser Haskell
playground.
- - - - -
8f3e481f by Cheng Shao at 2025-11-01T00:08:01+01:00
testsuite: add playground001 to test haskell playground
This commit adds the playground001 test case to test the haskell
playground in browser, see comments for details.
- - - - -
af40606a by Cheng Shao at 2025-11-01T00:08:04+01:00
Revert "testsuite: add T26431 test case"
This reverts commit 695036686f8c6d78611edf3ed627608d94def6b7. T26431
is now retired, wasm ghc internal-interpreter logic is tested by
playground001.
- - - - -
86c82745 by Vladislav Zavialov at 2025-11-01T07:24:29-04:00
Supplant TcRnExportHiddenComponents with TcRnDodgyExports (#26534)
Remove a bogus special case in lookup_ie_kids_all,
making TcRnExportHiddenComponents obsolete.
- - - - -
69f750a6 by Simon Peyton Jones at 2025-11-02T23:41:41+00:00
Start at moving static forms straight to top level
Just for CI. Needs documentation.
- - - - -
580a4723 by Simon Peyton Jones at 2025-11-02T23:41:42+00:00
Wibble
- - - - -
07a053cb by Simon Peyton Jones at 2025-11-02T23:41:42+00:00
Fix desugaring
- - - - -
158 changed files:
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/ConLike.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/Wasm.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Types.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Linker/Linker.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/Unique/FM.hs
- compiler/GHC/Types/Var/Env.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- docs/users_guide/9.16.1-notes.rst
- hadrian/src/Rules/Gmp.hs
- hadrian/src/Rules/Libffi.hs
- hadrian/src/Settings/Builders/Cabal.hs
- hadrian/src/Settings/Builders/Common.hs
- hadrian/src/Settings/Builders/DeriveConstants.hs
- hadrian/src/Settings/Builders/Hsc2Hs.hs
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-internal/cbits/Stack_c.c
- libraries/ghc-internal/ghc-internal.cabal.in
- + libraries/ghc-internal/src/GHC/Internal/Stack/ConstantsProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs
- + libraries/ghc-internal/tests/backtraces/T26507.hs
- + libraries/ghc-internal/tests/backtraces/T26507.stderr
- libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-internal/tests/stack-annotation/all.T
- libraries/ghc-prim/changelog.md
- m4/fp_check_pthreads.m4
- rts/configure.ac
- + rts/rts.buildinfo.in
- rts/rts.cabal
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/ghc-api-browser/README.md
- + testsuite/tests/ghc-api-browser/all.T
- + testsuite/tests/ghc-api-browser/index.html
- + testsuite/tests/ghc-api-browser/playground001.hs
- + testsuite/tests/ghc-api-browser/playground001.js
- + testsuite/tests/ghc-api-browser/playground001.sh
- testsuite/tests/ghci-wasm/T26431.stdout → testsuite/tests/ghc-api-browser/playground001.stdout
- − testsuite/tests/ghci-wasm/T26431.hs
- testsuite/tests/ghci-wasm/all.T
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/linters/all.T
- testsuite/tests/module/mod4.stderr
- + testsuite/tests/overloadedrecflds/should_fail/T26480.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480.stderr
- + testsuite/tests/overloadedrecflds/should_fail/T26480_aux1.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480_aux2.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480b.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr
- testsuite/tests/overloadedrecflds/should_fail/all.T
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail01.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail02.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.hs
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
- + testsuite/tests/parser/should_fail/T12488c.hs
- + testsuite/tests/parser/should_fail/T12488c.stderr
- + testsuite/tests/parser/should_fail/T12488d.hs
- + testsuite/tests/parser/should_fail/T12488d.stderr
- testsuite/tests/parser/should_fail/all.T
- + testsuite/tests/perf/compiler/T26425.hs
- testsuite/tests/perf/compiler/all.T
- + testsuite/tests/rename/should_compile/T12488b.hs
- + testsuite/tests/rename/should_compile/T12488f.hs
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/rename/should_fail/T12488a.hs
- + testsuite/tests/rename/should_fail/T12488a.stderr
- + testsuite/tests/rename/should_fail/T12488a_foo.hs
- + testsuite/tests/rename/should_fail/T12488a_foo.stderr
- + testsuite/tests/rename/should_fail/T12488e.hs
- + testsuite/tests/rename/should_fail/T12488e.stderr
- + testsuite/tests/rename/should_fail/T12488g.hs
- + testsuite/tests/rename/should_fail/T12488g.stderr
- testsuite/tests/rename/should_fail/T19843h.stderr
- testsuite/tests/rename/should_fail/T25899e2.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/simd/should_run/all.T
- + testsuite/tests/simd/should_run/simd015.hs
- + testsuite/tests/simd/should_run/simd015.stdout
- + testsuite/tests/simd/should_run/simd016.hs
- + testsuite/tests/simd/should_run/simd016.stdout
- + testsuite/tests/simd/should_run/simd017.hs
- + testsuite/tests/simd/should_run/simd017.stdout
- + testsuite/tests/typecheck/should_compile/T17705.hs
- testsuite/tests/typecheck/should_compile/all.T
- + testsuite/tests/warnings/should_compile/DodgyExports02.hs
- + testsuite/tests/warnings/should_compile/DodgyExports02.stderr
- + testsuite/tests/warnings/should_compile/DodgyExports03.hs
- + testsuite/tests/warnings/should_compile/DodgyExports03.stderr
- + testsuite/tests/warnings/should_compile/DuplicateModExport.hs
- + testsuite/tests/warnings/should_compile/DuplicateModExport.stderr
- + testsuite/tests/warnings/should_compile/EmptyModExport.hs
- + testsuite/tests/warnings/should_compile/EmptyModExport.stderr
- testsuite/tests/warnings/should_compile/all.T
- utils/check-exact/ExactPrint.hs
- utils/ghc-toolchain/ghc-toolchain.cabal
- utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs
- + utils/ghc-toolchain/src/GHC/Toolchain/CheckPower.hs
- utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
- utils/jsffi/dyld.mjs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5a4da0bb5460887faa1cd86421113c…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5a4da0bb5460887faa1cd86421113c…
You're receiving this email because of your account on gitlab.haskell.org.
1
0
[Git][ghc/ghc][wip/T26514] 24 commits: Fix stack decoding when using profiled runtime
by Simon Peyton Jones (@simonpj) 02 Nov '25
by Simon Peyton Jones (@simonpj) 02 Nov '25
02 Nov '25
Simon Peyton Jones pushed to branch wip/T26514 at Glasgow Haskell Compiler / GHC
Commits:
38d65187 by Matthew Pickering at 2025-10-21T13:12:20+01:00
Fix stack decoding when using profiled runtime
There are three fixes in this commit.
* We need to replicate the `InfoTable` and `InfoTableProf`
approach for the other stack constants (see the new Stack.ConstantsProf
file).
* Then we need to appropiately import the profiled or non-profiled
versions.
* Finally, there was an incorrect addition in `stackFrameSize`. We need
to cast after performing addition on words.
Fixes #26507
- - - - -
17231bfb by fendor at 2025-10-21T13:12:20+01:00
Add regression test for #26507
- - - - -
4f5bf93b by Simon Peyton Jones at 2025-10-25T04:05:34-04:00
Postscript to fix for #26255
This MR has comments only
- - - - -
6ef22fa0 by IC Rainbow at 2025-10-26T18:23:01-04:00
Add SIMD primops for bitwise logical operations
This adds 128-bit wide and/or/xor instructions for X86 NCG,
with both SSE and AVX encodings.
```
andFloatX4# :: FloatX4# -> FloatX4# -> FloatX4# -- andps / vandps
andDoubleX2# :: DoubleX2# -> DoubleX2# -> DoubleX2# -- andpd / vandpd
andInt8X16# :: Int8X16# -> Int8X16# -> Int8X16# -- pand / vpand
```
The new primops are available on ARM when using LLVM backend.
Tests added:
- simd015 (floats and doubles)
- simd016 (integers)
- simd017 (words)
Fixes #26417
- - - - -
fbdc623a by sheaf at 2025-10-26T18:23:52-04:00
Add hints for unsolved HasField constraints
This commit adds hints and explanations for unsolved 'HasField'
constraints.
GHC will now provide additional explanations for an unsolved constraint
of the form 'HasField fld_name rec_ty fld_ty'; the details are laid out in
Note [Error messages for unsolved HasField constraints], but briefly:
1. Provide similar name suggestions (e.g. mis-spelled field name)
and import suggestions (record field not in scope).
These result in actionable 'GhcHints', which is helpful to provide
code actions in HLS.
2. Explain why GHC did not solve the constraint, e.g.:
- 'fld_name' is not a string literal (e.g. a type variable)
- 'rec_ty' is a TyCon without any fields, e.g. 'Int' or 'Bool'.
- 'fld_ty' contains existentials variables or foralls.
- The record field is a pattern synonym field (GHC does not generate
HasField instances for those).
- 'HasField' is a custom 'TyCon', not actually the built-in
'HasField' typeclass from 'GHC.Records'.
On the way, we slightly refactor the mechanisms for import suggestions
in GHC.Rename.Unbound. This is to account for the fact that, for
'HasField', we don't care whether the field is imported qualified or
unqualified. 'importSuggestions' was refactored, we now have
'sameQualImportSuggestions' and 'anyQualImportSuggestions'.
Fixes #18776 #22382 #26480
- - - - -
99d5707f by sheaf at 2025-10-26T18:23:52-04:00
Rename PatSyn MatchContext to PatSynCtx to avoid punning
- - - - -
5dc2e9ea by Julian Ospald at 2025-10-27T18:17:23-04:00
Skip uniques test if sources are not available
- - - - -
544b9ec9 by Vladislav Zavialov at 2025-10-27T18:18:06-04:00
Re-export GHC.Hs.Basic from GHC.Hs
Clean up some import sections in GHC by re-exporting GHC.Hs.Basic
from GHC.Hs.
- - - - -
643ce801 by Julian Ospald at 2025-10-28T18:18:55-04:00
rts: remove unneccesary cabal flags
We perform those checks via proper autoconf macros
instead that do the right thing and then add those
libs to the rts buildinfo.
- - - - -
d69ea8fe by Vladislav Zavialov at 2025-10-28T18:19:37-04:00
Test case for #17705
Starting with GHC 9.12 (the first release to include 5745dbd3),
all examples in this ticket are handled as expected.
- - - - -
4038a28b by Andreas Klebinger at 2025-10-30T12:38:52-04:00
Add a perf test for #26425
- - - - -
f997618e by Andreas Klebinger at 2025-10-30T12:38:52-04:00
OccAnal: Be stricter for better compiler perf.
In particular we are now stricter:
* When combining usageDetails.
* When computing binder info.
In combineUsageDetails when combining the underlying adds we compute a
new `LocalOcc` for each entry by combining the two existing ones.
Rather than wait for those entries to be forced down the road we now
force them immediately. Speeding up T26425 by about 10% with little
effect on the common case.
We also force binders we put into the Core AST everywhere now.
Failure to do so risks leaking the occ env used to set the binders
OccInfo.
For T26425 compiler residency went down by a factor of ~10x.
Compile time also improved by a factor of ~1.6.
-------------------------
Metric Decrease:
T18698a
T26425
T9233
-------------------------
- - - - -
5618645b by Vladislav Zavialov at 2025-10-30T12:39:33-04:00
Fix namespace specifiers in subordinate exports (#12488)
This patch fixes an oversight in the `lookupChildrenExport` function that
caused explicit namespace specifiers of subordinate export items to be
ignored:
module M (T (type A)) where -- should be rejected
data T = A
Based on the `IEWrappedName` data type, there are 5 cases to consider:
1. Unadorned name: P(X)
2. Named default: P(default X)
3. Pattern synonym: P(pattern X)
4. Type name: P(type X)
5. Data name: P(data X)
Case 1 is already handled correctly; cases 2 and 3 are parse errors; and
it is cases 4 and 5 that we are concerned with in this patch.
Following the precedent established in `LookupExactName`, we introduce
a boolean flag in `LookupChildren` to control whether to look up in all
namespaces or in a specific one. If an export item is accompanied by an
explicit namespace specifier `type` or `data`, we restrict the lookup in
`lookupGRE` to a specific namespace.
The newly introduced diagnostic `TcRnExportedSubordinateNotFound`
provides error messages and suggestions more tailored to this context
than the previously used `reportUnboundName`.
- - - - -
f75ab223 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: detect PowerPC 64 bit ABI
Check preprocessor macro defined for ABI v2 and assume v1 otherwise.
Fixes #26521
- - - - -
d086c474 by Peter Trommler at 2025-10-31T18:43:13-04:00
ghc-toolchain: refactor, move lastLine to Utils
- - - - -
995dfe0d by Vladislav Zavialov at 2025-10-31T18:43:54-04:00
Tests for -Wduplicate-exports, -Wdodgy-exports
Add test cases for the previously untested diagnostics:
[GHC-51876] TcRnDupeModuleExport
[GHC-64649] TcRnNullExportedModule
This also revealed a typo (incorrect capitalization of "module") in the
warning text for TcRnDupeModuleExport, which is now fixed.
- - - - -
f6961b02 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: reformat dyld source code
This commit reformats dyld source code with prettier, to avoid
introducing unnecessary diffs in subsequent patches when they're
formatted before committing.
- - - - -
0c9032a0 by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: simplify _initialize logic in dyld
This commit simplifies how we _initialize a wasm shared library in
dyld and removes special treatment for libc.so, see added comment for
detailed explanation.
- - - - -
ec1b40bd by Cheng Shao at 2025-11-01T00:08:01+01:00
wasm: support running dyld fully client side in the browser
This commit refactors the wasm dyld script so that it can be used to
load and run wasm shared libraries fully client-side in the browser
without needing a wasm32-wasi-ghci backend:
- A new `DyLDBrowserHost` class is exported, which runs in the browser
and uses the in-memory vfs without any RPC calls. This meant to be
used to create a `rpc` object for the fully client side use cases.
- The exported `main` function now can be used to load user-specified
shared libraries, and the user can use the returned `DyLD` instance
to run their own exported Haskell functions.
- The in-browser wasi implementation is switched to
https://github.com/haskell-wasm/browser_wasi_shim for bugfixes and
major performance improvements not landed upstream yet.
- When being run by deno, it now correctly switches to non-nodejs code
paths, so it's more convenient to test dyld logic with deno.
See added comments for details, as well as the added `playground001`
test case for an example of using it to build an in-browser Haskell
playground.
- - - - -
8f3e481f by Cheng Shao at 2025-11-01T00:08:01+01:00
testsuite: add playground001 to test haskell playground
This commit adds the playground001 test case to test the haskell
playground in browser, see comments for details.
- - - - -
af40606a by Cheng Shao at 2025-11-01T00:08:04+01:00
Revert "testsuite: add T26431 test case"
This reverts commit 695036686f8c6d78611edf3ed627608d94def6b7. T26431
is now retired, wasm ghc internal-interpreter logic is tested by
playground001.
- - - - -
86c82745 by Vladislav Zavialov at 2025-11-01T07:24:29-04:00
Supplant TcRnExportHiddenComponents with TcRnDodgyExports (#26534)
Remove a bogus special case in lookup_ie_kids_all,
making TcRnExportHiddenComponents obsolete.
- - - - -
3eb15c6d by Simon Peyton Jones at 2025-11-02T20:29:44+00:00
Wibble [skip ci]
- - - - -
216a943c by Simon Peyton Jones at 2025-11-02T20:29:44+00:00
Make PmLit be in Ord
... so that we can use a finite map instead of a list
Let's see if ther are any perf changes
- - - - -
149 changed files:
- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Cmm/MachOp.hs
- compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- compiler/GHC/CmmToAsm/X86/Instr.hs
- compiler/GHC/CmmToAsm/X86/Ppr.hs
- compiler/GHC/CmmToC.hs
- compiler/GHC/CmmToLlvm/CodeGen.hs
- compiler/GHC/Core/ConLike.hs
- compiler/GHC/Core/Opt/OccurAnal.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Foreign/Wasm.hs
- compiler/GHC/HsToCore/Pmc/Solver/Types.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Parser/Errors/Types.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Unbound.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/StgToCmm/Prim.hs
- compiler/GHC/StgToJS/Prim.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Generics.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Types/Origin.hs
- compiler/GHC/Tc/Validity.hs
- compiler/GHC/ThToHs.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/SourceText.hs
- compiler/GHC/Types/Unique/FM.hs
- compiler/GHC/Types/Var/Env.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- docs/users_guide/9.16.1-notes.rst
- libraries/base/src/GHC/Base.hs
- libraries/base/src/GHC/Exts.hs
- libraries/ghc-experimental/CHANGELOG.md
- libraries/ghc-internal/cbits/Stack_c.c
- libraries/ghc-internal/ghc-internal.cabal.in
- + libraries/ghc-internal/src/GHC/Internal/Stack/ConstantsProf.hsc
- libraries/ghc-internal/src/GHC/Internal/Stack/Decode.hs
- + libraries/ghc-internal/tests/backtraces/T26507.hs
- + libraries/ghc-internal/tests/backtraces/T26507.stderr
- libraries/ghc-internal/tests/backtraces/all.T
- libraries/ghc-internal/tests/stack-annotation/all.T
- libraries/ghc-prim/changelog.md
- m4/fp_check_pthreads.m4
- rts/configure.ac
- + rts/rts.buildinfo.in
- rts/rts.cabal
- testsuite/tests/diagnostic-codes/codes.stdout
- + testsuite/tests/ghc-api-browser/README.md
- + testsuite/tests/ghc-api-browser/all.T
- + testsuite/tests/ghc-api-browser/index.html
- + testsuite/tests/ghc-api-browser/playground001.hs
- + testsuite/tests/ghc-api-browser/playground001.js
- + testsuite/tests/ghc-api-browser/playground001.sh
- testsuite/tests/ghci-wasm/T26431.stdout → testsuite/tests/ghc-api-browser/playground001.stdout
- − testsuite/tests/ghci-wasm/T26431.hs
- testsuite/tests/ghci-wasm/all.T
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- testsuite/tests/interface-stability/ghc-prim-exports.stdout
- testsuite/tests/interface-stability/ghc-prim-exports.stdout-mingw32
- testsuite/tests/linters/all.T
- testsuite/tests/module/mod4.stderr
- + testsuite/tests/overloadedrecflds/should_fail/T26480.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480.stderr
- + testsuite/tests/overloadedrecflds/should_fail/T26480_aux1.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480_aux2.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480b.hs
- + testsuite/tests/overloadedrecflds/should_fail/T26480b.stderr
- testsuite/tests/overloadedrecflds/should_fail/all.T
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail01.stderr
- testsuite/tests/overloadedrecflds/should_fail/hasfieldfail02.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.hs
- testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
- + testsuite/tests/parser/should_fail/T12488c.hs
- + testsuite/tests/parser/should_fail/T12488c.stderr
- + testsuite/tests/parser/should_fail/T12488d.hs
- + testsuite/tests/parser/should_fail/T12488d.stderr
- testsuite/tests/parser/should_fail/all.T
- + testsuite/tests/perf/compiler/T26425.hs
- testsuite/tests/perf/compiler/all.T
- + testsuite/tests/rename/should_compile/T12488b.hs
- + testsuite/tests/rename/should_compile/T12488f.hs
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/rename/should_fail/T12488a.hs
- + testsuite/tests/rename/should_fail/T12488a.stderr
- + testsuite/tests/rename/should_fail/T12488a_foo.hs
- + testsuite/tests/rename/should_fail/T12488a_foo.stderr
- + testsuite/tests/rename/should_fail/T12488e.hs
- + testsuite/tests/rename/should_fail/T12488e.stderr
- + testsuite/tests/rename/should_fail/T12488g.hs
- + testsuite/tests/rename/should_fail/T12488g.stderr
- testsuite/tests/rename/should_fail/T19843h.stderr
- testsuite/tests/rename/should_fail/T25899e2.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/simd/should_run/all.T
- + testsuite/tests/simd/should_run/simd015.hs
- + testsuite/tests/simd/should_run/simd015.stdout
- + testsuite/tests/simd/should_run/simd016.hs
- + testsuite/tests/simd/should_run/simd016.stdout
- + testsuite/tests/simd/should_run/simd017.hs
- + testsuite/tests/simd/should_run/simd017.stdout
- + testsuite/tests/typecheck/should_compile/T17705.hs
- testsuite/tests/typecheck/should_compile/all.T
- + testsuite/tests/warnings/should_compile/DodgyExports02.hs
- + testsuite/tests/warnings/should_compile/DodgyExports02.stderr
- + testsuite/tests/warnings/should_compile/DodgyExports03.hs
- + testsuite/tests/warnings/should_compile/DodgyExports03.stderr
- + testsuite/tests/warnings/should_compile/DuplicateModExport.hs
- + testsuite/tests/warnings/should_compile/DuplicateModExport.stderr
- + testsuite/tests/warnings/should_compile/EmptyModExport.hs
- + testsuite/tests/warnings/should_compile/EmptyModExport.stderr
- testsuite/tests/warnings/should_compile/all.T
- utils/check-exact/ExactPrint.hs
- utils/ghc-toolchain/ghc-toolchain.cabal
- utils/ghc-toolchain/src/GHC/Toolchain/CheckArm.hs
- + utils/ghc-toolchain/src/GHC/Toolchain/CheckPower.hs
- utils/ghc-toolchain/src/GHC/Toolchain/ParseTriple.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Utils.hs
- utils/haddock/haddock-api/src/Haddock/Convert.hs
- utils/haddock/haddock-api/src/Haddock/Interface/Rename.hs
- utils/haddock/haddock-api/src/Haddock/Types.hs
- utils/jsffi/dyld.mjs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/962301c632aaf2f9f873346c1de818…
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/962301c632aaf2f9f873346c1de818…
You're receiving this email because of your account on gitlab.haskell.org.
1
0