Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc
  • bgamari/ghc
  • syd/ghc
  • ggreif/ghc
  • watashi/ghc
  • RolandSenn/ghc
  • mpickering/ghc
  • DavidEichmann/ghc
  • carter/ghc
  • harpocrates/ghc
  • ethercrow/ghc
  • mijicd/ghc
  • adamse/ghc
  • alexbiehl/ghc
  • gridaphobe/ghc
  • trofi/ghc
  • supersven/ghc
  • ppk/ghc
  • ulysses4ever/ghc
  • AndreasK/ghc
  • ghuntley/ghc
  • shayne-fletcher-da/ghc
  • fgaz/ghc
  • yav/ghc
  • osa1/ghc
  • mbbx6spp/ghc
  • JulianLeviston/ghc
  • reactormonk/ghc
  • rae/ghc
  • takenobu-hs/ghc
  • michalt/ghc
  • andrewthad/ghc
  • hsyl20/ghc
  • scottgw/ghc
  • sjakobi/ghc
  • angerman/ghc
  • RyanGlScott/ghc
  • hvr/ghc
  • howtonotwin/ghc
  • chessai/ghc
  • m-renaud/ghc
  • brprice/ghc
  • stevehartdata/ghc
  • sighingnow/ghc
  • kgardas/ghc
  • ckoparkar/ghc
  • alp/ghc
  • smaeul/ghc
  • kakkun61/ghc
  • sykloid/ghc
  • newhoggy/ghc
  • toonn/ghc
  • nineonine/ghc
  • Phyx/ghc
  • ezyang/ghc
  • tweag/ghc
  • langston/ghc
  • ndmitchell/ghc
  • rockbmb/ghc
  • artempyanykh/ghc
  • mniip/ghc
  • mynguyenbmc/ghc
  • alexfmpe/ghc
  • crockeea/ghc
  • nh2/ghc
  • vaibhavsagar/ghc
  • phadej/ghc
  • Haskell-mouse/ghc
  • lolotp/ghc
  • spacekitteh/ghc
  • michaelpj/ghc
  • mgsloan/ghc
  • HPCohen/ghc
  • tmobile/ghc
  • radrow/ghc
  • simonmar/ghc
  • _deepfire/ghc
  • Ericson2314/ghc
  • leitao/ghc
  • fumieval/ghc
  • trac-isovector/ghc
  • cblp/ghc
  • xich/ghc
  • ciil/ghc
  • erthalion/ghc
  • xldenis/ghc
  • autotaker/ghc
  • haskell-wasm/ghc
  • kcsongor/ghc
  • agander/ghc
  • Baranowski/ghc
  • trac-dredozubov/ghc
  • 23Skidoo/ghc
  • iustin/ghc
  • ningning/ghc
  • josefs/ghc
  • kabuhr/ghc
  • gallais/ghc
  • dten/ghc
  • expipiplus1/ghc
  • Pluralia/ghc
  • rohanjr/ghc
  • intricate/ghc
  • kirelagin/ghc
  • Javran/ghc
  • DanielG/ghc
  • trac-mizunashi_mana/ghc
  • pparkkin/ghc
  • bollu/ghc
  • ntc2/ghc
  • jaspervdj/ghc
  • JoshMeredith/ghc
  • wz1000/ghc
  • zkourouma/ghc
  • code5hot/ghc
  • jdprice/ghc
  • tdammers/ghc
  • J-mie6/ghc
  • trac-lantti/ghc
  • ch1bo/ghc
  • cgohla/ghc
  • lucamolteni/ghc
  • acairncross/ghc
  • amerocu/ghc
  • chreekat/ghc
  • txsmith/ghc
  • trupill/ghc
  • typetetris/ghc
  • sergv/ghc
  • fryguybob/ghc
  • erikd/ghc
  • trac-roland/ghc
  • setupminimal/ghc
  • Friede80/ghc
  • SkyWriter/ghc
  • xplorld/ghc
  • abrar/ghc
  • obsidiansystems/ghc
  • Icelandjack/ghc
  • adinapoli/ghc
  • trac-matthewbauer/ghc
  • heatsink/ghc
  • dwijnand/ghc
  • Cmdv/ghc
  • alinab/ghc
  • pepeiborra/ghc
  • fommil/ghc
  • luochen1990/ghc
  • rlupton20/ghc
  • applePrincess/ghc
  • lehins/ghc
  • ronmrdechai/ghc
  • leeadam/ghc
  • harendra/ghc
  • mightymosquito1991/ghc
  • trac-gershomb/ghc
  • lucajulian/ghc
  • Rizary/ghc
  • VictorCMiraldo/ghc
  • jamesbrock/ghc
  • andrewdmeier/ghc
  • luke/ghc
  • pranaysashank/ghc
  • cocreature/ghc
  • hithroc/ghc
  • obreitwi/ghc
  • slrtbtfs/ghc
  • kaol/ghc
  • yairchu/ghc
  • Mathemagician98/ghc
  • trac-taylorfausak/ghc
  • leungbk/ghc
  • MichaWiedenmann/ghc
  • chris-martin/ghc
  • TDecki/ghc
  • adithyaov/ghc
  • trac-gelisam/ghc
  • Lysxia/ghc
  • complyue/ghc
  • bwignall/ghc
  • sternmull/ghc
  • sonika/ghc
  • leif/ghc
  • broadwaylamb/ghc
  • myszon/ghc
  • danbroooks/ghc
  • Mechachleopteryx/ghc
  • zardyh/ghc
  • trac-vdukhovni/ghc
  • OmarKhaledAbdo/ghc
  • arrowd/ghc
  • Bodigrim/ghc
  • matheus23/ghc
  • cardenaso11/ghc
  • trac-Athas/ghc
  • mb720/ghc
  • DylanZA/ghc
  • liff/ghc
  • typedrat/ghc
  • trac-claude/ghc
  • jbm/ghc
  • Gertjan423/ghc
  • PHO/ghc
  • JKTKops/ghc
  • kockahonza/ghc
  • msakai/ghc
  • Sir4ur0n/ghc
  • barambani/ghc
  • vishnu.c/ghc
  • dcoutts/ghc
  • trac-runeks/ghc
  • trac-MaxGabriel/ghc
  • lexi.lambda/ghc
  • strake/ghc
  • spavikevik/ghc
  • JakobBruenker/ghc
  • rmanne/ghc
  • gdziadkiewicz/ghc
  • ani/ghc
  • iliastsi/ghc
  • smunix/ghc
  • judah/ghc
  • blackgnezdo/ghc
  • emilypi/ghc
  • trac-bpfoley/ghc
  • muesli4/ghc
  • trac-gkaracha/ghc
  • Kleidukos/ghc
  • nek0/ghc
  • TristanCacqueray/ghc
  • dwulive/ghc
  • mbakke/ghc
  • arybczak/ghc
  • Yang123321/ghc
  • maksbotan/ghc
  • QuietMisdreavus/ghc
  • trac-olshanskydr/ghc
  • emekoi/ghc
  • samuela/ghc
  • josephcsible/ghc
  • dramforever/ghc
  • lpsmith/ghc
  • DenisFrezzato/ghc
  • michivi/ghc
  • jneira/ghc
  • jeffhappily/ghc
  • Ivan-Yudin/ghc
  • nakaji-dayo/ghc
  • gdevanla/ghc
  • galen/ghc
  • fendor/ghc
  • yaitskov/ghc
  • rcythr/ghc
  • awpr/ghc
  • jeremyschlatter/ghc
  • Aver1y/ghc
  • mitchellvitez/ghc
  • merijn/ghc
  • tomjaguarpaw1/ghc
  • trac-NoidedSuper/ghc
  • erewok/ghc
  • trac-junji.hashimoto/ghc
  • adamwespiser/ghc
  • bjaress/ghc
  • jhrcek/ghc
  • leonschoorl/ghc
  • lukasz-golebiewski/ghc
  • sheaf/ghc
  • last-g/ghc
  • carassius1014/ghc
  • eschwartz/ghc
  • dwincort/ghc
  • felixwiemuth/ghc
  • TimWSpence/ghc
  • marcusmonteirodesouza/ghc
  • WJWH/ghc
  • vtols/ghc
  • theobat/ghc
  • BinderDavid/ghc
  • ckoparkar0/ghc
  • alexander-kjeldaas/ghc
  • dme2/ghc
  • philderbeast/ghc
  • aaronallen8455/ghc
  • rayshih/ghc
  • benkard/ghc
  • mpardalos/ghc
  • saidelman/ghc
  • leiftw/ghc
  • ca333/ghc
  • bwroga/ghc
  • nmichael44/ghc
  • trac-crobbins/ghc
  • felixonmars/ghc
  • adityagupta1089/ghc
  • hgsipiere/ghc
  • treeowl/ghc
  • alexpeits/ghc
  • CraigFe/ghc
  • dnlkrgr/ghc
  • kerckhove_ts/ghc
  • cptwunderlich/ghc
  • eiais/ghc
  • hahohihu/ghc
  • sanchayan/ghc
  • lemmih/ghc
  • sehqlr/ghc
  • trac-dbeacham/ghc
  • luite/ghc
  • trac-f-a/ghc
  • vados/ghc
  • luntain/ghc
  • fatho/ghc
  • alexbiehl-gc/ghc
  • dcbdan/ghc
  • tvh/ghc
  • liam-ly/ghc
  • timbobbarnes/ghc
  • GovanifY/ghc
  • shanth2600/ghc
  • gliboc/ghc
  • duog/ghc
  • moxonsghost/ghc
  • zander/ghc
  • masaeedu/ghc
  • georgefst/ghc
  • guibou/ghc
  • nicuveo/ghc
  • mdebruijne/ghc
  • stjordanis/ghc
  • emiflake/ghc
  • wygulmage/ghc
  • frasertweedale/ghc
  • coot/ghc
  • aratamizuki/ghc
  • tsandstr/ghc
  • mrBliss/ghc
  • Anton-Latukha/ghc
  • tadfisher/ghc
  • vapourismo/ghc
  • Sorokin-Anton/ghc
  • basile-henry/ghc
  • trac-mightybyte/ghc
  • AbsoluteNikola/ghc
  • cobrien99/ghc
  • songzh/ghc
  • blamario/ghc
  • aj4ayushjain/ghc
  • trac-utdemir/ghc
  • tangcl/ghc
  • hdgarrood/ghc
  • maerwald/ghc
  • arjun/ghc
  • ratherforky/ghc
  • haskieLambda/ghc
  • EmilGedda/ghc
  • Bogicevic/ghc
  • eddiejessup/ghc
  • kozross/ghc
  • AlistairB/ghc
  • 3Rafal/ghc
  • christiaanb/ghc
  • trac-bit/ghc
  • matsumonkie/ghc
  • trac-parsonsmatt/ghc
  • chisui/ghc
  • jaro/ghc
  • trac-kmiyazato/ghc
  • davidsd/ghc
  • Tritlo/ghc
  • I-B-3/ghc
  • lykahb/ghc
  • AriFordsham/ghc
  • turion1/ghc
  • berberman/ghc
  • christiantakle/ghc
  • zyklotomic/ghc
  • trac-ocramz/ghc
  • CSEdd/ghc
  • doyougnu/ghc
  • mmhat/ghc
  • why-not-try-calmer/ghc
  • plutotulp/ghc
  • kjekac/ghc
  • Manvi07/ghc
  • teo/ghc
  • cactus/ghc
  • CarrieMY/ghc
  • abel/ghc
  • yihming/ghc
  • tsakki/ghc
  • jessicah/ghc
  • oliverbunting/ghc
  • meld/ghc
  • friedbrice/ghc
  • Joald/ghc
  • abarbu/ghc
  • DigitalBrains1/ghc
  • sterni/ghc
  • alexDarcy/ghc
  • hexchain/ghc
  • minimario/ghc
  • zliu41/ghc
  • tommd/ghc
  • jazcarate/ghc
  • peterbecich/ghc
  • alirezaghey/ghc
  • solomon/ghc
  • mikael.urankar/ghc
  • davjam/ghc
  • int-index/ghc
  • MorrowM/ghc
  • nrnrnr/ghc
  • Sonfamm/ghc-test-only
  • afzt1/ghc
  • nguyenhaibinh-tpc/ghc
  • trac-lierdakil/ghc
  • MichaWiedenmann1/ghc
  • jmorag/ghc
  • Ziharrk/ghc
  • trac-MitchellSalad/ghc
  • juampe/ghc
  • jwaldmann/ghc
  • snowleopard/ghc
  • juhp/ghc
  • normalcoder/ghc
  • ksqsf/ghc
  • trac-jberryman/ghc
  • roberth/ghc
  • 1ntEgr8/ghc
  • epworth/ghc
  • MrAdityaAlok/ghc
  • JunmingZhao42/ghc
  • jappeace/ghc
  • trac-Gabriel439/ghc
  • alt-romes/ghc
  • HugoPeters1024/ghc
  • 10ne1/ghc-fork
  • agentultra/ghc
  • Garfield1002/ghc
  • ChickenProp/ghc
  • clyring/ghc
  • MaxHearnden/ghc
  • jumper149/ghc
  • vem/ghc
  • ketzacoatl/ghc
  • Rosuavio/ghc
  • jackohughes/ghc
  • p4l1ly/ghc
  • konsumlamm/ghc
  • shlevy/ghc
  • torsten.schmits/ghc
  • andremarianiello/ghc
  • amesgen/ghc
  • googleson78/ghc
  • InfiniteVerma/ghc
  • uhbif19/ghc
  • yiyunliu/ghc
  • raehik/ghc
  • mrkun/ghc
  • telser/ghc
  • 1Jajen1/ghc
  • slotThe/ghc
  • WinstonHartnett/ghc
  • mpilgrem/ghc
  • dreamsmasher/ghc
  • schuelermine/ghc
  • trac-Viwor/ghc
  • undergroundquizscene/ghc
  • evertedsphere/ghc
  • coltenwebb/ghc
  • oberblastmeister/ghc
  • agrue/ghc
  • lf-/ghc
  • zacwood9/ghc
  • steshaw/ghc
  • high-cloud/ghc
  • SkamDart/ghc
  • PiDelport/ghc
  • maoif/ghc
  • RossPaterson/ghc
  • CharlesTaylor7/ghc
  • ribosomerocker/ghc
  • trac-ramirez7/ghc
  • daig/ghc
  • NicolasT/ghc
  • FinleyMcIlwaine/ghc
  • lawtonnichols/ghc
  • jmtd/ghc
  • ozkutuk/ghc
  • wildsebastian/ghc
  • nikshalark/ghc
  • lrzlin/ghc
  • tobias/ghc
  • fw/ghc
  • hawkinsw/ghc
  • type-dance/ghc
  • rui314/ghc
  • ocharles/ghc
  • wavewave/ghc
  • TheKK/ghc
  • nomeata/ghc
  • trac-csabahruska/ghc
  • jonathanjameswatson/ghc
  • L-as/ghc
  • Axman6/ghc
  • barracuda156/ghc
  • trac-jship/ghc
  • jake-87/ghc
  • meooow/ghc
  • rebeccat/ghc
  • hamana55/ghc
  • Enigmage/ghc
  • kokobd/ghc
  • agevelt/ghc
  • gshen42/ghc
  • chrismwendt/ghc
  • MangoIV/ghc
  • teto/ghc
  • Sookr1/ghc
  • trac-thomasjm/ghc
  • barci2/ghc-dev
  • trac-m4dc4p/ghc
  • dixonary/ghc
  • breakerzirconia/ghc
  • alexsio27444/ghc
  • glocq/ghc
  • sourabhxyz/ghc
  • ryantrinkle/ghc
  • Jade/ghc
  • scedfaliako/ghc
  • martijnbastiaan/ghc
  • trac-george.colpitts/ghc
  • ammarbinfaisal/ghc
  • mimi.vx/ghc
  • lortabac/ghc
  • trac-zyla/ghc
  • benbellick/ghc
  • aadaa-fgtaa/ghc
  • jvanbruegge/ghc
  • archbung/ghc
  • gilmi/ghc
  • mfonism/ghc
  • alex-mckenna/ghc
  • Ei30metry/ghc
  • DiegoDiverio/ghc
  • jorgecunhamendes/ghc
  • liesnikov/ghc
  • akrmn/ghc
  • trac-simplifierticks/ghc
  • jacco/ghc
  • rhendric/ghc
  • damhiya/ghc
  • ryndubei/ghc
  • DaveBarton/ghc
  • trac-Profpatsch/ghc
  • GZGavinZhao/ghc
  • ncfavier/ghc
  • jameshaydon/ghc
  • ajccosta/ghc
  • dschrempf/ghc
  • cydparser/ghc
  • LinuxUserGD/ghc
  • elodielander/ghc
  • facundominguez/ghc
  • psilospore/ghc
  • lachrimae/ghc
  • dylan-thinnes/ghc-type-errors-plugin
  • hamishmack/ghc
  • Leary/ghc
  • lzszt/ghc
  • lyokha/ghc
  • trac-glaubitz/ghc
  • Rewbert/ghc
  • andreabedini/ghc
  • Jasagredo/ghc
  • sol/ghc
  • OlegAlexander/ghc
  • trac-sthibaul/ghc
  • avdv/ghc
  • Wendaolee/ghc
  • ur4t/ghc
  • daylily/ghc
  • boltzmannrain/ghc
  • mmzk1526/ghc
  • trac-fizzixnerd/ghc
  • soulomoon/ghc
  • rwmjones/ghc
  • j14i/ghc
  • tracsis/ghc
  • gesh/ghc
  • flip101/ghc
  • eldritch-cookie/ghc
  • LemonjamesD/ghc
  • pgujjula/ghc
  • skeuchel/ghc
  • noteed/ghc
  • gulin.serge/ghc
  • Torrekie/ghc
  • jlwoodwa/ghc
  • ayanamists/ghc
  • husong998/ghc
  • trac-edmundnoble/ghc
  • josephf/ghc
  • contrun/ghc
  • baulig/ghc
  • edsko/ghc
  • mzschr/ghc-issue-24732
  • ulidtko/ghc
  • Arsen/ghc
  • trac-sjoerd_visscher/ghc
  • crumbtoo/ghc
  • L0neGamer/ghc
  • DrewFenwick/ghc
  • benz0li/ghc
  • MaciejWas/ghc
  • jordanrule/ghc
  • trac-qqwy/ghc
  • LiamGoodacre/ghc
  • isomorpheme/ghc
  • trac-danidiaz/ghc
  • Kariim/ghc
  • MTaimoorZaeem/ghc
  • hololeap/ghc
  • ticat-fp/ghc
  • meritamen/ghc
  • criskell/ghc
  • trac-kraai/ghc
  • aergus/ghc
  • jdral/ghc
  • SamB/ghc
  • Tristian/ghc
  • ywgrit/ghc
  • KatsuPatrick/ghc
  • OsePedro/ghc
  • mpscholten/ghc
  • fp/ghc
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
640 results
Show changes
Commits on Source (66)
  • Matthew Pickering's avatar
    ghcup-metadata: Fix debian version ranges · cca7de25
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This was caught by `ghcup-ci` failing and attempting to install a deb12
    bindist on deb11.
    
    ```
    configure: WARNING: m4/prep_target_file.m4: Expecting YES/NO but got  in ArSupportsDashL_STAGE0. Defaulting to False.
    bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by bin/ghc-toolchain-bin)
    bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so)
    bin/ghc-toolchain-bin: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/tmp.LBhwvFbVoy/foobarbaz/.ghcup/tmp/ghcup-708d9668d5d82287/ghc-9.11.20240609-x86_64-unknown-linux/bin/../lib/x86_64-linux-ghc-9.11.20240609/libHSunix-2.8.5.1-inplace-ghc9.11.20240609.so)
    ```
    
    Fixes #24974
    cca7de25
  • Pierre Le Marre's avatar
    ucd2haskell: remove Streamly dependency + misc · 7b23ce8b
    Pierre Le Marre authored and Marge Bot's avatar Marge Bot committed
    - Remove dead code.
    - Remove `streamly` dependency.
    - Process files with `bytestring`.
    - Replace Unicode files parsers with the corresponding ones from the
      package `unicode-data-parser`.
    - Simplify cabal file and rename module
    - Regenerate `ghc-internal` Unicode files with new header
    7b23ce8b
  • Jacco Krijnen's avatar
    Document how to run haddocks tests (#24976) · 4570319f
    Jacco Krijnen authored and Marge Bot's avatar Marge Bot committed
    Also remove ghc 9.7 requirement
    4570319f
  • amesgen's avatar
    compiler: refactor lower_CmmExpr_Ptr · fb629e24
    amesgen authored and Marge Bot's avatar Marge Bot committed
    fb629e24
  • amesgen's avatar
    compiler: handle CmmRegOff in lower_CmmExpr_Ptr · def46c8c
    amesgen authored and Marge Bot's avatar Marge Bot committed
    def46c8c
  • Simon Peyton Jones's avatar
    Small documentation update in Quick Look · ce76bf78
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    ce76bf78
  • Simon Peyton Jones's avatar
    Add hack for #24623 · 19bcfc9b
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    ..Th bug in #24623 is randomly triggered by this MR!..
    19bcfc9b
  • Simon Peyton Jones's avatar
    Various fixes to type-tidying · 7a08a025
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    This MR was triggered by #24868, but I found a number of bugs
    and infelicities in type-tidying as I went along.  Highlights:
    
    * Fix to #24868 is in GHC.Tc.Errors.report_unsolved: avoid
      using the OccNames of /bound/ variables when tidying /free/
      variables; see the call to `tidyAvoiding`.  That avoid the
      gratuitous renaming which was the cause of #24868. See
         Note [tidyAvoiding] in GHC.Core.TyCo.Tidy
    
    * Refactor and document the tidying of open types.
      See GHC.Core.TyCo.Tidy
         Note [Tidying open types]
         Note [Tidying is idempotent]
    
    * Tidy the coercion variable in HoleCo. That's important so
      that tidied types have tidied kinds.
    
    * Some small renaming to make things consistent.  In particular
      the "X" forms return a new TidyEnv.  E.g.
         tidyOpenType  :: TidyEnv -> Type -> Type
         tidyOpenTypeX :: TidyEnv -> Type -> (TidyEnv, Type)
    7a08a025
  • Simon Peyton Jones's avatar
    Wibble · 2eac0288
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    2eac0288
  • Simon Peyton Jones's avatar
    Wibbles · e5d24cc2
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    e5d24cc2
  • Simon Peyton Jones's avatar
    Localise a case-binder in SpecConstr.mkSeqs · 246bc3a4
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    This small change fixes #24944
    
    See (SCF1) in Note [SpecConstr and strict fields]
    246bc3a4
  • Sylvain Henry's avatar
    PPC: display foreign label in panic message (cf #23969) · a5994380
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    a5994380
  • Rodrigo Mesquita's avatar
    cmm: Parse MO_BSwap primitive operation · bd95553a
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    Parsing this operation allows it to be tested using `test-primops` in a
    subsequent MR.
    bd95553a
  • Bodigrim's avatar
  • Alan Zimmerman's avatar
    EPA: Add location to Match Pats list · 118a1292
    Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
    So we can freely modify the pats and the following item spacing will
    still be valid when exact printing.
    
    Closes #24862
    118a1292
  • Fabricio de Sousa Nascimento's avatar
    compiler: Rejects RULES whose LHS immediately fails to type-check · db343324
    Fabricio de Sousa Nascimento authored and Marge Bot's avatar Marge Bot committed
    Fixes GHC crashing on `decomposeRuleLhs` due to ignoring coercion values. This
    happens when we have a RULE that does not type check, and enable
    `-fdefer-type-errors`. We prevent this to happen by rejecting RULES with an
    immediately LHS type error.
    
    Fixes #24026
    db343324
  • Dylan Thinnes's avatar
    Add hscTypecheckRenameWithDiagnostics, for HLS (#24996) · e7a95662
    Dylan Thinnes authored and Marge Bot's avatar Marge Bot committed
    Use runHsc' in runHsc so that both functions can't fall out of sync
    
    We're currently copying parts of GHC code to get structured warnings
    in HLS, so that we can recreate `hscTypecheckRenameWithDiagnostics`
    locally. Once we get this function into GHC we can drop the copied code
    in future versions of HLS.
    e7a95662
  • sheaf's avatar
    Clarify -XGADTs enables existential quantification · d70abb49
    sheaf authored and Marge Bot's avatar Marge Bot committed
    Even though -XGADTs does not turn on -XExistentialQuantification,
    it does allow the user of existential quantification syntax, without
    needing to use GADT-style syntax.
    
    Fixes #20865
    d70abb49
  • BinderDavid's avatar
    Add RTS flag --read-tix-file (GHC Proposal 612) · 13fdf788
    BinderDavid authored and Marge Bot's avatar Marge Bot committed
    This commit introduces the RTS flag `--read-tix-file=<yes|no>` which
    controls whether a preexisting .tix file is read in at the beginning
    of a program run. The default is currently `--read-tix-file=yes` but
    will change to `--read-tix-file=no` in a future release of GHC. For
    this reason, whenever a .tix file is read in a warning is emitted to
    stderr. This warning can be silenced by explicitly passing the
    `--read-tix-file=yes` option. Details can be found in the GHC proposal
    cited below.
    
    Users can query whether this flag has been used with the help of the
    module `GHC.RTS.Flags`. A new field `readTixFile` was added to the
    record `HpcFlags`.
    
    These changes have been discussed and approved in
    - GHC proposal 612: https://github.com/ghc-proposals/ghc-proposals/pull/612
    - CLC proposal 276: https://github.com/haskell/core-libraries-committee/issues/276
    13fdf788
  • Hannes Siebenhandl's avatar
    Improve sharing of duplicated values in `ModIface`, fixes #24723 · f0e3cb6a
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    As a `ModIface` often contains duplicated values that are not
    necessarily shared, we improve sharing by serialising the `ModIface`
    to an in-memory byte array. Serialisation uses deduplication tables, and
    deserialisation implicitly shares duplicated values.
    
    This helps reducing the peak memory usage while compiling in
    `--make` mode. The peak memory usage is especially smaller when
    generating interface files with core expressions
    (`-fwrite-if-simplified-core`).
    
    On agda, this reduces the peak memory usage:
    
    * `2.2 GB` to `1.9 GB` for a ghci session.
    
    On `lib:Cabal`, we report:
    
    * `570 MB` to `500 MB` for a ghci session
    * `790 MB` to `667 MB` for compiling `lib:Cabal` with ghc
    
    There is a small impact on execution time, around 2% on the agda code
    base.
    f0e3cb6a
  • Hannes Siebenhandl's avatar
    Avoid unneccessarily re-serialising the `ModIface` · 1bab7dde
    Hannes Siebenhandl authored and Marge Bot's avatar Marge Bot committed
    To reduce memory usage of `ModIface`, we serialise `ModIface` to an
    in-memory byte array, which implicitly shares duplicated values.
    
    This serialised byte array can be reused to avoid work when we actually
    write the `ModIface` to disk.
    We introduce a new field to `ModIface` which allows us to save the byte
    array, and write it direclty to disk if the `ModIface` wasn't changed
    after the initial serialisation.
    
    This requires us to change absolute offsets, for example to jump to the
    deduplication table for `Name` or `FastString` with relative offsets, as
    the deduplication byte array doesn't contain header information, such as
    fingerprints.
    To allow us to dump the binary blob to disk, we need to replace all
    absolute offsets with relative ones.
    
    We introduce additional helpers for `ModIface` binary serialisation, which
    construct relocatable binary blobs. We say the binary blob is relocatable,
    if the binary representation can be moved and does not contain any
    absolute offsets.
    
    Further, we introduce new primitives for `Binary` that allow to create
    relocatable binaries, such as `forwardGetRel` and `forwardPutRel`.
    
    -------------------------
    Metric Decrease:
        MultiLayerModulesDefsGhcWithCore
    Metric Increase:
        MultiComponentModules
        MultiLayerModules
        T10421
        T12150
        T12234
        T12425
        T13035
        T13253-spj
        T13701
        T13719
        T14697
        T15703
        T16875
        T18698b
        T18140
        T18304
        T18698a
        T18730
        T18923
        T20049
        T24582
        T5837
        T6048
        T9198
        T9961
        mhu-perf
    -------------------------
    
    These metric increases may look bad, but they are all completely benign,
    we simply allocate 1 MB per module for `shareIface`. As this allocation
    is quite quick, it has a negligible impact on run-time performance.
    In fact, the performance difference wasn't measurable on my local
    machine. Reducing the size of the pre-allocated 1 MB buffer avoids these
    test failures, but also requires us to reallocate the buffer if the
    interface file is too big. These reallocations *did* have an impact on
    performance, which is why I have opted to accept all these metric
    increases, as the number of allocated bytes is merely a guidance.
    
    This 1MB allocation increase causes a lot of tests to fail that
    generally have a low allocation number. E.g., increasing from 40MB to
    41MB is a 2.5% increase.
    In particular, the tests T12150, T13253-spj, T18140, T18304, T18698a,
    T18923, T20049, T24582, T5837, T6048, and T9961 only fail on i386-darwin
    job, where the number of allocated bytes seems to be lower than in other
    jobs.
    The tests T16875 and T18698b fail on i386-linux for the same reason.
    1bab7dde
  • Andreas Klebinger's avatar
    Improve documentation of @Any@ type. · 099992df
    Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
    In particular mention possible uses for non-lifted types.
    
    Fixes #23100.
    099992df
  • Jakob Brünker's avatar
    Update user guide to indicate support for 64-tuples · 5e75412b
    Jakob Brünker authored and Marge Bot's avatar Marge Bot committed
    5e75412b
  • Andreas Klebinger's avatar
    lint notes: Add more info to notes.stdout · 4f5da595
    Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
    When fixing a note reference CI fails with a somewhat confusing diff.
    See #21123. This commit adds a line to the output file being compared
    which hopefully makes it clear this is the list of broken refs, not all
    refs.
    
    Fixes #21123
    4f5da595
  • Jakob Brünker's avatar
    docs: Update mention of ($) type in user guide · 1eb15c61
    Jakob Brünker authored and Marge Bot's avatar Marge Bot committed
    Fixes #24909
    1eb15c61
  • Jan Hrček's avatar
    Remove duplicate Anno instances · 1d66c9e3
    Jan Hrček authored and Marge Bot's avatar Marge Bot committed
    1d66c9e3
  • Sven Tennie's avatar
    AArch64: Delete unused RegNos · 8ea0ba95
    Sven Tennie authored and Marge Bot's avatar Marge Bot committed
    This has the additional benefit of getting rid of the -1 encoding (real
    registers start at 0.)
    8ea0ba95
  • Sjoerd Visscher's avatar
    Bump stm submodule to current master · 325422e0
    Sjoerd Visscher authored and Marge Bot's avatar Marge Bot committed
    325422e0
  • Cheng Shao's avatar
    testsuite: bump T17572 timeout on wasm32 · 64fba310
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    64fba310
  • Sven Tennie's avatar
    AArch64: Simplify BL instruction · eb612fbc
    Sven Tennie authored and Marge Bot's avatar Marge Bot committed
    The BL constructor carried unused data in its third argument.
    eb612fbc
  • Alan Zimmerman's avatar
    TTG: Move SourceText from `Fixity` to `FixitySig` · b0300503
    Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
    It is only used there, simplifies the use of `Fixity` in the rest of
    the code, and is moved into a TTG extension point.
    
    Precedes !12842, to simplify it
    b0300503
  • Rodrigo Mesquita's avatar
    base: Deprecate some .Internal modules · 842e119b
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    Deprecates the following modules according to clc-proposal #217:
    https://github.com/haskell/core-libraries-committee/issues/217
    
    * GHC.TypeNats.Internal
    * GHC.TypeLits.Internal
    * GHC.ExecutionStack.Internal
    
    Closes #24998
    842e119b
  • Jacco Krijnen's avatar
    ttg: Use List instead of Bag in AST for LHsBindsLR · 24e89c40
    Jacco Krijnen authored and Marge Bot's avatar Marge Bot committed
    Considering that the parser used to create a Bag of binds using a
    cons-based approach, it can be also done using lists. The operations in
    the compiler don't really require Bag.
    
    By using lists, there is no dependency on GHC.Data.Bag anymore from the
    AST.
    
    Progress towards #21592
    24e89c40
  • Simon Peyton Jones's avatar
    Fix untouchability test · 04f5bb85
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    This MR fixes #24938.  The underlying problem was tha the test for
    "does this implication bring in scope any equalities" was plain wrong.
    
    See
      Note [Tracking Given equalities] and
      Note [Let-bound skolems]
    both in GHC.Tc.Solver.InertSet.
    
    Then
    * Test LocalGivenEqs succeeds for a different reason than before;
      see (LBS2) in Note [Let-bound skolems]
    
    * New test T24938a succeeds because of (LBS2), whereas it failed
      before.
    
    * Test LocalGivenEqs2 now fails, as it should.
    
    * Test T224938, the repro from the ticket, fails, as it should.
    04f5bb85
  • Simon Peyton Jones's avatar
    Fix demand signatures for join points · 9a757a27
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    This MR tackles #24623 and #23113
    
    The main change is to give a clearer notion of "worker/wrapper arity", esp
    for join points. See GHC.Core.Opt.DmdAnal
         Note [Worker/wrapper arity and join points]
    This Note is a good summary of what this MR does:
    
    (1) The "worker/wrapper arity" of an Id is
        * For non-join-points: idArity
        * The join points: the join arity (Id part only of course)
        This is the number of args we will use in worker/wrapper.
        See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`.
    
    (2) A join point's demand-signature arity may exceed the Id's worker/wrapper
        arity.  See the `arity_ok` assertion in `mkWwBodies`.
    
    (3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond
        the worker/wrapper arity.
    
    (4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper
        arity (re)-computed by workWrapArity.
    9a757a27
  • Jan Hrček's avatar
    Update haddocks of Import/Export AST types · 5e8faaf1
    Jan Hrček authored and Marge Bot's avatar Marge Bot committed
    5e8faaf1
  • Hécate Kleidukos's avatar
    cd512234
  • Rodrigo Mesquita's avatar
    cmm: Don't parse MO_BSwap for W8 · 8a8ff8f2
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    Don't support parsing bswap8, since bswap8 is not really an operation
    and would have to be implemented as a no-op (and currently is not
    implemented at all).
    
    Fixes #25002
    8a8ff8f2
  • sheaf's avatar
    Delete unused testsuite files · 5cc472f5
    sheaf authored and Marge Bot's avatar Marge Bot committed
    These files were committed by mistake in !11902.
    This commit simply removes them.
    5cc472f5
  • Matthew Pickering's avatar
    Remove left over debugging pragma from 2016 · 7b079378
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    This pragma was accidentally introduced in 648fd73a
    
    The top-level cost centres lead to a lack of optimisation when compiling
    with profiling.
    7b079378
  • Hécate Kleidukos's avatar
    haddock: Remove unused pragmata, qualify usages of Data.List functions, add... · c872e09b
    Hécate Kleidukos authored and Marge Bot's avatar Marge Bot committed
    haddock: Remove unused pragmata, qualify usages of Data.List functions, add more sanity checking flags by default
    
    This commit enables some extensions and GHC flags in the cabal file in a way
    that allows us to reduce the amount of prologuing on top of each file.
    
    We also prefix the usage of some List functions that removes ambiguity
    when they are also exported from the Prelude, like foldl'.
    In general, this has the effect of pointing out more explicitly
    that a linked list is used.
    
    Metric Increase:
        haddock.Cabal
        haddock.base
        haddock.compiler
    c872e09b
  • Arnaud Spiwack's avatar
    Add test case for #23586 · 8c87d4e1
    Arnaud Spiwack authored and Marge Bot's avatar Marge Bot committed
    8c87d4e1
  • Arnaud Spiwack's avatar
    When matching functions in rewrite rules: ignore multiplicity · 568de8a5
    Arnaud Spiwack authored and Marge Bot's avatar Marge Bot committed
    When matching a template variable to an expression, we check that it
    has the same type as the matched expression. But if the variable `f` has
    type `A -> B` while the expression `e` has type `A %1 -> B`, the match was
    previously rejected.
    
    A principled solution would have `f` substituted by `\(%Many x) -> e
    x` or some other appropriate coercion. But since linearity is not
    properly checked in Core, we can be cheeky and simply ignore
    multiplicity while matching. Much easier.
    
    This has forced a change in the linter which, when `-dlinear-core-lint`
    is off, must consider that `a -> b` and `a %1 -> b` are equal. This is
    achieved by adding an argument to configure the behaviour of
    `nonDetCmpTypeX` and modify `ensureEqTys` to call to the new behaviour
    which ignores multiplicities when comparing two `FunTy`.
    
    Fixes #24725.
    568de8a5
  • Simon Peyton Jones's avatar
    Faster type equality · c8a8727e
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    This MR speeds up type equality, triggered by perf regressions that
    showed up when fixing #24725 by parameterising type equality over
    whether to ignore multiplicity.
    
    The changes are:
    
    * Do not use `nonDetCmpType` for type /equality/. Instead use a specialised
      type-equality function, which we have always had!
    
      `nonDetCmpType` remains, but I did not invest effort in refactoring
      or optimising it.
    
    * Type equality is parameterised by
        - whether to expand synonyms
        - whether to respect multiplicities
        - whether it has a RnEnv2 environment
      In this MR I systematically specialise it for static values of these
      parameters.  Much more direct and predictable than before.  See
      Note [Specialising type equality]
    
    * We want to avoid comparing kinds if possible.  I refactored how this
      happens, at least for `eqType`.
      See Note [Casts and coercions in type comparison]
    
    * To make Lint fast, we want to avoid allocating a thunk for <msg> in
          ensureEqTypes ty1 ty2 <msg>
      because the test almost always succeeds, and <msg> isn't needed.
      See Note [INLINE ensureEqTys]
    
    Metric Decrease:
        T13386
        T5030
    c8a8727e
  • Ryan Hendrickson's avatar
    base: Add inits1 and tails1 to Data.List · 21fc180b
    Ryan Hendrickson authored and Marge Bot's avatar Marge Bot committed
    21fc180b
  • Sebastian Graf's avatar
    Derive previously hand-written `Lift` instances (#14030) · d640a3b6
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    This is possible now that #22229 is fixed.
    d640a3b6
  • Sebastian Graf's avatar
    Implement the "Derive Lift instances for data types in template-haskell" proposal (#14030) · 33fee6a2
    Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
    After #22229 had been fixed, we can finally derive the `Lift` instance for the
    TH AST, as proposed by Ryan Scott in
    https://mail.haskell.org/pipermail/libraries/2015-September/026117.html.
    
    Fixes #14030, #14296, #21759 and #24560.
    
    The residency of T24471 increases by 13% because we now load `AnnLookup`
    from its interface file, which transitively loads the whole TH AST.
    Unavoidable and not terrible, I think.
    
    Metric Increase:
        T24471
    33fee6a2
  • Matthew Pickering's avatar
    bindist: Use complete relative paths when cding to directories · 383c01a8
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    If a user has configured CDPATH on their system then `cd lib` may change
    into an unexpected directory during the installation process.
    
    If you write `cd ./lib` then it will not consult `CDPATH` to determine
    what you mean.
    
    I have added a check on ghcup-ci to verify that the bindist installation
    works in this situation.
    
    Fixes #24951
    383c01a8
  • Hécate Kleidukos's avatar
    haddock: Use the more precise SDocContext instead of DynFlags · 5759133f
    Hécate Kleidukos authored and Marge Bot's avatar Marge Bot committed
    The pervasive usage of DynFlags (the parsed command-line options passed
    to ghc) blurs the border between different components of Haddock, and
    especially those that focus solely on printing text on the screen.
    
    In order to improve the understanding of the real dependencies of a
    function, the pretty-printer options are made concrete earlier in the
    pipeline instead of late when pretty-printing happens.
    
    This also has the advantage of clarifying which functions actually
    require DynFlags for purposes other than pretty-printing, thus making
    the interactions between Haddock and GHC more understandable when
    exploring the code base.
    
    See Henry, Ericson, Young. "Modularizing GHC".
    https://hsyl20.fr/home/files/papers/2022-ghc-modularity.pdf. 2022
    5759133f
  • Alex McKenna's avatar
    Add INLINE [1] pragma to compareInt / compareWord · 749e089b
    Alex McKenna authored and Marge Bot's avatar Marge Bot committed
    To allow rules to be written on the concrete implementation of
    `compare` for `Int` and `Word`, we need to have an `INLINE [1]`
    pragma on these functions, following the
    `matching_overloaded_methods_in_rules` note in `GHC.Classes`.
    
    CLC proposal https://github.com/haskell/core-libraries-committee/issues/179
    
    Fixes #22643
    749e089b
  • Rodrigo Mesquita's avatar
    ci: Enable strict ghc-toolchain setting for bindists · db033639
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    db033639
  • Rodrigo Mesquita's avatar
    ghc-toolchain: Improve parse failure error · 14308a8f
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    Improves the error message for when `ghc-toolchain` fails to read a
    valid `Target` value from a file (in doFormat mode).
    14308a8f
  • Rodrigo Mesquita's avatar
    bindist: ghc-toolchain related options in configure · 6e7cfff1
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    6e7cfff1
  • Matthew Pickering's avatar
    ci: Fail when bindist configure fails when installing bindist · 958d6931
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    It is better to fail earlier if the configure step fails rather than
    carrying on for a more obscure error message.
    958d6931
  • Rodrigo Mesquita's avatar
    ghc-toolchain: Fix error logging indentation · f48d157d
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    f48d157d
  • Rodrigo Mesquita's avatar
    bindist: Correct default.target substitution · f1397104
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    The substitution on `default.target.in` must be done after
    `PREP_TARGET_FILE` is called -- that macro is responsible for
    setting the variables that will be effectively substituted in the target
    file. Otherwise, the target file is invalid.
    
    Fixes #24792 #24574
    f1397104
  • Rodrigo Mesquita's avatar
    configure: Prefer tool name over tool path · 665e653e
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    It is non-obvious whether the toolchain configuration should use
    full-paths to tools or simply their names. In addressing #24574, we've
    decided to prefer executable names over paths, ultimately, because the
    bindist configure script already does this, thus is the default in ghcs
    out there.
    
    Updates the in-tree configure script to prefer tool names
    (`AC_CHECK_TOOL` rather than `AC_PATH_TOOL`) and `ghc-toolchain` to
    ignore the full-path-result of `findExecutable`, which it previously
    used over the program name.
    
    This change doesn't undo the fix in bd92182c
    because `AC_CHECK_TOOL` still takes into account the target triples,
    unlike `AC_CHECK_PROG/AC_PATH_PROG`.
    665e653e
  • Rodrigo Mesquita's avatar
    dist: Don't forget to configure JavascriptCPP · 463716c2
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    We introduced a configuration step for the javascript preprocessor, but
    only did so for the in-tree configure script.
    
    This commit makes it so that we also configure the javascript
    preprocessor in the configure shipped in the compiler bindist.
    463716c2
  • Rodrigo Mesquita's avatar
    distrib: LlvmTarget in distrib/configure · e99cd73d
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    LlvmTarget was being set and substituted in the in-tree configure, but
    not in the configure shipped in the bindist.
    
    We want to set the LlvmTarget to the canonical LLVM name of the platform
    that GHC is targetting.
    
    Currently, that is going to be the boostrapped llvm target (hence the
    code which sets LlvmTarget=bootstrap_llvm_target).
    e99cd73d
  • Matthew Pickering's avatar
    Update bootstrap plans for recent GHC versions (9.6.5, 9.8.2, 9.10.10) · 4199aafe
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    4199aafe
  • Matthew Pickering's avatar
    ci: Add 9_10 bootstrap testing job · f599d816
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    f599d816
  • Hécate Kleidukos's avatar
    haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource... · 8f4b799d
    Hécate Kleidukos authored and Marge Bot's avatar Marge Bot committed
    haddock: Move the usage of mkParserOpts directly to ppHyperlinkedModuleSource in order to avoid passing a whole DynFlags
    
    Follow up to !12931
    8f4b799d
  • Hécate Kleidukos's avatar
    haddock: Remove cabal file linting rule · 210cf1cd
    Hécate Kleidukos authored and Marge Bot's avatar Marge Bot committed
    This will be reintroduced with a properly ignored commit
    when the cabal files are themselves formatted for good.
    210cf1cd
  • Peter Trommler's avatar
    PPC NCG: Fix sign hints in C calls · 7fe85b13
    Peter Trommler authored and Marge Bot's avatar Marge Bot committed
    Sign hints for parameters are in the second component of the pair.
    
    Fixes #23034
    7fe85b13
  • Bodigrim's avatar
    base: fix missing changelog entries · 949a0e0b
    Bodigrim authored and Marge Bot's avatar Marge Bot committed
    949a0e0b
  • Fabricio de Sousa Nascimento's avatar
    compiler: Fix emitting a confusing error for non visible class method · f0d7cd07
    Fabricio de Sousa Nascimento authored
    Changes the error message when trying to lookup names on GRE that
    `must_have_parent` but we get an `AmbiguousOccurrence`. The new
    behavior now points the user to the missing name, instead of the
    name clash which would be unhelpful in solving their compiling issue.
    
    Fixes #24452
    f0d7cd07
Showing
with 438 additions and 216 deletions
......@@ -101,10 +101,10 @@ workflow:
# which versions of GHC to allow bootstrap with
.bootstrap_matrix : &bootstrap_matrix
matrix:
- GHC_VERSION: 9.6.4
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10-ghc9_6:$DOCKER_REV"
- GHC_VERSION: 9.8.1
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10-ghc9_8:$DOCKER_REV"
- GHC_VERSION: 9.10.1
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10-ghc9_10:$DOCKER_REV"
# Allow linters to fail on draft MRs.
# This must be explicitly transcluded in lint jobs which
......
......@@ -556,7 +556,7 @@ function install_bindist() {
run ${CONFIGURE_WRAPPER:-} ./configure \
--prefix="$instdir" \
"${args[@]+"${args[@]}"}"
"${args[@]+"${args[@]}"}" || fail "bindist configure failed"
make_install_destdir "$TOP"/destdir "$instdir"
# And check the `--info` of the installed compiler, sometimes useful in CI log.
"$instdir"/bin/ghc --info
......
......@@ -752,6 +752,7 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} }
, "BUILD_FLAVOUR" =: flavourString jobFlavour
, "BIGNUM_BACKEND" =: bignumString (bignumBackend buildConfig)
, "CONFIGURE_ARGS" =: configureArgsStr buildConfig
, "INSTALL_CONFIGURE_ARGS" =: "--enable-strict-ghc-toolchain-check"
, maybe mempty ("CONFIGURE_WRAPPER" =:) (configureWrapper buildConfig)
, maybe mempty ("CROSS_TARGET" =:) (crossTarget buildConfig)
, case crossEmulator buildConfig of
......
......@@ -58,6 +58,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
......@@ -122,6 +123,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-validate"
}
......@@ -183,6 +185,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb12-validate+llvm"
}
......@@ -244,6 +247,7 @@
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-validate"
}
......@@ -306,6 +310,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
......@@ -372,7 +377,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
......@@ -435,6 +440,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-validate",
"XZ_OPT": "-9"
......@@ -497,6 +503,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb11-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb11-validate",
"XZ_OPT": "-9"
......@@ -559,6 +566,7 @@
"BIN_DIST_NAME": "ghc-aarch64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb12-validate+llvm",
"XZ_OPT": "-9"
......@@ -621,6 +629,7 @@
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-validate",
"XZ_OPT": "-9"
......@@ -684,6 +693,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
......@@ -753,7 +763,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-validate+fully_static",
"XZ_OPT": "-9"
......@@ -817,7 +827,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate",
"XZ_OPT": "-9"
......@@ -881,7 +891,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static",
"XZ_OPT": "-9"
......@@ -945,7 +955,7 @@
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
......@@ -1202,6 +1212,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-centos7-validate",
"XZ_OPT": "-9"
......@@ -1264,6 +1275,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-int_native-validate",
"XZ_OPT": "-9"
......@@ -1326,6 +1338,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-no_tntc-validate",
"XZ_OPT": "-9"
......@@ -1389,6 +1402,7 @@
"BUILD_FLAVOUR": "slow-validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"ENABLE_NUMA": "1",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-numa-slow-validate",
"XZ_OPT": "-9"
......@@ -1451,6 +1465,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-unreg-validate",
"XZ_OPT": "-9"
......@@ -1513,6 +1528,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate",
"XZ_OPT": "-9"
......@@ -1575,6 +1591,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate+debug_info",
"XZ_OPT": "-9"
......@@ -1637,6 +1654,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-zstd-validate",
"XZ_OPT": "-9"
......@@ -1701,6 +1719,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
"CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate",
"XZ_OPT": "-9"
......@@ -1766,6 +1785,7 @@
"CONFIGURE_WRAPPER": "emconfigure",
"CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
"XZ_OPT": "-9"
......@@ -1828,6 +1848,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-validate",
"XZ_OPT": "-9"
......@@ -1890,6 +1911,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
"BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
"TEST_ENV": "x86_64-linux-deb11-validate+boot_nonmoving_gc",
"XZ_OPT": "-9"
......@@ -1952,6 +1974,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate",
"XZ_OPT": "-9"
......@@ -2014,6 +2037,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+llvm",
"XZ_OPT": "-9"
......@@ -2077,6 +2101,7 @@
"BUILD_FLAVOUR": "validate+thread_sanitizer_cmm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=none",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+thread_sanitizer_cmm",
"TSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions",
......@@ -2140,6 +2165,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb9-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb9-validate",
"XZ_OPT": "-9"
......@@ -2202,6 +2228,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -2267,6 +2294,7 @@
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--haddock-for-hackage",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -2331,6 +2359,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -2395,6 +2424,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-fedora38-validate",
"XZ_OPT": "-9"
......@@ -2457,6 +2487,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-rocky8-validate",
"XZ_OPT": "-9"
......@@ -2519,6 +2550,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu18_04-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu18_04-validate",
"XZ_OPT": "-9"
......@@ -2581,6 +2613,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-ubuntu20_04-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu20_04-validate",
"XZ_OPT": "-9"
......@@ -2641,6 +2674,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
......@@ -2703,6 +2737,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
......@@ -2769,6 +2804,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
......@@ -2837,7 +2873,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-alpine3_18-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -2902,6 +2938,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb10-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -2966,6 +3003,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "aarch64-linux-deb11-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3030,6 +3068,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "i386-linux-deb10-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3094,6 +3133,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
......@@ -3165,7 +3205,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-release+fully_static",
"XZ_OPT": "-9"
......@@ -3231,7 +3271,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
"XZ_OPT": "-9"
......@@ -3297,7 +3337,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3363,7 +3403,7 @@
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_18-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3429,6 +3469,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-centos7-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3493,6 +3534,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-release",
"XZ_OPT": "-9"
......@@ -3557,6 +3599,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-release+debug_info",
"XZ_OPT": "-9"
......@@ -3621,6 +3664,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-release",
"XZ_OPT": "-9"
......@@ -3685,6 +3729,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-release",
"XZ_OPT": "-9"
......@@ -3749,6 +3794,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb9-release+no_split_sections",
"XZ_OPT": "-9"
......@@ -3813,6 +3859,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -3879,6 +3926,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -3945,6 +3993,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--haddock-for-hackage --hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -4011,6 +4060,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-fedora38-release",
"XZ_OPT": "-9"
......@@ -4075,6 +4125,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-rocky8-release",
"XZ_OPT": "-9"
......@@ -4139,6 +4190,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu18_04-release",
"XZ_OPT": "-9"
......@@ -4203,6 +4255,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-ubuntu20_04-release",
"XZ_OPT": "-9"
......@@ -4264,6 +4317,7 @@
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
......@@ -4327,6 +4381,7 @@
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
......@@ -4392,6 +4447,7 @@
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
......@@ -4460,7 +4516,7 @@
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static"
}
......@@ -4713,6 +4769,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-int_native-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-int_native-validate"
}
......@@ -4775,6 +4832,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-no_tntc-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-tables-next-to-code --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-no_tntc-validate"
}
......@@ -4837,6 +4895,7 @@
"BUILD_FLAVOUR": "slow-validate",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"ENABLE_NUMA": "1",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-numa-slow-validate"
}
......@@ -4898,6 +4957,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-unreg-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-unregisterised --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-unreg-validate"
}
......@@ -4959,6 +5019,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-validate+debug_info",
"BUILD_FLAVOUR": "validate+debug_info",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-validate+debug_info"
}
......@@ -5020,6 +5081,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb10-zstd-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--enable-ipe-data-compression --enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb10-zstd-validate"
}
......@@ -5083,6 +5145,7 @@
"CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
"CROSS_EMULATOR": "qemu-aarch64 -L /usr/aarch64-linux-gnu",
"CROSS_TARGET": "aarch64-linux-gnu",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
}
......@@ -5147,6 +5210,7 @@
"CONFIGURE_WRAPPER": "emconfigure",
"CROSS_EMULATOR": "js-emulator",
"CROSS_TARGET": "javascript-unknown-ghcjs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate"
}
......@@ -5208,6 +5272,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-validate+boot_nonmoving_gc",
"BUILD_FLAVOUR": "validate+boot_nonmoving_gc",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
"TEST_ENV": "x86_64-linux-deb11-validate+boot_nonmoving_gc"
}
......@@ -5269,6 +5334,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate+llvm",
"BUILD_FLAVOUR": "validate+llvm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+llvm"
}
......@@ -5332,6 +5398,7 @@
"BUILD_FLAVOUR": "validate+thread_sanitizer_cmm",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=none",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate+thread_sanitizer_cmm",
"TSAN_OPTIONS": "suppressions=$CI_PROJECT_DIR/rts/.tsan-suppressions"
......@@ -5394,6 +5461,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LLC": "/bin/false",
"OPT": "/bin/false",
"RUNTEST_ARGS": "",
......@@ -5455,6 +5523,7 @@
"CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"GHC_VERSION": "9.6.4",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"RUNTEST_ARGS": "",
......
......@@ -217,7 +217,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
a64 = { "Linux_Debian": { "< 10": deb9
, "( >= 10 && < 11 )": deb10
, "( >= 11 && < 12 )": deb11
, ">= 11": deb12
, ">= 12": deb12
, "unknown_versioning": deb11 }
, "Linux_Ubuntu" : { "unknown_versioning": ubuntu2004
, "( >= 16 && < 18 )": deb9
......
......@@ -98,7 +98,35 @@ module GHC (
lookupGlobalName,
findGlobalAnns,
mkNamePprCtxForModule,
ModIface, ModIface_(..),
ModIface,
ModIface_(
mi_module,
mi_sig_of,
mi_hsc_src,
mi_src_hash,
mi_hi_bytes,
mi_deps,
mi_usages,
mi_exports,
mi_used_th,
mi_fixities,
mi_warns,
mi_anns,
mi_insts,
mi_fam_insts,
mi_rules,
mi_decls,
mi_extra_decls,
mi_top_env,
mi_hpc,
mi_trust,
mi_trust_pkg,
mi_complete_matches,
mi_docs,
mi_final_exts,
mi_ext_fields
),
pattern ModIface,
SafeHaskellMode(..),
-- * Printing
......
......@@ -49,7 +49,6 @@ import GHC.Types.Basic
import GHC.Types.Fixity ( Fixity(..), FixityDirection(..) )
import GHC.Types.SrcLoc ( wiredInSrcSpan )
import GHC.Types.ForeignCall ( CLabelString )
import GHC.Types.SourceText ( SourceText(..) )
import GHC.Types.Unique ( Unique )
import GHC.Unit.Types ( Unit )
......
......@@ -445,7 +445,15 @@ It has these properties:
* When instantiated at a lifted type it is inhabited by at least one value,
namely bottom
* You can safely coerce any /lifted/ type to Any, and back with unsafeCoerce.
* You can safely coerce any /lifted/ type to Any and back with unsafeCoerce.
You can safely coerce any /unlifted/ type to Any and back with unsafeCoerceUnlifted.
You can coerce /any/ type to Any and back with unsafeCoerce#, but it's only safe when
the kinds of both the type and Any match.
For lifted/unlifted types unsafeCoerce[Unlifted] should be preferred over unsafeCoerce#
as they prevent accidentally coercing between types with kinds that don't match.
See examples in ghc-prim:GHC.Types
* It does not claim to be a *data* type, and that's important for
the code generator, because the code gen may *enter* a data value
......
......@@ -1146,7 +1146,11 @@ callishMachOps platform = listToUFM $
( "prefetch0", (MO_Prefetch_Data 0,)),
( "prefetch1", (MO_Prefetch_Data 1,)),
( "prefetch2", (MO_Prefetch_Data 2,)),
( "prefetch3", (MO_Prefetch_Data 3,))
( "prefetch3", (MO_Prefetch_Data 3,)),
( "bswap16", (MO_BSwap W16,) ),
( "bswap32", (MO_BSwap W32,) ),
( "bswap64", (MO_BSwap W64,) )
] ++ concat
[ allWidths "popcnt" MO_PopCnt
, allWidths "pdep" MO_Pdep
......
......@@ -1596,7 +1596,7 @@ genCCall target dest_regs arg_regs bid = do
then 8 * (stackSpace' `div` 8 + 1)
else stackSpace'
(returnRegs, readResultsCode) <- readResults allGpArgRegs allFpArgRegs dest_regs [] nilOL
readResultsCode <- readResults allGpArgRegs allFpArgRegs dest_regs [] nilOL
let moveStackDown 0 = toOL [ PUSH_STACK_FRAME
, DELTA (-16) ]
......@@ -1614,7 +1614,7 @@ genCCall target dest_regs arg_regs bid = do
let code = call_target_code -- compute the label (possibly into a register)
`appOL` moveStackDown (stackSpace `div` 8)
`appOL` passArgumentsCode -- put the arguments into x0, ...
`appOL` (unitOL $ BL call_target passRegs returnRegs) -- branch and link.
`appOL` (unitOL $ BL call_target passRegs) -- branch and link.
`appOL` readResultsCode -- parse the results into registers
`appOL` moveStackUp (stackSpace `div` 8)
return (code, Nothing)
......@@ -2203,8 +2203,8 @@ genCCall target dest_regs arg_regs bid = do
passArguments _ _ _ _ _ _ _ = pprPanic "passArguments" (text "invalid state")
readResults :: [Reg] -> [Reg] -> [LocalReg] -> [Reg]-> InstrBlock -> NatM ([Reg], InstrBlock)
readResults _ _ [] accumRegs accumCode = return (accumRegs, accumCode)
readResults :: [Reg] -> [Reg] -> [LocalReg] -> [Reg]-> InstrBlock -> NatM (InstrBlock)
readResults _ _ [] _ accumCode = return accumCode
readResults [] _ _ _ _ = do
platform <- getPlatform
pprPanic "genCCall, out of gp registers when reading results" (pdoc platform target)
......
......@@ -117,7 +117,7 @@ regUsageOfInstr platform instr = case instr of
J t -> usage (regTarget t, [])
B t -> usage (regTarget t, [])
BCOND _ t -> usage (regTarget t, [])
BL t ps _rs -> usage (regTarget t ++ ps, callerSavedRegisters)
BL t ps -> usage (regTarget t ++ ps, callerSavedRegisters)
-- 5. Atomic Instructions ----------------------------------------------------
-- 6. Conditional Instructions -----------------------------------------------
......@@ -171,7 +171,6 @@ regUsageOfInstr platform instr = case instr of
-- Is this register interesting for the register allocator?
interesting :: Platform -> Reg -> Bool
interesting _ (RegVirtual _) = True
interesting _ (RegReal (RealRegSingle (-1))) = False
interesting platform (RegReal (RealRegSingle i)) = freeReg platform i
-- Save caller save registers
......@@ -255,7 +254,7 @@ patchRegsOfInstr instr env = case instr of
-- 4. Branch Instructions --------------------------------------------------
J t -> J (patchTarget t)
B t -> B (patchTarget t)
BL t rs ts -> BL (patchTarget t) rs ts
BL t rs -> BL (patchTarget t) rs
BCOND c t -> BCOND c (patchTarget t)
-- 5. Atomic Instructions --------------------------------------------------
......@@ -321,7 +320,7 @@ jumpDestsOfInstr (CBZ _ t) = [ id | TBlock id <- [t]]
jumpDestsOfInstr (CBNZ _ t) = [ id | TBlock id <- [t]]
jumpDestsOfInstr (J t) = [id | TBlock id <- [t]]
jumpDestsOfInstr (B t) = [id | TBlock id <- [t]]
jumpDestsOfInstr (BL t _ _) = [ id | TBlock id <- [t]]
jumpDestsOfInstr (BL t _) = [ id | TBlock id <- [t]]
jumpDestsOfInstr (BCOND _ t) = [ id | TBlock id <- [t]]
jumpDestsOfInstr _ = []
......@@ -342,7 +341,7 @@ patchJumpInstr instr patchF
CBNZ r (TBlock bid) -> CBNZ r (TBlock (patchF bid))
J (TBlock bid) -> J (TBlock (patchF bid))
B (TBlock bid) -> B (TBlock (patchF bid))
BL (TBlock bid) ps rs -> BL (TBlock (patchF bid)) ps rs
BL (TBlock bid) ps -> BL (TBlock (patchF bid)) ps
BCOND c (TBlock bid) -> BCOND c (TBlock (patchF bid))
_ -> panic $ "patchJumpInstr: " ++ instrCon instr
......@@ -627,7 +626,7 @@ data Instr
-- Branching.
| J Target -- like B, but only generated from genJump. Used to distinguish genJumps from others.
| B Target -- unconditional branching b/br. (To a blockid, label or register)
| BL Target [Reg] [Reg] -- branch and link (e.g. set x30 to next pc, and branch)
| BL Target [Reg] -- branch and link (e.g. set x30 to next pc, and branch)
| BCOND Cond Target -- branch with condition. b.<cond>
-- 8. Synchronization Instructions -----------------------------------------
......@@ -758,15 +757,10 @@ data Operand
opReg :: Width -> Reg -> Operand
opReg = OpReg
xzr, wzr, sp, ip0 :: Operand
xzr = OpReg W64 (RegReal (RealRegSingle (-1)))
wzr = OpReg W32 (RegReal (RealRegSingle (-1)))
sp, ip0 :: Operand
sp = OpReg W64 (RegReal (RealRegSingle 31))
ip0 = OpReg W64 (RegReal (RealRegSingle 16))
reg_zero :: Reg
reg_zero = RegReal (RealRegSingle (-1))
_x :: Int -> Operand
_x i = OpReg W64 (RegReal (RealRegSingle i))
x0, x1, x2, x3, x4, x5, x6, x7 :: Operand
......
......@@ -426,9 +426,9 @@ pprInstr platform instr = case instr of
B (TLabel lbl) -> line $ text "\tb" <+> pprAsmLabel platform lbl
B (TReg r) -> line $ text "\tbr" <+> pprReg W64 r
BL (TBlock bid) _ _ -> line $ text "\tbl" <+> pprAsmLabel platform (mkLocalBlockLabel (getUnique bid))
BL (TLabel lbl) _ _ -> line $ text "\tbl" <+> pprAsmLabel platform lbl
BL (TReg r) _ _ -> line $ text "\tblr" <+> pprReg W64 r
BL (TBlock bid) _ -> line $ text "\tbl" <+> pprAsmLabel platform (mkLocalBlockLabel (getUnique bid))
BL (TLabel lbl) _ -> line $ text "\tbl" <+> pprAsmLabel platform lbl
BL (TReg r) _ -> line $ text "\tblr" <+> pprReg W64 r
BCOND c (TBlock bid) -> line $ text "\t" <> pprBcond c <+> pprAsmLabel platform (mkLocalBlockLabel (getUnique bid))
BCOND c (TLabel lbl) -> line $ text "\t" <> pprBcond c <+> pprAsmLabel platform lbl
......
......@@ -1770,7 +1770,7 @@ genCCall' config gcp target dest_regs args
_ -> panic "genCall': unknown calling conv."
argReps = map (cmmExprType platform) args
(argHints, _) = foreignTargetHints target
(_, argHints) = foreignTargetHints target
roundTo a x | x `mod` a == 0 = x
| otherwise = x + a - (x `mod` a)
......
......@@ -587,7 +587,7 @@ pprInstr platform instr = case instr of
JMP lbl _
-- We never jump to ForeignLabels; if we ever do, c.f. handling for "BL"
| isForeignLabel lbl -> panic "PPC.Ppr.pprInstr: JMP to ForeignLabel"
| isForeignLabel lbl -> pprPanic "PPC.Ppr.pprInstr: JMP to ForeignLabel" (pprDebugCLabel platform lbl)
| otherwise ->
line $ hcat [ -- an alias for b that takes a CLabel
text "\tb\t",
......
......@@ -1045,22 +1045,16 @@ lower_CmmExpr_Typed lbl ty expr = do
lower_CmmExpr_Ptr :: CLabel -> CmmExpr -> WasmCodeGenM w (WasmExpr w w, Int)
lower_CmmExpr_Ptr lbl ptr = do
ty_word <- wasmWordTypeM
case ptr of
CmmLit (CmmLabelOff lbl o)
| o >= 0 -> do
instrs <-
lower_CmmExpr_Typed
lbl
ty_word
(CmmLit $ CmmLabel lbl)
pure (instrs, o)
CmmMachOp (MO_Add _) [base, CmmLit (CmmInt o _)]
| o >= 0 -> do
instrs <- lower_CmmExpr_Typed lbl ty_word base
pure (instrs, fromInteger o)
_ -> do
instrs <- lower_CmmExpr_Typed lbl ty_word ptr
pure (instrs, 0)
let (ptr', o) = case ptr of
CmmLit (CmmLabelOff lbl o)
| o >= 0 -> (CmmLit $ CmmLabel lbl, o)
CmmRegOff reg o
| o >= 0 -> (CmmReg reg, o)
CmmMachOp (MO_Add _) [base, CmmLit (CmmInt o _)]
| o >= 0 -> (base, fromInteger o)
_ -> (ptr, 0)
instrs <- lower_CmmExpr_Typed lbl ty_word ptr'
pure (instrs, o)
-- | Push a series of values onto the wasm value stack, returning the
-- result stack type.
......
......@@ -849,7 +849,7 @@ type DataConEnv a = UniqFM DataCon a -- Keyed by DataCon
-- emit a warning (in checkValidDataCon) and treat it like
-- @(HsSrcBang _ NoSrcUnpack SrcLazy)@
data HsSrcBang =
HsSrcBang SourceText -- Note [Pragma source text] in "GHC.Types.SourceText"
HsSrcBang SourceText -- See Note [Pragma source text] in "GHC.Types.SourceText"
SrcUnpackedness
SrcStrictness
deriving Data.Data
......
......@@ -53,7 +53,7 @@ import GHC.Core.Predicate( isCoVarType )
import GHC.Core.Multiplicity
import GHC.Core.UsageEnv
import GHC.Core.TyCo.Rep -- checks validity of types/coercions
import GHC.Core.TyCo.Compare ( eqType, eqForAllVis )
import GHC.Core.TyCo.Compare ( eqType, eqTypes, eqTypeIgnoringMultiplicity, eqForAllVis )
import GHC.Core.TyCo.Subst
import GHC.Core.TyCo.FVs
import GHC.Core.TyCo.Ppr
......@@ -635,11 +635,16 @@ lintLetBind top_lvl rec_flag binder rhs rhs_ty
-- in GHC.Core.Opt.DmdAnal
; case splitDmdSig (idDmdSig binder) of
(demands, result_info) | isDeadEndDiv result_info ->
checkL (demands `lengthAtLeast` idArity binder)
(text "idArity" <+> ppr (idArity binder) <+>
text "exceeds arity imposed by the strictness signature" <+>
ppr (idDmdSig binder) <> colon <+>
ppr binder)
if (demands `lengthAtLeast` idArity binder)
then return ()
else pprTrace "Hack alert: lintLetBind #24623"
(ppr (idArity binder) $$ ppr (idDmdSig binder)) $
return ()
-- checkL (demands `lengthAtLeast` idArity binder)
-- (text "idArity" <+> ppr (idArity binder) <+>
-- text "exceeds arity imposed by the strictness signature" <+>
-- ppr (idDmdSig binder) <> colon <+>
-- ppr binder)
_ -> return ()
......@@ -2802,7 +2807,7 @@ lint_axiom ax@(CoAxiom { co_ax_tc = tc, co_ax_branches = branches
extra_checks
| isNewTyCon tc
= do { CoAxBranch { cab_tvs = tvs
= do { CoAxBranch { cab_tvs = ax_tvs
, cab_eta_tvs = eta_tvs
, cab_cvs = cvs
, cab_roles = roles
......@@ -2810,14 +2815,10 @@ lint_axiom ax@(CoAxiom { co_ax_tc = tc, co_ax_branches = branches
<- case branch_list of
[branch] -> return branch
_ -> failWithL (text "multi-branch axiom with newtype")
; let ax_lhs = mkInfForAllTys tvs $
mkTyConApp tc lhs_tys
nt_tvs = takeList tvs (tyConTyVars tc)
-- axiom may be eta-reduced: Note [Newtype eta] in GHC.Core.TyCon
nt_lhs = mkInfForAllTys nt_tvs $
mkTyConApp tc (mkTyVarTys nt_tvs)
-- See Note [Newtype eta] in GHC.Core.TyCon
; lintL (ax_lhs `eqType` nt_lhs)
-- The LHS of the axiom is (N lhs_tys)
-- We expect it to be (N ax_tvs)
; lintL (mkTyVarTys ax_tvs `eqTypes` lhs_tys)
(text "Newtype axiom LHS does not match newtype definition")
; lintL (null cvs)
(text "Newtype axiom binds coercion variables")
......@@ -2826,7 +2827,7 @@ lint_axiom ax@(CoAxiom { co_ax_tc = tc, co_ax_branches = branches
(text "Newtype axiom has eta-tvs")
; lintL (ax_role == Representational)
(text "Newtype axiom role not representational")
; lintL (roles `equalLength` tvs)
; lintL (roles `equalLength` ax_tvs)
(text "Newtype axiom roles list is the wrong length." $$
text "roles:" <+> sep (map ppr roles))
; lintL (roles == takeList roles (tyConRoles tc))
......@@ -3093,84 +3094,93 @@ we behave as follows (#15057, #T15664):
Note [Linting linearity]
~~~~~~~~~~~~~~~~~~~~~~~~
Core understands linear types: linearity is checked with the flag
`-dlinear-core-lint`. Why not make `-dcore-lint` check linearity? Because
optimisation passes are not (yet) guaranteed to maintain linearity. They should
do so semantically (GHC is careful not to duplicate computation) but it is much
harder to ensure that the statically-checkable constraints of Linear Core are
maintained. The current Linear Core is described in the wiki at:
Lint ignores linearity unless `-dlinear-core-lint` is set. For why, see below.
But first, "ignore linearity" specifically means two things. When ignoring linearity:
* In `ensureEqTypes`, use `eqTypeIgnoringMultiplicity`
* In `ensureSubMult`, do nothing
But why make `-dcore-lint` ignore linearity? Because optimisation passes are
not (yet) guaranteed to maintain linearity. They should do so semantically (GHC
is careful not to duplicate computation) but it is much harder to ensure that
the statically-checkable constraints of Linear Core are maintained. The current
Linear Core is described in the wiki at:
https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/implementation.
Why don't the optimisation passes maintain the static types of Linear Core?
Because doing so would cripple some important optimisations. Here is an
example:
Here are some examples of how the optimiser can break linearity checking. Other
examples are documented in the linear-type implementation wiki page
[https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/implementation#core-to-core-passes]
data T = MkT {-# UNPACK #-} !Int
* EXAMPLE 1: the binder swap transformation
Consider
The wrapper for MkT is
data T = MkT {-# UNPACK #-} !Int
$wMkT :: Int %1 -> T
$wMkT n = case %1 n of
I# n' -> MkT n'
The wrapper for MkT is
This introduces, in particular, a `case %1` (this is not actual Haskell or Core
syntax), where the `%1` means that the `case` expression consumes its scrutinee
linearly.
$wMkT :: Int %1 -> T
$wMkT n = case %1 n of
I# n' -> MkT n'
Now, `case %1` interacts with the binder swap optimisation in a non-trivial
way. Take a slightly modified version of the code for $wMkT:
This introduces, in particular, a `case %1` (this is not actual Haskell or
Core syntax), where the `%1` means that the `case` expression consumes its
scrutinee linearly.
case %1 x of z {
I# n' -> (x, n')
}
Now, `case %1` interacts with the binder swap optimisation in a non-trivial
way. Take a slightly modified version of the code for $wMkT:
Binder-swap wants to change this to
case %1 x of z {
I# n' -> (x, n')
}
case %1 x of z {
I# n' -> let x = z in (x, n')
}
Binder-swap changes this to
Now, this is not something that a linear type checker usually considers
well-typed. It is not something that `-dlinear-core-lint` considers to be
well-typed either. But it's only because `-dlinear-core-lint` is not good
enough. However, making `-dlinear-core-lint` recognise this expression as valid
is not obvious. There are many such interactions between a linear type system
and GHC optimisations documented in the linear-type implementation wiki page
[https://gitlab.haskell.org/ghc/ghc/-/wikis/linear-types/implementation#core-to-core-passes].
case %1 x of z {
I# n' -> let x = z in (x, n')
}
PRINCIPLE: The type system bends to the optimisation, not the other way around.
This is rejected by `-dlinear-core-lint` because 1/ n' must be used linearly
2/ `-dlinear-core-lint` recognises a use of `z` as a use of `n'`. So it sees
two uses of n' where there should be a single one.
* EXAMPLE 2: letrec
Some optimisations can create a letrec which uses a variable
linearly, e.g.
letrec f True = f False
f False = x
in f True
uses 'x' linearly, but this is not seen by the linter, which considers,
conservatively, that a letrec always has multiplicity Many (in particular
that every captured free variable must have multiplicity Many). This issue
is discussed in ticket #18694.
In the original linear-types implementation, we had tried to make every
optimisation pass produce code that passes `-dlinear-core-lint`. It had proved
very difficult. And we kept finding corner case after corner case. Plus, we
used to restrict transformations when `-dlinear-core-lint` couldn't typecheck
the result. There are still occurrences of such restrictions in the code. But
our current stance is that such restrictions can be removed.
* EXAMPLE 3: rewrite rules
Ignoring linearity means in particular that `a -> b` and `a %1 -> b` must be
treated the same by rewrite rules (see also Note [Rewrite rules ignore
multiplicities in FunTy] in GHC.Core.Unify). Consider
For instance, some optimisations can create a letrec which uses a variable
linearly, e.g.
m :: Bool -> A
m' :: (Bool -> Bool) -> A
{- RULES "ex" forall f. m (f True) = m' f -}
letrec f True = f False
f False = x
in f True
f :: Bool %1 -> A
x = m (f True)
uses 'x' linearly, but this is not seen by the linter. This issue is discussed
in ticket #18694.
The rule "ex" must match . So the linter must accept `m' f`.
Plus in many cases, in order to make a transformation compatible with linear
linting, we ended up restricting to avoid producing patterns that were not
recognised as linear by the linter. This violates the above principle.
Historical note: In the original linear-types implementation, we had tried to
make every optimisation pass produce code that passes `-dlinear-core-lint`. It
had proved very difficult. We kept finding corner case after corner
case. Furthermore, to attempt to achieve that goal we ended up restricting
transformations when `-dlinear-core-lint` couldn't typecheck the result.
In the future, we may be able to lint the linearity of the output of
Core-to-Core passes (#19165). But right now, we can't. Therefore, in virtue of
the principle above, after the desguarer, the optimiser should take no special
pains to preserve linearity (in the type system sense).
Core-to-Core passes (#19165). But this shouldn't be done at the expense of
producing efficient code. Therefore we lay the following principle.
In general the optimiser tries hard not to lose sharing, so it probably doesn't
actually make linear things non-linear. We postulate that any program
transformation which breaks linearity would negatively impact performance, and
therefore wouldn't be suitable for an optimiser. An alternative to linting
linearity after each pass is to prove this statement.
PRINCIPLE: The type system bends to the optimisation, not the other way around.
There is a useful discussion at https://gitlab.haskell.org/ghc/ghc/-/issues/22123
......@@ -3478,7 +3488,25 @@ ensureEqTys :: LintedType -> LintedType -> SDoc -> LintM ()
-- check ty2 is subtype of ty1 (ie, has same structure but usage
-- annotations need only be consistent, not equal)
-- Assumes ty1,ty2 are have already had the substitution applied
ensureEqTys ty1 ty2 msg = lintL (ty1 `eqType` ty2) msg
{-# INLINE ensureEqTys #-} -- See Note [INLINE ensureEqTys]
ensureEqTys ty1 ty2 msg
= do { flags <- getLintFlags
; lintL (eq_type flags ty1 ty2) msg }
eq_type :: LintFlags -> Type -> Type -> Bool
-- When `-dlinear-core-lint` is off, then consider `a -> b` and `a %1 -> b` to
-- be equal. See Note [Linting linearity].
eq_type flags ty1 ty2 | lf_check_linearity flags = eqType ty1 ty2
| otherwise = eqTypeIgnoringMultiplicity ty1 ty2
{- Note [INLINE ensureEqTys]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To make Lint fast, we want to avoid allocating a thunk for <msg> in
ensureEqTypes ty1 ty2 <msg>
because the test almost always succeeds, and <msg> isn't needed.
So we INLINE `ensureEqTys`. This actually make a difference of
1-2% when compiling programs with -dcore-lint.
-}
ensureSubUsage :: Usage -> Mult -> SDoc -> LintM ()
ensureSubUsage Bottom _ _ = return ()
......
......@@ -30,7 +30,9 @@ module GHC.Core.Multiplicity
, IsSubmult(..)
, submult
, mapScaledType
, pprArrowWithMultiplicity ) where
, pprArrowWithMultiplicity
, MultiplicityFlag(..)
) where
import GHC.Prelude
......@@ -395,3 +397,8 @@ pprArrowWithMultiplicity af pp_mult
| otherwise
= ppr (funTyFlagTyCon af)
-- | In Core, without `-dlinear-core-lint`, some function must ignore
-- multiplicities. See Note [Linting linearity] in GHC.Core.Lint.
data MultiplicityFlag
= RespectMultiplicities
| IgnoreMultiplicities
......@@ -1008,7 +1008,7 @@ dmdTransform :: AnalEnv -- ^ The analysis environment
-> DmdType -- ^ The demand type unleashed by the variable in this
-- context. The returned DmdEnv includes the demand on
-- this function plus demand on its free variables
-- See Note [What are demand signatures?] in "GHC.Types.Demand"
-- See Note [DmdSig: demand signatures, and demand-sig arity] in "GHC.Types.Demand"
dmdTransform env var sd
-- Data constructors
| Just con <- isDataConWorkId_maybe var
......@@ -1081,31 +1081,33 @@ dmdAnalRhsSig
-- Process the RHS of the binding, add the strictness signature
-- to the Id, and augment the environment with the signature as well.
-- See Note [NOINLINE and strictness]
dmdAnalRhsSig top_lvl rec_flag env let_dmd id rhs
dmdAnalRhsSig top_lvl rec_flag env let_sd id rhs
= -- pprTrace "dmdAnalRhsSig" (ppr id $$ ppr let_dmd $$ ppr rhs_dmds $$ ppr sig $$ ppr weak_fvs) $
(final_env, weak_fvs, final_id, final_rhs)
where
threshold_arity = thresholdArity id rhs
ww_arity = workWrapArity id rhs
-- See Note [Worker/wrapper arity and join points] point (1)
rhs_dmd = mkCalledOnceDmds threshold_arity body_dmd
body_dmd
| isJoinId id
body_sd | isJoinId id = let_sd
| otherwise = topSubDmd
-- See Note [Demand analysis for join points]
-- See Note [Invariants on join points] invariant 2b, in GHC.Core
-- threshold_arity matches the join arity of the join point
-- See Note [Unboxed demand on function bodies returning small products]
= unboxedWhenSmall env rec_flag (resultType_maybe id) let_dmd
| otherwise
-- ww_arity matches the join arity of the join point
adjusted_body_sd = unboxedWhenSmall env rec_flag (resultType_maybe id) body_sd
-- See Note [Unboxed demand on function bodies returning small products]
= unboxedWhenSmall env rec_flag (resultType_maybe id) topSubDmd
WithDmdType rhs_dmd_ty rhs' = dmdAnal env rhs_dmd rhs
rhs_sd = mkCalledOnceDmds ww_arity adjusted_body_sd
WithDmdType rhs_dmd_ty rhs' = dmdAnal env rhs_sd rhs
DmdType rhs_env rhs_dmds = rhs_dmd_ty
(final_rhs_dmds, final_rhs) = finaliseArgBoxities env id threshold_arity
(final_rhs_dmds, final_rhs) = finaliseArgBoxities env id ww_arity
rhs_dmds (de_div rhs_env) rhs'
sig = mkDmdSigForArity threshold_arity (DmdType sig_env final_rhs_dmds)
dmd_sig_arity = ww_arity + strictCallArity body_sd
sig = mkDmdSigForArity dmd_sig_arity (DmdType sig_env final_rhs_dmds)
-- strictCallArity is > 0 only for join points
-- See Note [mkDmdSigForArity]
opts = ae_opts env
final_id = setIdDmdAndBoxSig opts id sig
......@@ -1137,13 +1139,6 @@ splitWeakDmds :: DmdEnv -> (DmdEnv, WeakDmds)
splitWeakDmds (DE fvs div) = (DE sig_fvs div, weak_fvs)
where (!weak_fvs, !sig_fvs) = partitionVarEnv isWeakDmd fvs
thresholdArity :: Id -> CoreExpr -> Arity
-- See Note [Demand signatures are computed for a threshold arity based on idArity]
thresholdArity fn rhs
= case idJoinPointHood fn of
JoinPoint join_arity -> count isId $ fst $ collectNBinders join_arity rhs
NotJoinPoint -> idArity fn
-- | The result type after applying 'idArity' many arguments. Returns 'Nothing'
-- when the type doesn't have exactly 'idArity' many arrows.
resultType_maybe :: Id -> Maybe Type
......@@ -1243,47 +1238,97 @@ Consider
B -> j 4
C -> (p,7))
If j was a vanilla function definition, we'd analyse its body with
evalDmd, and think that it was lazy in p. But for join points we can
do better! We know that j's body will (if called at all) be evaluated
with the demand that consumes the entire join-binding, in this case
the argument demand from g. Whizzo! g evaluates both components of
its argument pair, so p will certainly be evaluated if j is called.
If j was a vanilla function definition, we'd analyse its body with evalDmd, and
think that it was lazy in p. But for join points we can do better! We know
that j's body will (if called at all) be evaluated with the demand that consumes
the entire join-binding, in this case the argument demand from g. Whizzo! g
evaluates both components of its argument pair, so p will certainly be evaluated
if j is called.
For f to be strict in p, we need /all/ paths to evaluate p; in this
case the C branch does so too, so we are fine. So, as usual, we need
to transport demands on free variables to the call site(s). Compare
Note [Lazy and unleashable free variables].
For f to be strict in p, we need /all/ paths to evaluate p; in this case the C
branch does so too, so we are fine. So, as usual, we need to transport demands
on free variables to the call site(s). Compare Note [Lazy and unleashable free
variables].
The implementation is easy. When analysing a join point, we can
analyse its body with the demand from the entire join-binding (written
let_dmd here).
The implementation is easy: see `body_sd` in`dmdAnalRhsSig`. When analysing
a join point, we can analyse its body (after stripping off the join binders,
here just 'y') with the demand from the entire join-binding (written `let_sd`
here).
Another win for join points! #13543.
However, note that the strictness signature for a join point can
look a little puzzling. E.g.
BUT see Note [Worker/wrapper arity and join points].
Note we may analyse the rhs of a join point with a demand that is either
bigger than, or smaller than, the number of lambdas syntactically visible.
* More lambdas than call demands:
join j x = \p q r -> blah in ...
in a context with demand Top.
* More call demands than lambdas:
(join j x = h in ..(j 2)..(j 3)) a b c
Note [Worker/wrapper arity and join points]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Consider
(join j x = \y. error "urk")
(in case v of )
( A -> j 3 ) x
( B -> j 4 )
( C -> \y. blah )
The entire thing is in a C(1,L) context, so j's strictness signature
will be [A]b
meaning one absent argument, returns bottom. That seems odd because
there's a \y inside. But it's right because when consumed in a C(1,L)
context the RHS of the join point is indeed bottom.
The entire thing is in a C(1,L) context, so we will analyse j's body, namely
\y. error "urk"
with demand C(C(1,L)). See `rhs_sd` in `dmdAnalRhsSig`. That will produce
a demand signature of <A><A>b: and indeed `j` diverges when given two arguments.
BUT we do /not/ want to worker/wrapper `j` with two arguments. Suppose we have
join j2 :: Int -> Int -> blah
j2 x = rhs
in ...(j2 3)...(j2 4)...
where j2's join-arity is 1, so calls to `j` will all have /one/ argument.
Suppose the entire expression is in a called context (like `j` above) and `j2`
gets the demand signature <1!P(L)><1!P(L)>, that is, strict in both arguments.
we worker/wrapper'd `j2` with two args we'd get
join $wj2 x# y# = let x = I# x#; y = I# y# in rhs
j2 x = \y. case x of I# x# -> case y of I# y# -> $wj2 x# y#
in ...(j2 3)...(j2 4)...
But now `$wj2`is no longer a join point. Boo.
Instead if we w/w at all, we want to do so only with /one/ argument:
join $wj2 x# = let x = I# x# in rhs
j2 x = case x of I# x# -> $wj2 x#
in ...(j2 3)...(j2 4)...
Now all is fine. BUT in `finaliseArgBoxities` we should trim y's boxity,
to reflect the fact tta we aren't going to unbox `y` at all.
Conclusion:
(1) The "worker/wrapper arity" of an Id is
* For non-join-points: idArity
* The join points: the join arity (Id part only of course)
This is the number of args we will use in worker/wrapper.
See `ww_arity` in `dmdAnalRhsSig`, and the function `workWrapArity`.
Note [Demand signatures are computed for a threshold arity based on idArity]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given a binding { f = rhs }, we compute a "theshold arity", and do demand
analysis based on a call with that many value arguments.
(2) A join point's demand-signature arity may exceed the Id's worker/wrapper
arity. See the `arity_ok` assertion in `mkWwBodies`.
The threshold we use is
(3) In `finaliseArgBoxities`, do trimBoxity on any argument demands beyond
the worker/wrapper arity.
* Ordinary bindings: idArity f.
(4) In WorkWrap.splitFun, make sure we split based on the worker/wrapper
arity (re)-computed by workWrapArity.
Note [The demand for the RHS of a binding]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Given a binding { f = rhs }, in `dmdAnalRhsSig` we compute a `rhs_sd` in
which to analyse `rhs`.
The demand we use is:
* Ordinary bindings: a call-demand of depth (idArity f).
Why idArity arguments? Because that's a conservative estimate of how many
arguments we must feed a function before it does anything interesting with
them. Also it elegantly subsumes the trivial RHS and PAP case. E.g. for
......@@ -1293,22 +1338,17 @@ The threshold we use is
idArity is /at least/ the number of manifest lambdas, but might be higher for
PAPs and trivial RHS (see Note [Demand analysis for trivial right-hand sides]).
* Join points: the value-binder subset of the JoinArity. This can
be less than the number of visible lambdas; e.g.
join j x = \y. blah
in ...(jump j 2)....(jump j 3)....
We know that j will never be applied to more than 1 arg (its join
arity, and we don't eta-expand join points, so here a threshold
of 1 is the best we can do.
* Join points: a call-demand of depth (value-binder subset of JoinArity),
wrapped around the incoming demand for the entire expression; see
Note [Demand analysis for join points]
Note that the idArity of a function varies independently of its cardinality
properties (cf. Note [idArity varies independently of dmdTypeDepth]), so we
implicitly encode the arity for when a demand signature is sound to unleash
in its 'dmdTypeDepth', not in its idArity (cf. Note [Understanding DmdType
and DmdSig] in GHC.Types.Demand). It is unsound to unleash a demand
signature when the incoming number of arguments is less than that. See
GHC.Types.Demand Note [What are demand signatures?] for more details on
soundness.
implicitly encode the arity for when a demand signature is sound to unleash in
its 'dmdTypeDepth', not in its idArity (cf. Note [Understanding DmdType and
DmdSig] in GHC.Types.Demand). It is unsound to unleash a demand signature when
the incoming number of arguments is less than that. See GHC.Types.Demand
Note [DmdSig: demand signatures, and demand-sig arity].
Note that there might, in principle, be functions for which we might want to
analyse for more incoming arguments than idArity. Example:
......@@ -1339,6 +1379,30 @@ signatures for different arities (i.e., polyvariance) would be entirely
possible, if it weren't for the additional runtime and implementation
complexity.
Note [mkDmdSigForArity]
~~~~~~~~~~~~~~~~~~~~~~~
Consider
f x = if expensive x
then \y. blah1
else \y. blah2
We will analyse the body with demand C(1L), reflecting the single visible
argument x. But dmdAnal will return a DmdType looking like
DmdType fvs [x-dmd, y-dmd]
because it has seen two lambdas, \x and \y. Since the length of the argument
demands in a DmdSig gives the "threshold" for applying the signature
(see Note [DmdSig: demand signatures, and demand-sig arity] in GHC.Types.Demand)
we must trim that DmdType to just
DmdSig (DmdTypte fvs [x-dmd])
when making that DmdType into the DmdSig for f. This trimming is the job of
`mkDmdSigForArity`.
Alternative. An alternative would be be to ensure that if
(dmd_ty, e') = dmdAnal env subdmd e
then the length dmds in dmd_ty is always less than (or maybe equal to?) the
call-depth of subdmd. To do that we'd need to adjust the Lam case of dmdAnal.
Probably not hard, but a job for another day; see discussion on !12873, #23113,
and #21392.
Note [idArity varies independently of dmdTypeDepth]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In general, an Id `f` has two independently varying attributes:
......@@ -1932,30 +1996,35 @@ positiveTopBudget (MkB n _) = n >= 0
finaliseArgBoxities :: AnalEnv -> Id -> Arity
-> [Demand] -> Divergence
-> CoreExpr -> ([Demand], CoreExpr)
finaliseArgBoxities env fn threshold_arity rhs_dmds div rhs
-- POSTCONDITION:
-- If: (dmds', rhs') = finaliseArgBoxitities ... dmds .. rhs
-- Then:
-- dmds' is the same as dmds (including length), except for boxity info
-- rhs' is the same as rhs, except for dmd info on lambda binders
-- NB: For join points, length dmds might be greater than ww_arity
finaliseArgBoxities env fn ww_arity arg_dmds div rhs
-- Check for an OPAQUE function: see Note [OPAQUE pragma]
-- In that case, trim off all boxity info from argument demands
-- and demand info on lambda binders
-- See Note [The OPAQUE pragma and avoiding the reboxing of arguments]
| isOpaquePragma (idInlinePragma fn)
, let trimmed_rhs_dmds = map trimBoxity rhs_dmds
= (trimmed_rhs_dmds, set_lam_dmds trimmed_rhs_dmds rhs)
, let trimmed_arg_dmds = map trimBoxity arg_dmds
= (trimmed_arg_dmds, set_lam_dmds trimmed_arg_dmds rhs)
-- Check that we have enough visible binders to match the
-- threshold arity; if not, we won't do worker/wrapper
-- ww arity; if not, we won't do worker/wrapper
-- This happens if we have simply {f = g} or a PAP {f = h 13}
-- we simply want to give f the same demand signature as g
-- How can such bindings arise? Perhaps from {-# NOLINE[2] f #-},
-- or if the call to `f` is currently not-applied (map f xs).
-- It's a bit of a corner case. Anyway for now we pass on the
-- unadulterated demands from the RHS, without any boxity trimming.
| threshold_arity > count isId bndrs
= (rhs_dmds, rhs)
| ww_arity > count isId bndrs
= (arg_dmds, rhs)
-- The normal case
| otherwise -- NB: threshold_arity might be less than
-- manifest arity for join points
| otherwise
= -- pprTrace "finaliseArgBoxities" (
-- vcat [text "function:" <+> ppr fn
-- , text "max" <+> ppr max_wkr_args
......@@ -1966,23 +2035,29 @@ finaliseArgBoxities env fn threshold_arity rhs_dmds div rhs
-- of the function, both because that's kosher, and because CPR analysis
-- uses the info on the binders directly.
where
opts = ae_opts env
(bndrs, _body) = collectBinders rhs
unarise_arity = sum [ unariseArity (idType b) | b <- bndrs, isId b ]
max_wkr_args = dmd_max_worker_args opts `max` unarise_arity
-- This is the budget initialisation step of
-- Note [Worker argument budget]
-- This is the key line, which uses almost-circular programming
-- The remaining budget from one layer becomes the initial
-- budget for the next layer down. See Note [Worker argument budget]
(remaining_budget, arg_dmds') = go_args (MkB max_wkr_args remaining_budget) arg_triples
opts = ae_opts env
(bndrs, _body) = collectBinders rhs
-- NB: in the interesting code path, count isId bndrs >= ww_arity
arg_triples :: [(Type, StrictnessMark, Demand)]
arg_triples = take threshold_arity $
arg_triples = take ww_arity $
[ (idType bndr, NotMarkedStrict, get_dmd bndr)
| bndr <- bndrs, isRuntimeVar bndr ]
arg_dmds' = ww_arg_dmds ++ map trimBoxity (drop ww_arity arg_dmds)
-- If ww_arity < length arg_dmds, the leftover ones
-- will not be w/w'd, so trimBoxity them
-- See Note [Worker/wrapper arity and join points] point (3)
-- This is the key line, which uses almost-circular programming
-- The remaining budget from one layer becomes the initial
-- budget for the next layer down. See Note [Worker argument budget]
(remaining_budget, ww_arg_dmds) = go_args (MkB max_wkr_args remaining_budget) arg_triples
unarise_arity = sum [ unariseArity (idType b) | b <- bndrs, isId b ]
max_wkr_args = dmd_max_worker_args opts `max` unarise_arity
-- This is the budget initialisation step of
-- Note [Worker argument budget]
get_dmd :: Id -> Demand
get_dmd bndr
| is_bot_fn = unboxDeeplyDmd dmd -- See Note [Boxity for bottoming functions],
......
......@@ -639,6 +639,17 @@ That is we make the specialized function strict in arguments
representing strict fields. See Note [Call-by-value for worker args]
for why we do this.
(SCF1) The arg_id might be an /imported/ Id like M.foo_acf (see #24944).
We don't want to make
case M.foo_acf of M.foo_acf { DEFAULT -> blah }
because the binder of a case-expression should never be imported. Rather,
we must localise it thus:
case M.foo_acf of foo_acf { DEFAULT -> blah }
We keep the same unique, so in the next round of simplification we'll replace
any M.foo_acf's in `blah` by `foo_acf`.
c.f. Note [Localise pattern binders] in GHC.HsToCore.Utils.
Note [Specialising on dictionaries]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In #21386, SpecConstr saw this call:
......@@ -2030,8 +2041,8 @@ generaliseDictPats qvars pats
| otherwise
= return (extra_qvs, pat)
-- See Note [SpecConstr and strict fields]
mkSeqs :: [Var] -> Type -> CoreExpr -> CoreExpr
-- See Note [SpecConstr and strict fields]
mkSeqs seqees res_ty rhs =
foldr addEval rhs seqees
where
......@@ -2039,7 +2050,11 @@ mkSeqs seqees res_ty rhs =
addEval arg_id rhs
-- Argument representing strict field and it's worth passing via cbv
| shouldStrictifyIdForCbv arg_id
= Case (Var arg_id) arg_id res_ty ([Alt DEFAULT [] rhs])
= Case (Var arg_id)
(localiseId arg_id) -- See (SCF1) in Note [SpecConstr and strict fields]
res_ty
([Alt DEFAULT [] rhs])
| otherwise
= rhs
......