Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
530e8e58
by Simon Peyton Jones at 2026-02-12T20:17:23-05:00
-
e594aa0f
by Cheng Shao at 2026-02-12T20:50:17-05:00
-
d93ce703
by Cheng Shao at 2026-02-12T20:50:18-05:00
13 changed files:
- .gitlab-ci.yml
- + testsuite/tests/rename/should_fail/T26545.hs
- + testsuite/tests/rename/should_fail/T26545.stderr
- testsuite/tests/rename/should_fail/all.T
- + testsuite/tests/typecheck/should_compile/T24464.hs
- testsuite/tests/typecheck/should_compile/all.T
- + testsuite/tests/typecheck/should_run/T16981.hs
- + testsuite/tests/typecheck/should_run/T16981.stdout
- + testsuite/tests/typecheck/should_run/T24773.hs
- + testsuite/tests/typecheck/should_run/T24773.stdout
- testsuite/tests/typecheck/should_run/all.T
- utils/jsffi/dyld.mjs
- utils/jsffi/post-link.mjs
Changes:
| ... | ... | @@ -387,20 +387,6 @@ lint-submods-branch: |
| 387 | 387 | paths:
|
| 388 | 388 | - cabal-cache
|
| 389 | 389 | |
| 390 | -# Disabled due to #22830
|
|
| 391 | -.hlint-ghc-and-base:
|
|
| 392 | - extends: .lint-params
|
|
| 393 | - image: "registry.gitlab.haskell.org/ghc/ci-images/linters:$DOCKER_REV"
|
|
| 394 | - variables:
|
|
| 395 | - BUILD_FLAVOUR: default
|
|
| 396 | - script:
|
|
| 397 | - - .gitlab/ci.sh setup
|
|
| 398 | - - .gitlab/ci.sh configure
|
|
| 399 | - - .gitlab/ci.sh run_hadrian lint:ghc-internal
|
|
| 400 | - - .gitlab/ci.sh run_hadrian lint:ghc-experimental
|
|
| 401 | - - .gitlab/ci.sh run_hadrian lint:base
|
|
| 402 | - - .gitlab/ci.sh run_hadrian lint:compiler
|
|
| 403 | - |
|
| 404 | 390 | ############################################################
|
| 405 | 391 | # GHC-in-GHCi (Hadrian)
|
| 406 | 392 | ############################################################
|
| 1 | +{-# LANGUAGE MagicHash #-}
|
|
| 2 | +{-# LANGUAGE StaticPointers #-}
|
|
| 3 | + |
|
| 4 | +module Foo where
|
|
| 5 | + |
|
| 6 | +import GHC.Exts
|
|
| 7 | + |
|
| 8 | +f :: Int# -> Int#
|
|
| 9 | +f 0# = 0#
|
|
| 10 | +f n# = f (n# -# 1#)
|
|
| 11 | + |
|
| 12 | +h x = let v = f 3# in static (I# (v +# 1#)) |
| 1 | +T26545.hs:12:23: error: [GHC-88431]
|
|
| 2 | + āvā is used in a static form but it is not defined at top level
|
|
| 3 | + |
| ... | ... | @@ -263,3 +263,4 @@ test('T25901_sub_b', normal, compile_fail, ['']) |
| 263 | 263 | test('T25901_sub_c', [extra_files(['T25901_sub_c_helper.hs'])], multimod_compile_fail, ['T25901_sub_c', '-v0'])
|
| 264 | 264 | test('T25901_sub_d', [extra_files(['T25901_sub_d_helper.hs'])], multimod_compile_fail, ['T25901_sub_d', '-v0'])
|
| 265 | 265 | test('T25901_sub_w', normal, compile_fail, [''])
|
| 266 | +test('T26545', normal, compile_fail, ['']) |
| 1 | +{-# LANGUAGE StaticPointers #-}
|
|
| 2 | +module T24464 where
|
|
| 3 | + |
|
| 4 | +import GHC.StaticPtr
|
|
| 5 | + |
|
| 6 | +class C a where
|
|
| 7 | + f :: a -> StaticPtr ()
|
|
| 8 | + f _ = static () |
| ... | ... | @@ -960,4 +960,5 @@ test('T26582', normal, compile, ['']) |
| 960 | 960 | test('T26746', normal, compile, [''])
|
| 961 | 961 | test('T26737', normal, compile, [''])
|
| 962 | 962 | test('T26805a', normal, compile, [''])
|
| 963 | +test('T24464', normal, compile, [''])
|
|
| 963 | 964 |
| 1 | +{-# LANGUAGE StaticPointers #-}
|
|
| 2 | +-- Main.hs
|
|
| 3 | +module Main where
|
|
| 4 | + |
|
| 5 | +import GHC.StaticPtr
|
|
| 6 | + |
|
| 7 | +class UniqueHash a where
|
|
| 8 | + hash :: a -> String
|
|
| 9 | + |
|
| 10 | +{-# NOINLINE unCacheable #-}
|
|
| 11 | +unCacheable :: Cacheable a -> a
|
|
| 12 | +unCacheable (CExplicit _ a) = a
|
|
| 13 | + |
|
| 14 | +data Cacheable a = CExplicit String a
|
|
| 15 | + |
|
| 16 | +instance UniqueHash (StaticPtr a) where
|
|
| 17 | + hash ptr = show $ staticKey ptr
|
|
| 18 | + |
|
| 19 | +instance IsStatic Cacheable where
|
|
| 20 | + fromStaticPtr ptr = CExplicit h a where
|
|
| 21 | + h = hash ptr
|
|
| 22 | + a = deRefStaticPtr ptr
|
|
| 23 | + |
|
| 24 | +{-# NOINLINE splitInjectedAsWindowed #-}
|
|
| 25 | +splitInjectedAsWindowed :: Int
|
|
| 26 | +-- WindowedDataset
|
|
| 27 | +splitInjectedAsWindowed = unCacheable $ static 1
|
|
| 28 | + |
|
| 29 | + |
|
| 30 | +main :: IO ()
|
|
| 31 | +main = print splitInjectedAsWindowed |
| 1 | +1 |
| 1 | +{-# LANGUAGE StaticPointers #-}
|
|
| 2 | +{-# OPTIONS_GHC -O1 #-}
|
|
| 3 | + |
|
| 4 | +module Main where
|
|
| 5 | + |
|
| 6 | +import GHC.StaticPtr ( StaticPtr )
|
|
| 7 | + |
|
| 8 | +{-# NOINLINE uhoh #-}
|
|
| 9 | +uhoh :: () -> StaticPtr ()
|
|
| 10 | +uhoh =
|
|
| 11 | + let ptr :: StaticPtr ()
|
|
| 12 | + ptr = static ()
|
|
| 13 | + in \_ -> ptr
|
|
| 14 | + |
|
| 15 | +main :: IO ()
|
|
| 16 | +main = putStrLn "Hello, Haskell!" |
| 1 | +Hello, Haskell! |
| ... | ... | @@ -181,3 +181,5 @@ test('T15598', normal, compile_and_run, ['']) |
| 181 | 181 | test('T22086', normal, compile_and_run, [''])
|
| 182 | 182 | test('T24411', normal, compile_and_run, [''])
|
| 183 | 183 | test('DefaultExceptionContext', normal, compile_and_run, [''])
|
| 184 | +test('T24773', normal, compile_and_run, [''])
|
|
| 185 | +test('T16981', normal, compile_and_run, ['']) |
| ... | ... | @@ -1470,7 +1470,7 @@ async function nodeMain({ searchDirs, mainSoPath, outFd, inFd, args }) { |
| 1470 | 1470 | );
|
| 1471 | 1471 | }
|
| 1472 | 1472 | |
| 1473 | -const isNodeMain = isNode && import.meta.filename === process.argv[1];
|
|
| 1473 | +const isNodeMain = isNode && import.meta.main;
|
|
| 1474 | 1474 | |
| 1475 | 1475 | // node iserv as invoked by
|
| 1476 | 1476 | // GHC.Runtime.Interpreter.Wasm.spawnWasmInterp
|
| ... | ... | @@ -119,7 +119,7 @@ function isMain() { |
| 119 | 119 | return false;
|
| 120 | 120 | }
|
| 121 | 121 | |
| 122 | - return import.meta.filename === process.argv[1];
|
|
| 122 | + return import.meta.main;
|
|
| 123 | 123 | }
|
| 124 | 124 | |
| 125 | 125 | async function main() {
|