Hannes Siebenhandl pushed to branch wip/fendor/no-code-output-constr at Glasgow Haskell Compiler / GHC

Commits:

5 changed files:

Changes:

  • testsuite/tests/ghci/scripts/all.T
    ... ... @@ -385,6 +385,14 @@ test('ListTuplePunsPpr', normal, ghci_script, ['ListTuplePunsPpr.script'])
    385 385
     test('ListTuplePunsPprNoAbbrevTuple', [limit_stdout_lines(14)], ghci_script, ['ListTuplePunsPprNoAbbrevTuple.script'])
    
    386 386
     test('T24459', normal, ghci_script, ['T24459.script'])
    
    387 387
     test('T24632', normal, ghci_script, ['T24632.script'])
    
    388
    +# bytecode backend doesn't support '-finfo-table-map' (#27039)
    
    389
    +test('bytecodeIPE',
    
    390
    +     [ extra_hc_opts('-finfo-table-map')
    
    391
    +     , extra_files(['bytecodeIPE.hs'])
    
    392
    +     , req_rts_linker
    
    393
    +     , when(arch('wasm32') or arch('javascript'), skip)
    
    394
    +     ],
    
    395
    +     ghci_script, ['bytecodeIPE.script'])
    
    388 396
     
    
    389 397
     # Test package renaming in GHCi session
    
    390 398
     test('GhciPackageRename',
    

  • testsuite/tests/ghci/scripts/bytecodeIPE.hs
    1
    +module BytecodeIPE where
    
    2
    +
    
    3
    +import Data.Maybe (isJust)
    
    4
    +import GHC.InfoProv (whereFrom)
    
    5
    +
    
    6
    +marker :: String
    
    7
    +marker = id "bytecode-stub-init"
    
    8
    +{-# NOINLINE marker #-}
    
    9
    +
    
    10
    +-- `whereFrom` only succeeds if the module's IPE initializer ran.
    
    11
    +probe :: IO Bool
    
    12
    +probe = isJust <$> whereFrom marker

  • testsuite/tests/ghci/scripts/bytecodeIPE.script
    1
    +:load bytecodeIPE.hs
    
    2
    +probe

  • testsuite/tests/ghci/scripts/bytecodeIPE.stderr
    1
    +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)]
    
    2
    +    -finfo-table-map is incompatible with -fbyte-code and is disabled

  • testsuite/tests/ghci/scripts/bytecodeIPE.stdout
    1
    +False