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 (22)
  • Teo Camarasu's avatar
    base: export System.Mem.performBlockingMajorGC · 08031ada
    Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
    The corresponding C function was introduced in
    ba73a807. As part of #22264.
    
    Resolves #24228
    
    The CLC proposal was disccused at: https://github.com/haskell/core-libraries-committee/issues/230
    
    
    
    Co-authored-by: default avatarBen Gamari <bgamari.foss@gmail.com>
    08031ada
  • Florian Weimer's avatar
    Fix C output for modern C initiative · 1f534c2e
    Florian Weimer authored and Marge Bot's avatar Marge Bot committed
    GCC 14 on aarch64 rejects the C code written by GHC with this kind of
    error:
    
       error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion]
             68 | *(ffi_arg*)resp = cret;
                |                 ^
    
    Add the correct cast.
    
    For more information on this see:
    https://fedoraproject.org/wiki/Changes/PortingToModernC
    
    
    
    Tested-by: default avatarRichard W.M. Jones <rjones@redhat.com>
    1f534c2e
  • Matthew Craven's avatar
    Bump bytestring submodule to 0.12.1.0 · 5d3f7862
    Matthew Craven authored and Marge Bot's avatar Marge Bot committed
    5d3f7862
  • Ian-Woo Kim's avatar
    Add missing BCO handling in scavenge_one. · 902ebcc2
    Ian-Woo Kim authored and Marge Bot's avatar Marge Bot committed
    902ebcc2
  • Sylvain Henry's avatar
    Make cast between words and floats real primops (#24331) · 97d26206
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    First step towards fixing #24331. Replace foreign prim imports with real
    primops.
    97d26206
  • Sylvain Henry's avatar
    a40e4781
  • Sylvain Henry's avatar
    Perf: replace stack checks with assertions in casting primops · 5fd2c00f
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    There are RESERVED_STACK_WORDS free words (currently 21) on the stack,
    so omit the checks.
    
    Suggested by Cheng Shao.
    5fd2c00f
  • Sylvain Henry's avatar
    Reexport primops from GHC.Float + add deprecation · 401dfe7b
    Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
    401dfe7b
  • Ben Gamari's avatar
    rts/Hash: Don't iterate over chunks if we don't need to free data · 4ab48edb
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    When freeing a `HashTable` there is no reason to walk over the hash list
    before freeing it if the user has not given us a `dataFreeFun`.
    
    Noticed while looking at #24410.
    4ab48edb
  • Cheng Shao's avatar
    compiler: add SEQ_CST fence support · bd5a1f91
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    In addition to existing Acquire/Release fences, this commit adds
    SEQ_CST fence support to GHC, allowing Cmm code to explicitly emit a
    fence that enforces total memory ordering. The following logic is
    added:
    
    - The MO_SeqCstFence callish MachOp
    - The %prim fence_seq_cst() Cmm syntax and the SEQ_CST_FENCE macro in Cmm.h
    - MO_SeqCstFence lowering logic in every single GHC codegen backend
    bd5a1f91
  • Cheng Shao's avatar
    testsuite: fix hs_try_putmvar002 for targets without pthread.h · 2ce2a493
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    hs_try_putmvar002 includes pthread.h and doesn't work on targets
    without this header (e.g. wasm32). It doesn't need to include this
    header at all. This was previously unnoticed by wasm CI, though recent
    toolchain upgrade brought in upstream changes that completely removes
    pthread.h in the single-threaded wasm32-wasi sysroot, therefore we
    need to handle that change.
    2ce2a493
  • Cheng Shao's avatar
    ci: bump ci-images to use updated wasm image · 1fb3974e
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    This commit bumps our ci-images revision to use updated wasm image.
    1fb3974e
  • Bodigrim's avatar
    Bump submodule text to 2.1.1 · 56e3f097
    Bodigrim authored and Marge Bot's avatar Marge Bot committed
    T17123 allocates less because of improvements to Data.Text.concat in 1a6a06a.
    
    Metric Decrease:
        T17123
    56e3f097
  • Cheng Shao's avatar
    rts: remove redundant rCCCS initialization · a7569495
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    This commit removes the redundant logic of initializing each
    Capability's rCCCS to CCS_SYSTEM in initProfiling(). Before
    initProfiling() is called during RTS startup, each Capability's rCCCS
    has already been assigned CCS_SYSTEM when they're first initialized.
    a7569495
  • Ben Gamari's avatar
    Drop dependence on `touch` · 7a0293cc
    Ben Gamari authored and Marge Bot's avatar Marge Bot committed
    This drops GHC's dependence on the `touch` program, instead implementing
    it within GHC. This eliminates an external dependency and means that we
    have one fewer program to keep track of in the `configure` script
    7a0293cc
  • Andrei Borzenkov's avatar
    Parser, renamer, type checker for @a-binders (#17594) · 0dbd729e
    Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
    GHC Proposal 448 introduces binders for invisible type arguments
    (@a-binders) in various contexts. This patch implements @-binders
    in lambda patterns and function equations:
    
      {-# LANGUAGE TypeAbstractions #-}
    
      id1 :: a -> a
      id1 @t x = x :: t      -- @t-binder on the LHS of a function equation
    
      higherRank :: (forall a. (Num a, Bounded a) => a -> a) -> (Int8, Int16)
      higherRank f = (f 42, f 42)
    
      ex :: (Int8, Int16)
      ex = higherRank (\ @a x -> maxBound @a - x )
                             -- @a-binder in a lambda pattern in an argument
                             -- to a higher-order function
    
    Syntax
    ------
    
    To represent those @-binders in the AST, the list of patterns in Match
    now uses ArgPat instead of Pat:
    
      data Match p body
         = Match {
             ...
    -        m_pats  :: [LPat p],
    +        m_pats  :: [LArgPat p],
             ...
       }
    
    + data ArgPat pass
    +   = VisPat (XVisPat pass) (LPat pass)
    +   | InvisPat (XInvisPat pass) (HsTyPat (NoGhcTc pass))
    +   | XArgPat !(XXArgPat pass)
    
    The VisPat constructor represents patterns for visible arguments,
    which include ordinary value-level arguments and required type arguments
    (neither is prefixed with a @), while InvisPat represents invisible type
    arguments (prefixed with a @).
    
    Parser
    ------
    
    In the grammar (Parser.y), the lambda and lambda-cases productions of
    aexp non-terminal were updated to accept argpats instead of apats:
    
      aexp : ...
    -        | '\\' apats '->' exp
    +        | '\\' argpats '->' exp
             ...
    -        | '\\' 'lcases' altslist(apats)
    +        | '\\' 'lcases' altslist(argpats)
             ...
    
    + argpat : apat
    +        | PREFIX_AT atype
    
    Function left-hand sides did not require any changes to the grammar, as
    they were already parsed with productions capable of parsing @-binders.
    Those binders were being rejected in post-processing (isFunLhs), and now
    we accept them.
    
    In Parser.PostProcess, patterns are constructed with the help of
    PatBuilder, which is used as an intermediate data structure when
    disambiguating between FunBind and PatBind. In this patch we define
    ArgPatBuilder to accompany PatBuilder. ArgPatBuilder is a short-lived
    data structure produced in isFunLhs and consumed in checkFunBind.
    
    Renamer
    -------
    
    Renaming of @-binders builds upon prior work on type patterns,
    implemented in 2afbddb0, which guarantees proper scoping and
    shadowing behavior of bound type variables.
    
    This patch merely defines rnLArgPatsAndThen to process a mix of visible
    and invisible patterns:
    
    + rnLArgPatsAndThen :: NameMaker -> [LArgPat GhcPs] -> CpsRn [LArgPat GhcRn]
    + rnLArgPatsAndThen mk = mapM (wrapSrcSpanCps rnArgPatAndThen) where
    +   rnArgPatAndThen (VisPat x p)    = ... rnLPatAndThen ...
    +   rnArgPatAndThen (InvisPat _ tp) = ... rnHsTyPat ...
    
    Common logic between rnArgPats and rnPats is factored out into the
    rn_pats_general helper.
    
    Type checker
    ------------
    
    Type-checking of @-binders builds upon prior work on lazy skolemisation,
    implemented in f5d3e03c.
    
    This patch extends tcMatchPats to handle @-binders. Now it takes and
    returns a list of LArgPat rather than LPat:
    
      tcMatchPats ::
                  ...
    -             -> [LPat GhcRn]
    +             -> [LArgPat GhcRn]
                  ...
    -             -> TcM ([LPat GhcTc], a)
    +             -> TcM ([LArgPat GhcTc], a)
    
    Invisible binders in the Match are matched up with invisible (Specified)
    foralls in the type. This is done with a new clause in the `loop` worker
    of tcMatchPats:
    
      loop :: [LArgPat GhcRn] -> [ExpPatType] -> TcM ([LArgPat GhcTc], a)
      loop (L l apat : pats) (ExpForAllPatTy (Bndr tv vis) : pat_tys)
        ...
        -- NEW CLAUSE:
        | InvisPat _ tp <- apat, isSpecifiedForAllTyFlag vis
        = ...
    
    In addition to that, tcMatchPats no longer discards type patterns. This
    is done by filterOutErasedPats in the desugarer instead.
    
    x86_64-linux-deb10-validate+debug_info
    Metric Increase:
        MultiLayerModulesTH_OneShot
    0dbd729e
  • Jade's avatar
  • John Ericson's avatar
    Fix reST in users guide · 17e309d2
    John Ericson authored and Marge Bot's avatar Marge Bot committed
    It appears that aef587f6 wasn't valid syntax.
    17e309d2
  • Brandon Chinn's avatar
    Fix searching for errors in sphinx build · 35b0ad90
    Brandon Chinn authored and Marge Bot's avatar Marge Bot committed
    35b0ad90
  • Cheng Shao's avatar
    hadrian: fix wasm backend post linker script permissions · 4696b966
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    The post-link.mjs script was incorrectly copied and installed as a
    regular data file without executable permission, this commit fixes it.
    4696b966
  • Cheng Shao's avatar
    testsuite: mark T23540 as fragile on i386 · a6142e0c
    Cheng Shao authored and Marge Bot's avatar Marge Bot committed
    See #24449 for details.
    a6142e0c
  • Andrei Borzenkov's avatar
    Namespacing for fixity signatures (#14032) · b7172d5e
    Andrei Borzenkov authored
    Namespace specifiers were added to syntax of fixity signatures:
      - sigdecl ::= infix prec ops | ...
      + sigdecl ::= infix prec namespace_spec ops | ...
    
    To preserve namespace during renaming MiniFixityEnv type
    now has separate FastStringEnv fields for names that should be
    on the term level and for name that should be on the type level.
    
    makeMiniFixityEnv function was changed to fill MiniFixityEnv in the right way:
     - signatures without namespace specifiers fill both fields
     - signatures with 'data' specifier fill data field only
     - signatures with 'type' specifier fill type field only
    
    Was added helper function lookupMiniFixityEnv that takes care about
    looking for a name in an appropriate namespace.
    
    Updates haddock submodule.
    Unverified
    b7172d5e
Showing
with 250 additions and 128 deletions
......@@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: 127c7f5f486a4096a79960d9f307083095bee61c
DOCKER_REV: 08bdbb85d6711e4df23d97e1cbdb557fe752b0a4
# Sequential version number of all cached things.
# Bump to invalidate GitLab CI cache.
......
......@@ -296,7 +296,7 @@ distroName Ubuntu2004 = "ubuntu20_04"
distroName Centos7 = "centos7"
distroName Alpine312 = "alpine3_12"
distroName Alpine318 = "alpine3_18"
distroName AlpineWasm = "alpine3_17-wasm"
distroName AlpineWasm = "alpine3_18-wasm"
distroName Rocky8 = "rocky8"
opsysName :: Opsys -> String
......@@ -1083,10 +1083,10 @@ platform_mapping = Map.map go combined_result
, "x86_64-linux-fedora33-release"
, "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
, "x86_64-windows-validate"
, "nightly-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static"
, "nightly-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static"
, "nightly-x86_64-linux-deb11-validate"
, "nightly-x86_64-linux-deb12-validate"
, "x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static"
, "x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static"
, "nightly-aarch64-linux-deb10-validate"
, "nightly-x86_64-linux-alpine3_12-validate"
, "nightly-x86_64-linux-deb10-validate"
......
......@@ -955,7 +955,7 @@
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static": {
"nightly-x86_64-linux-alpine3_18-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -966,7 +966,7 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-validate.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -976,14 +976,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -1009,17 +1009,18 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-validate",
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static",
"TEST_ENV": "x86_64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static": {
"nightly-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -1030,7 +1031,7 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -1040,14 +1041,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -1072,18 +1073,18 @@
"x86_64-linux"
],
"variables": {
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static",
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static": {
"nightly-x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -1094,7 +1095,7 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -1104,14 +1105,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -1136,18 +1137,18 @@
"x86_64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-alpine3_18-validate": {
"nightly-x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -1158,7 +1159,7 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_18-validate.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -1168,14 +1169,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_18-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -1201,14 +1202,13 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-validate",
"BROKEN_TESTS": "encoding004 T10458",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_18-validate",
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"XZ_OPT": "-9"
}
},
......@@ -4599,7 +4599,7 @@
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static"
}
},
"x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static": {
"x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -4610,7 +4610,7 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -4620,14 +4620,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -4653,16 +4653,16 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-cross_wasm32-wasi-release+fully_static"
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-cross_wasm32-wasi-release+fully_static"
}
},
"x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static": {
"x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -4673,7 +4673,7 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -4683,14 +4683,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -4717,16 +4717,16 @@
],
"variables": {
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-int_native-cross_wasm32-wasi-release+fully_static"
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-int_native-cross_wasm32-wasi-release+fully_static"
}
},
"x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static": {
"x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh save_test_output",
......@@ -4737,7 +4737,7 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
"ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static.tar.xz",
"ghc-x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static.tar.xz",
"junit.xml",
"unexpected-test-output.tar.gz"
],
......@@ -4747,14 +4747,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-alpine3_17-wasm-$CACHE_REV",
"key": "x86_64-linux-alpine3_18-wasm-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_17-wasm:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_18-wasm:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -4781,13 +4781,13 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--enable-unregisterised --with-intree-gmp --with-system-libffi --enable-strict-ghc-toolchain-check",
"CROSS_TARGET": "wasm32-wasi",
"HADRIAN_ARGS": "--docs=none",
"RUNTEST_ARGS": "",
"TEST_ENV": "x86_64-linux-alpine3_17-wasm-unreg-cross_wasm32-wasi-release+fully_static"
"TEST_ENV": "x86_64-linux-alpine3_18-wasm-unreg-cross_wasm32-wasi-release+fully_static"
}
},
"x86_64-linux-deb10-int_native-validate": {
......
......@@ -48,15 +48,17 @@ templateHaskellNames = [
conPName, tildePName, bangPName, infixPName,
asPName, wildPName, recPName, listPName, sigPName, viewPName,
typePName,
-- ArgPat
visAPName, invisAPName,
-- FieldPat
fieldPatName,
-- Match
matchName,
-- Clause
clauseName,
clauseArgName,
-- Exp
varEName, conEName, litEName, appEName, appTypeEName, infixEName,
infixAppName, sectionLName, sectionRName, lamEName, lamCaseEName,
infixAppName, sectionLName, sectionRName, lamArgEName, lamCaseEName,
lamCasesEName, tupEName, unboxedTupEName, unboxedSumEName,
condEName, multiIfEName, letEName, caseEName, doEName, mdoEName, compEName,
fromEName, fromThenEName, fromToEName, fromThenToEName,
......@@ -80,7 +82,7 @@ templateHaskellNames = [
defaultSigDName, defaultDName,
dataFamilyDName, openTypeFamilyDName, closedTypeFamilyDName,
dataInstDName, newtypeInstDName, tySynInstDName,
infixLDName, infixRDName, infixNDName,
infixLWithSpecDName, infixRWithSpecDName, infixNWithSpecDName,
roleAnnotDName, patSynDName, patSynSigDName,
implicitParamBindDName,
-- Cxt
......@@ -141,6 +143,9 @@ templateHaskellNames = [
-- Overlap
overlappableDataConName, overlappingDataConName, overlapsDataConName,
incoherentDataConName,
-- NamespaceSpecifier
noNamespaceSpecifierDataConName, typeNamespaceSpecifierDataConName,
dataNamespaceSpecifierDataConName,
-- DerivStrategy
stockStrategyName, anyclassStrategyName,
newtypeStrategyName, viaStrategyName,
......@@ -159,7 +164,8 @@ templateHaskellNames = [
liftClassName, quoteClassName,
-- And the tycons
qTyConName, nameTyConName, patTyConName, fieldPatTyConName, matchTyConName,
qTyConName, nameTyConName, patTyConName, argPatTyConName,
fieldPatTyConName, matchTyConName,
expQTyConName, fieldExpTyConName, predTyConName,
stmtTyConName, decsTyConName, conTyConName, bangTypeTyConName,
varBangTypeTyConName, typeQTyConName, expTyConName, decTyConName,
......@@ -204,7 +210,7 @@ liftClassName = thCls (fsLit "Lift") liftClassKey
quoteClassName :: Name
quoteClassName = thCls (fsLit "Quote") quoteClassKey
qTyConName, nameTyConName, fieldExpTyConName, patTyConName,
qTyConName, nameTyConName, fieldExpTyConName, patTyConName, argPatTyConName,
fieldPatTyConName, expTyConName, decTyConName, typeTyConName,
matchTyConName, clauseTyConName, funDepTyConName, predTyConName,
codeTyConName, injAnnTyConName, overlapTyConName, decsTyConName,
......@@ -213,6 +219,7 @@ qTyConName = thTc (fsLit "Q") qTyConKey
nameTyConName = thTc (fsLit "Name") nameTyConKey
fieldExpTyConName = thTc (fsLit "FieldExp") fieldExpTyConKey
patTyConName = thTc (fsLit "Pat") patTyConKey
argPatTyConName = thTc (fsLit "ArgPat") argPatTyConKey
fieldPatTyConName = thTc (fsLit "FieldPat") fieldPatTyConKey
expTyConName = thTc (fsLit "Exp") expTyConKey
decTyConName = thTc (fsLit "Dec") decTyConKey
......@@ -289,6 +296,12 @@ sigPName = libFun (fsLit "sigP") sigPIdKey
viewPName = libFun (fsLit "viewP") viewPIdKey
typePName = libFun (fsLit "typeP") typePIdKey
-- data ArgPat = ...
visAPName, invisAPName :: Name
visAPName = libFun (fsLit "visAP") visAPIdKey
invisAPName = libFun (fsLit "invisAP") invisAPIdKey
-- type FieldPat = ...
fieldPatName :: Name
fieldPatName = libFun (fsLit "fieldPat") fieldPatIdKey
......@@ -298,12 +311,12 @@ matchName :: Name
matchName = libFun (fsLit "match") matchIdKey
-- data Clause = ...
clauseName :: Name
clauseName = libFun (fsLit "clause") clauseIdKey
clauseArgName :: Name
clauseArgName = libFun (fsLit "clauseArg") clauseArgIdKey
-- data Exp = ...
varEName, conEName, litEName, appEName, appTypeEName, infixEName, infixAppName,
sectionLName, sectionRName, lamEName, lamCaseEName, lamCasesEName, tupEName,
sectionLName, sectionRName, lamArgEName, lamCaseEName, lamCasesEName, tupEName,
unboxedTupEName, unboxedSumEName, condEName, multiIfEName, letEName,
caseEName, doEName, mdoEName, compEName, staticEName, unboundVarEName,
labelEName, implicitParamVarEName, getFieldEName, projectionEName, typeEName :: Name
......@@ -316,7 +329,7 @@ infixEName = libFun (fsLit "infixE") infixEIdKey
infixAppName = libFun (fsLit "infixApp") infixAppIdKey
sectionLName = libFun (fsLit "sectionL") sectionLIdKey
sectionRName = libFun (fsLit "sectionR") sectionRIdKey
lamEName = libFun (fsLit "lamE") lamEIdKey
lamArgEName = libFun (fsLit "lamArgE") lamArgEIdKey
lamCaseEName = libFun (fsLit "lamCaseE") lamCaseEIdKey
lamCasesEName = libFun (fsLit "lamCasesE") lamCasesEIdKey
tupEName = libFun (fsLit "tupE") tupEIdKey
......@@ -378,9 +391,9 @@ funDName, valDName, dataDName, newtypeDName, typeDataDName, tySynDName, classDNa
pragAnnDName, pragSCCFunDName, pragSCCFunNamedDName,
standaloneDerivWithStrategyDName, defaultSigDName, defaultDName,
dataInstDName, newtypeInstDName, tySynInstDName, dataFamilyDName,
openTypeFamilyDName, closedTypeFamilyDName, infixLDName, infixRDName,
infixNDName, roleAnnotDName, patSynDName, patSynSigDName,
pragCompleteDName, implicitParamBindDName, pragOpaqueDName :: Name
openTypeFamilyDName, closedTypeFamilyDName, infixLWithSpecDName,
infixRWithSpecDName, infixNWithSpecDName, roleAnnotDName, patSynDName,
patSynSigDName, pragCompleteDName, implicitParamBindDName, pragOpaqueDName :: Name
funDName = libFun (fsLit "funD") funDIdKey
valDName = libFun (fsLit "valD") valDIdKey
dataDName = libFun (fsLit "dataD") dataDIdKey
......@@ -411,9 +424,9 @@ tySynInstDName = libFun (fsLit "tySynInstD")
openTypeFamilyDName = libFun (fsLit "openTypeFamilyD") openTypeFamilyDIdKey
closedTypeFamilyDName = libFun (fsLit "closedTypeFamilyD") closedTypeFamilyDIdKey
dataFamilyDName = libFun (fsLit "dataFamilyD") dataFamilyDIdKey
infixLDName = libFun (fsLit "infixLD") infixLDIdKey
infixRDName = libFun (fsLit "infixRD") infixRDIdKey
infixNDName = libFun (fsLit "infixND") infixNDIdKey
infixLWithSpecDName = libFun (fsLit "infixLWithSpecD") infixLWithSpecDIdKey
infixRWithSpecDName = libFun (fsLit "infixRWithSpecD") infixRWithSpecDIdKey
infixNWithSpecDName = libFun (fsLit "infixNWithSpecD") infixNWithSpecDIdKey
roleAnnotDName = libFun (fsLit "roleAnnotD") roleAnnotDIdKey
patSynDName = libFun (fsLit "patSynD") patSynDIdKey
patSynSigDName = libFun (fsLit "patSynSigD") patSynSigDIdKey
......@@ -655,6 +668,17 @@ overlappingDataConName = thCon (fsLit "Overlapping") overlappingDataConKey
overlapsDataConName = thCon (fsLit "Overlaps") overlapsDataConKey
incoherentDataConName = thCon (fsLit "Incoherent") incoherentDataConKey
-- data NamespaceSpecifier = ...
noNamespaceSpecifierDataConName,
typeNamespaceSpecifierDataConName,
dataNamespaceSpecifierDataConName :: Name
noNamespaceSpecifierDataConName =
thCon (fsLit "NoNamespaceSpecifier") noNamespaceSpecifierDataConKey
typeNamespaceSpecifierDataConName =
thCon (fsLit "TypeNamespaceSpecifier") typeNamespaceSpecifierDataConKey
dataNamespaceSpecifierDataConName =
thCon (fsLit "DataNamespaceSpecifier") dataNamespaceSpecifierDataConKey
{- *********************************************************************
* *
Class keys
......@@ -680,7 +704,7 @@ quoteClassKey = mkPreludeClassUnique 201
-- Check in GHC.Builtin.Names if you want to change this
expTyConKey, matchTyConKey, clauseTyConKey, qTyConKey, expQTyConKey,
patTyConKey,
patTyConKey, argPatTyConKey,
stmtTyConKey, conTyConKey, typeQTyConKey, typeTyConKey,
tyVarBndrUnitTyConKey, tyVarBndrSpecTyConKey, tyVarBndrVisTyConKey,
decTyConKey, bangTypeTyConKey, varBangTypeTyConKey,
......@@ -696,6 +720,7 @@ clauseTyConKey = mkPreludeTyConUnique 202
qTyConKey = mkPreludeTyConUnique 203
expQTyConKey = mkPreludeTyConUnique 204
patTyConKey = mkPreludeTyConUnique 206
argPatTyConKey = mkPreludeTyConUnique 207
stmtTyConKey = mkPreludeTyConUnique 209
conTyConKey = mkPreludeTyConUnique 210
typeQTyConKey = mkPreludeTyConUnique 211
......@@ -762,6 +787,13 @@ overlappingDataConKey = mkPreludeDataConUnique 210
overlapsDataConKey = mkPreludeDataConUnique 211
incoherentDataConKey = mkPreludeDataConUnique 212
-- data NamespaceSpecifier = ...
noNamespaceSpecifierDataConKey,
typeNamespaceSpecifierDataConKey,
dataNamespaceSpecifierDataConKey :: Unique
noNamespaceSpecifierDataConKey = mkPreludeDataConUnique 213
typeNamespaceSpecifierDataConKey = mkPreludeDataConUnique 214
dataNamespaceSpecifierDataConKey = mkPreludeDataConUnique 215
{- *********************************************************************
* *
Id keys
......@@ -834,6 +866,12 @@ sigPIdKey = mkPreludeMiscIdUnique 253
viewPIdKey = mkPreludeMiscIdUnique 254
typePIdKey = mkPreludeMiscIdUnique 255
-- data ArgPat = ...
visAPIdKey, invisAPIdKey :: Unique
visAPIdKey = mkPreludeMiscIdUnique 256
invisAPIdKey = mkPreludeMiscIdUnique 257
-- type FieldPat = ...
fieldPatIdKey :: Unique
fieldPatIdKey = mkPreludeMiscIdUnique 260
......@@ -843,13 +881,13 @@ matchIdKey :: Unique
matchIdKey = mkPreludeMiscIdUnique 261
-- data Clause = ...
clauseIdKey :: Unique
clauseIdKey = mkPreludeMiscIdUnique 262
clauseArgIdKey :: Unique
clauseArgIdKey = mkPreludeMiscIdUnique 262
-- data Exp = ...
varEIdKey, conEIdKey, litEIdKey, appEIdKey, appTypeEIdKey, infixEIdKey,
infixAppIdKey, sectionLIdKey, sectionRIdKey, lamEIdKey, lamCaseEIdKey,
infixAppIdKey, sectionLIdKey, sectionRIdKey, lamArgEIdKey, lamCaseEIdKey,
lamCasesEIdKey, tupEIdKey, unboxedTupEIdKey, unboxedSumEIdKey, condEIdKey,
multiIfEIdKey, letEIdKey, caseEIdKey, doEIdKey, compEIdKey,
fromEIdKey, fromThenEIdKey, fromToEIdKey, fromThenToEIdKey,
......@@ -865,7 +903,7 @@ infixEIdKey = mkPreludeMiscIdUnique 275
infixAppIdKey = mkPreludeMiscIdUnique 276
sectionLIdKey = mkPreludeMiscIdUnique 277
sectionRIdKey = mkPreludeMiscIdUnique 278
lamEIdKey = mkPreludeMiscIdUnique 279
lamArgEIdKey = mkPreludeMiscIdUnique 279
lamCaseEIdKey = mkPreludeMiscIdUnique 280
lamCasesEIdKey = mkPreludeMiscIdUnique 281
tupEIdKey = mkPreludeMiscIdUnique 282
......@@ -923,10 +961,10 @@ funDIdKey, valDIdKey, dataDIdKey, newtypeDIdKey, tySynDIdKey, classDIdKey,
pragRuleDIdKey, pragAnnDIdKey, defaultSigDIdKey, dataFamilyDIdKey,
openTypeFamilyDIdKey, closedTypeFamilyDIdKey, dataInstDIdKey,
newtypeInstDIdKey, tySynInstDIdKey, standaloneDerivWithStrategyDIdKey,
infixLDIdKey, infixRDIdKey, infixNDIdKey, roleAnnotDIdKey, patSynDIdKey,
patSynSigDIdKey, pragCompleteDIdKey, implicitParamBindDIdKey,
kiSigDIdKey, defaultDIdKey, pragOpaqueDIdKey, typeDataDIdKey,
pragSCCFunDKey, pragSCCFunNamedDKey :: Unique
infixLWithSpecDIdKey, infixRWithSpecDIdKey, infixNWithSpecDIdKey,
roleAnnotDIdKey, patSynDIdKey, patSynSigDIdKey, pragCompleteDIdKey,
implicitParamBindDIdKey, kiSigDIdKey, defaultDIdKey, pragOpaqueDIdKey,
typeDataDIdKey, pragSCCFunDKey, pragSCCFunNamedDKey :: Unique
funDIdKey = mkPreludeMiscIdUnique 320
valDIdKey = mkPreludeMiscIdUnique 321
dataDIdKey = mkPreludeMiscIdUnique 322
......@@ -949,9 +987,9 @@ dataInstDIdKey = mkPreludeMiscIdUnique 338
newtypeInstDIdKey = mkPreludeMiscIdUnique 339
tySynInstDIdKey = mkPreludeMiscIdUnique 340
closedTypeFamilyDIdKey = mkPreludeMiscIdUnique 341
infixLDIdKey = mkPreludeMiscIdUnique 342
infixRDIdKey = mkPreludeMiscIdUnique 343
infixNDIdKey = mkPreludeMiscIdUnique 344
infixLWithSpecDIdKey = mkPreludeMiscIdUnique 342
infixRWithSpecDIdKey = mkPreludeMiscIdUnique 343
infixNWithSpecDIdKey = mkPreludeMiscIdUnique 344
roleAnnotDIdKey = mkPreludeMiscIdUnique 345
standaloneDerivWithStrategyDIdKey = mkPreludeMiscIdUnique 346
defaultSigDIdKey = mkPreludeMiscIdUnique 347
......
......@@ -1231,6 +1231,14 @@ primop DoubleDecode_Int64Op "decodeDouble_Int64#" GenPrimOp
{Decode 'Double#' into mantissa and base-2 exponent.}
with out_of_line = True
primop CastDoubleToWord64Op "castDoubleToWord64#" GenPrimOp
Double# -> Word64#
{Bitcast a 'Double#' into a 'Word64#'}
primop CastWord64ToDoubleOp "castWord64ToDouble#" GenPrimOp
Word64# -> Double#
{Bitcast a 'Word64#' into a 'Double#'}
------------------------------------------------------------------------
section "Float#"
{Operations on single-precision (32-bit) floating-point numbers.}
......@@ -1377,6 +1385,14 @@ primop FloatDecode_IntOp "decodeFloat_Int#" GenPrimOp
First 'Int#' in result is the mantissa; second is the exponent.}
with out_of_line = True
primop CastFloatToWord32Op "castFloatToWord32#" GenPrimOp
Float# -> Word32#
{Bitcast a 'Float#' into a 'Word32#'}
primop CastWord32ToFloatOp "castWord32ToFloat#" GenPrimOp
Word32# -> Float#
{Bitcast a 'Word32#' into a 'Float#'}
------------------------------------------------------------------------
section "Fused multiply-add operations"
{ #fma#
......
......@@ -727,6 +727,7 @@ data CallishMachOp
| MO_AcquireFence
| MO_ReleaseFence
| MO_SeqCstFence
-- | Atomic read-modify-write. Arguments are @[dest, n]@.
| MO_AtomicRMW Width AtomicMachOp
......
......@@ -1133,6 +1133,8 @@ callishMachOps platform = listToUFM $
-- with an overlapping token ('acquire') in the lexer.
( "fence_acquire", (MO_AcquireFence,)),
( "fence_release", (MO_ReleaseFence,)),
( "fence_seq_cst", (MO_SeqCstFence,)),
( "memcpy", memcpyLikeTweakArgs MO_Memcpy ),
( "memset", memcpyLikeTweakArgs MO_Memset ),
( "memmove", memcpyLikeTweakArgs MO_Memmove ),
......
......@@ -1730,6 +1730,7 @@ genCCall target dest_regs arg_regs bid = do
-- Memory Ordering
MO_AcquireFence -> return (unitOL DMBISH, Nothing)
MO_ReleaseFence -> return (unitOL DMBISH, Nothing)
MO_SeqCstFence -> return (unitOL DMBISH, Nothing)
MO_Touch -> return (nilOL, Nothing) -- Keep variables live (when using interior pointers)
-- Prefetch
MO_Prefetch_Data _n -> return (nilOL, Nothing) -- Prefetch hint.
......
......@@ -1132,6 +1132,8 @@ genCCall (PrimTarget MO_AcquireFence) _ _
= return $ unitOL LWSYNC
genCCall (PrimTarget MO_ReleaseFence) _ _
= return $ unitOL LWSYNC
genCCall (PrimTarget MO_SeqCstFence) _ _
= return $ unitOL HWSYNC
genCCall (PrimTarget MO_Touch) _ _
= return $ nilOL
......@@ -2098,6 +2100,7 @@ genCCall' config gcp target dest_regs args
MO_U_Mul2 {} -> unsupported
MO_AcquireFence -> unsupported
MO_ReleaseFence -> unsupported
MO_SeqCstFence -> unsupported
MO_Touch -> unsupported
MO_Prefetch_Data _ -> unsupported
unsupported = panic ("outOfLineCmmOp: " ++ show mop
......
......@@ -1189,6 +1189,7 @@ lower_CallishMachOp lbl MO_F32_Sqrt rs xs = lower_CMO_Un_Homo lbl "sqrtf" rs xs
lower_CallishMachOp lbl (MO_UF_Conv w0) rs xs = lower_MO_UF_Conv lbl w0 rs xs
lower_CallishMachOp _ MO_AcquireFence _ _ = pure $ WasmStatements WasmNop
lower_CallishMachOp _ MO_ReleaseFence _ _ = pure $ WasmStatements WasmNop
lower_CallishMachOp _ MO_SeqCstFence _ _ = pure $ WasmStatements WasmNop
lower_CallishMachOp _ MO_Touch _ _ = pure $ WasmStatements WasmNop
lower_CallishMachOp _ (MO_Prefetch_Data {}) _ _ = pure $ WasmStatements WasmNop
lower_CallishMachOp lbl (MO_Memcpy {}) [] xs = do
......
......@@ -2403,6 +2403,7 @@ genSimplePrim bid (MO_Memcmp align) [res] [dst,src,n] = genMemCmp bid a
genSimplePrim bid (MO_Memset align) [] [dst,c,n] = genMemSet bid align dst c n
genSimplePrim _ MO_AcquireFence [] [] = return nilOL -- barriers compile to no code on x86/x86-64;
genSimplePrim _ MO_ReleaseFence [] [] = return nilOL -- we keep it this long in order to prevent earlier optimisations.
genSimplePrim _ MO_SeqCstFence [] [] = return $ unitOL MFENCE
genSimplePrim _ MO_Touch [] [_] = return nilOL
genSimplePrim _ (MO_Prefetch_Data n) [] [src] = genPrefetchData n src
genSimplePrim _ (MO_BSwap width) [dst] [src] = genByteSwap width dst src
......@@ -4667,4 +4668,3 @@ genPred64 cond dst x y = do
, SETCC cond (OpReg dst_r)
, MOVZxL II8 (OpReg dst_r) (OpReg dst_r)
]
......@@ -265,6 +265,8 @@ pprStmt platform stmt =
text "__atomic_thread_fence(__ATOMIC_RELEASE);"
CmmUnsafeForeignCall (PrimTarget MO_AcquireFence) [] [] ->
text "__atomic_thread_fence(__ATOMIC_ACQUIRE);"
CmmUnsafeForeignCall (PrimTarget MO_SeqCstFence) [] [] ->
text "__atomic_thread_fence(__ATOMIC_SEQ_CST);"
CmmUnsafeForeignCall target@(PrimTarget op) results args ->
fn_call
......@@ -959,6 +961,7 @@ pprCallishMachOp_for_C mop
MO_F32_Fabs -> text "fabsf"
MO_AcquireFence -> unsupported
MO_ReleaseFence -> unsupported
MO_SeqCstFence -> unsupported
MO_Memcpy _ -> text "__builtin_memcpy"
MO_Memset _ -> text "__builtin_memset"
MO_Memmove _ -> text "__builtin_memmove"
......
......@@ -180,6 +180,8 @@ genCall (PrimTarget MO_AcquireFence) _ _ = runStmtsDecls $
statement $ Fence False SyncAcquire
genCall (PrimTarget MO_ReleaseFence) _ _ = runStmtsDecls $
statement $ Fence False SyncRelease
genCall (PrimTarget MO_SeqCstFence) _ _ = runStmtsDecls $
statement $ Fence False SyncSeqCst
genCall (PrimTarget MO_Touch) _ _ =
return (nilOL, [])
......@@ -992,8 +994,11 @@ cmmPrimOpFunctions mop = do
-- We support MO_U_Mul2 through ordinary LLVM mul instruction, see the
-- appropriate case of genCall.
MO_U_Mul2 {} -> unsupported
MO_ReleaseFence -> unsupported
MO_AcquireFence -> unsupported
MO_SeqCstFence -> unsupported
MO_Touch -> unsupported
MO_UF_Conv _ -> unsupported
......
......@@ -25,7 +25,7 @@ module GHC.Core (
mkIntLit, mkIntLitWrap,
mkWordLit, mkWordLitWrap,
mkWord8Lit,
mkWord64LitWord64, mkInt64LitInt64,
mkWord32LitWord32, mkWord64LitWord64, mkInt64LitInt64,
mkCharLit, mkStringLit,
mkFloatLit, mkFloatLitFloat,
mkDoubleLit, mkDoubleLitDouble,
......@@ -1901,6 +1901,9 @@ mkWordLitWrap platform w = Lit (mkLitWordWrap platform w)
mkWord8Lit :: Integer -> Expr b
mkWord8Lit w = Lit (mkLitWord8 w)
mkWord32LitWord32 :: Word32 -> Expr b
mkWord32LitWord32 w = Lit (mkLitWord32 (toInteger w))
mkWord64LitWord64 :: Word64 -> Expr b
mkWord64LitWord64 w = Lit (mkLitWord64 (toInteger w))
......
......@@ -34,6 +34,7 @@ where
import GHC.Prelude
import GHC.Platform
import GHC.Float
import GHC.Types.Id.Make ( unboxedUnitExpr )
import GHC.Types.Id
......@@ -657,6 +658,38 @@ primOpRules nm = \case
, removeOp32
, narrowSubsumesAnd WordAndOp Narrow32WordOp 32 ]
CastWord64ToDoubleOp -> mkPrimOpRule nm 1
[ unaryLit $ \_env -> \case
LitNumber _ n
| v <- castWord64ToDouble (fromInteger n)
-- we can't represent those float literals in Core until #18897 is fixed
, not (isNaN v || isInfinite v || isNegativeZero v)
-> Just (mkDoubleLitDouble v)
_ -> Nothing
]
CastWord32ToFloatOp -> mkPrimOpRule nm 1
[ unaryLit $ \_env -> \case
LitNumber _ n
| v <- castWord32ToFloat (fromInteger n)
-- we can't represent those float literals in Core until #18897 is fixed
, not (isNaN v || isInfinite v || isNegativeZero v)
-> Just (mkFloatLitFloat v)
_ -> Nothing
]
CastDoubleToWord64Op -> mkPrimOpRule nm 1
[ unaryLit $ \_env -> \case
LitDouble n -> Just (mkWord64LitWord64 (castDoubleToWord64 (fromRational n)))
_ -> Nothing
]
CastFloatToWord32Op -> mkPrimOpRule nm 1
[ unaryLit $ \_env -> \case
LitFloat n -> Just (mkWord32LitWord32 (castFloatToWord32 (fromRational n)))
_ -> Nothing
]
OrdOp -> mkPrimOpRule nm 1 [ liftLit charToIntLit
, semiInversePrimOp ChrOp ]
ChrOp -> mkPrimOpRule nm 1 [ do [Lit lit] <- getArgs
......
......@@ -254,6 +254,7 @@ import GHC.Utils.Outputable
import GHC.Utils.Misc
import GHC.Utils.Logger
import GHC.Utils.TmpFs
import GHC.Utils.Touch
import qualified GHC.LanguageExtensions as LangExt
......@@ -264,7 +265,6 @@ import qualified GHC.Data.Stream as Stream
import GHC.Data.Stream (Stream)
import GHC.Data.Maybe
import qualified GHC.SysTools
import GHC.SysTools (initSysTools)
import GHC.SysTools.BaseDir (findTopDir)
......@@ -1260,7 +1260,7 @@ hscMaybeWriteIface logger dflags is_simple iface old_iface mod_location = do
-- .hie files.
let hie_file = ml_hie_file mod_location
whenM (doesFileExist hie_file) $
GHC.SysTools.touch logger dflags "Touching hie file" hie_file
GHC.Utils.Touch.touch hie_file
else
-- See Note [Strictness in ModIface]
forceModIface iface
......
......@@ -71,6 +71,7 @@ import System.IO
import GHC.Linker.ExtraObj
import GHC.Linker.Dynamic
import GHC.Utils.Panic
import GHC.Utils.Touch
import GHC.Unit.Module.Env
import GHC.Driver.Env.KnotVars
import GHC.Driver.Config.Finder
......@@ -376,14 +377,10 @@ runAsPhase =
-- | Run the JS Backend postHsc phase.
runJsPhase :: PipeEnv -> HscEnv -> Maybe ModLocation -> FilePath -> IO FilePath
runJsPhase _pipe_env hsc_env _location input_fn = do
let dflags = hsc_dflags hsc_env
let logger = hsc_logger hsc_env
runJsPhase _pipe_env _hsc_env _location input_fn = do
-- The object file is already generated. We only touch it to ensure the
-- timestamp is refreshed, see Note [JS Backend .o file procedure].
touchObjectFile logger dflags input_fn
touchObjectFile input_fn
return input_fn
-- | Deal with foreign JS files (embed them into .o files)
......@@ -551,7 +548,7 @@ runHscBackendPhase pipe_env hsc_env mod_name src_flavour location result = do
-- In the case of hs-boot files, generate a dummy .o-boot
-- stamp file for the benefit of Make
HsBootFile -> touchObjectFile logger dflags o_file
HsBootFile -> touchObjectFile o_file
HsSrcFile -> panic "HscUpdate not relevant for HscSrcFile"
-- MP: I wonder if there are any lurking bugs here because we
......@@ -1141,10 +1138,10 @@ linkDynLibCheck logger tmpfs dflags unit_env o_files dep_units = do
touchObjectFile :: Logger -> DynFlags -> FilePath -> IO ()
touchObjectFile logger dflags path = do
touchObjectFile :: FilePath -> IO ()
touchObjectFile path = do
createDirectoryIfMissing True $ takeDirectory path
GHC.SysTools.touch logger dflags "Touching object file" path
GHC.Utils.Touch.touch path
-- Note [-fPIC for assembler]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -102,7 +102,6 @@ module GHC.Driver.Session (
sPgm_a,
sPgm_l,
sPgm_lm,
sPgm_T,
sPgm_windres,
sPgm_ar,
sPgm_ranlib,
......@@ -136,7 +135,7 @@ module GHC.Driver.Session (
versionedAppDir, versionedFilePath,
extraGccViaCFlags, globalPackageDatabasePath,
pgm_L, pgm_P, pgm_F, pgm_c, pgm_cxx, pgm_cpp, pgm_a, pgm_l, pgm_lm,
pgm_T, pgm_windres, pgm_ar,
pgm_windres, pgm_ar,
pgm_ranlib, pgm_lo, pgm_lc, pgm_las, pgm_i,
opt_L, opt_P, opt_F, opt_c, opt_cxx, opt_a, opt_l, opt_lm, opt_i,
opt_P_signature,
......@@ -405,8 +404,6 @@ pgm_l :: DynFlags -> (String,[Option])
pgm_l dflags = toolSettings_pgm_l $ toolSettings dflags
pgm_lm :: DynFlags -> Maybe (String,[Option])
pgm_lm dflags = toolSettings_pgm_lm $ toolSettings dflags
pgm_T :: DynFlags -> String
pgm_T dflags = toolSettings_pgm_T $ toolSettings dflags
pgm_windres :: DynFlags -> String
pgm_windres dflags = toolSettings_pgm_windres $ toolSettings dflags
pgm_ar :: DynFlags -> String
......
......@@ -54,6 +54,7 @@ import GHC.Types.Name
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Utils.Misc ((<||>))
import Data.Function
import Data.List (sortBy)
......@@ -719,9 +720,52 @@ type instance XXSig GhcPs = DataConCantHappen
type instance XXSig GhcRn = IdSig
type instance XXSig GhcTc = IdSig
type instance XFixitySig (GhcPass p) = NoExtField
type instance XFixitySig GhcPs = NamespaceSpecifier
type instance XFixitySig GhcRn = NamespaceSpecifier
type instance XFixitySig GhcTc = NoExtField
type instance XXFixitySig (GhcPass p) = DataConCantHappen
-- | Optional namespace specifier for fixity signatures,
-- WARNINIG and DEPRECATED pragmas.
--
-- Examples:
--
-- {-# WARNING in "x-partial" data Head "don't use this pattern synonym" #-}
-- -- ↑ DataNamespaceSpecifier
--
-- {-# DEPRECATED type D "This type was deprecated" #-}
-- -- ↑ TypeNamespaceSpecifier
--
-- infixr 6 data $
-- -- ↑ DataNamespaceSpecifier
data NamespaceSpecifier
= NoNamespaceSpecifier
| TypeNamespaceSpecifier (EpToken "type")
| DataNamespaceSpecifier (EpToken "data")
deriving (Eq, Data)
-- | Check if namespace specifiers overlap, i.e. if they are equal or
-- if at least one of them doesn't specify a namespace
overlappingNamespaceSpecifiers :: NamespaceSpecifier -> NamespaceSpecifier -> Bool
overlappingNamespaceSpecifiers NoNamespaceSpecifier _ = True
overlappingNamespaceSpecifiers _ NoNamespaceSpecifier = True
overlappingNamespaceSpecifiers TypeNamespaceSpecifier{} TypeNamespaceSpecifier{} = True
overlappingNamespaceSpecifiers DataNamespaceSpecifier{} DataNamespaceSpecifier{} = True
overlappingNamespaceSpecifiers _ _ = False
-- | Check if namespace is covered by a namespace specifier:
-- * NoNamespaceSpecifier covers both namespaces
-- * TypeNamespaceSpecifier covers the type namespace only
-- * DataNamespaceSpecifier covers the data namespace only
coveredByNamespaceSpecifier :: NamespaceSpecifier -> NameSpace -> Bool
coveredByNamespaceSpecifier NoNamespaceSpecifier = const True
coveredByNamespaceSpecifier TypeNamespaceSpecifier{} = isTcClsNameSpace <||> isTvNameSpace
coveredByNamespaceSpecifier DataNamespaceSpecifier{} = isValNameSpace
instance Outputable NamespaceSpecifier where
ppr NoNamespaceSpecifier = empty
ppr TypeNamespaceSpecifier{} = text "type"
ppr DataNamespaceSpecifier{} = text "data"
-- | A type signature in generated code, notably the code
-- generated for record selectors. We simply record the desired Id
-- itself, replete with its name, type and IdDetails. Otherwise it's
......
......@@ -81,9 +81,8 @@ module GHC.Hs.Decls (
-- ** Document comments
DocDecl(..), LDocDecl, docDeclDoc,
-- ** Deprecations
WarnDecl(..), NamespaceSpecifier(..), LWarnDecl,
WarnDecl(..), LWarnDecl,
WarnDecls(..), LWarnDecls,
overlappingNamespaceSpecifiers, coveredByNamespaceSpecifier,
-- ** Annotations
AnnDecl(..), LAnnDecl,
AnnProvenance(..), annProvenanceName_maybe,
......@@ -121,7 +120,7 @@ import GHC.Types.Name.Set
import GHC.Types.Fixity
-- others:
import GHC.Utils.Misc (count, (<||>))
import GHC.Utils.Misc (count)
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Types.SrcLoc
......@@ -1284,27 +1283,6 @@ type instance XXWarnDecls (GhcPass _) = DataConCantHappen
type instance XWarning (GhcPass _) = (NamespaceSpecifier, [AddEpAnn])
type instance XXWarnDecl (GhcPass _) = DataConCantHappen
data NamespaceSpecifier
= NoNamespaceSpecifier
| TypeNamespaceSpecifier (EpToken "type")
| DataNamespaceSpecifier (EpToken "data")
deriving (Eq, Data)
overlappingNamespaceSpecifiers :: NamespaceSpecifier -> NamespaceSpecifier -> Bool
overlappingNamespaceSpecifiers NoNamespaceSpecifier _ = True
overlappingNamespaceSpecifiers _ NoNamespaceSpecifier = True
overlappingNamespaceSpecifiers TypeNamespaceSpecifier{} TypeNamespaceSpecifier{} = True
overlappingNamespaceSpecifiers DataNamespaceSpecifier{} DataNamespaceSpecifier{} = True
overlappingNamespaceSpecifiers _ _ = False
coveredByNamespaceSpecifier :: NamespaceSpecifier -> NameSpace -> Bool
coveredByNamespaceSpecifier NoNamespaceSpecifier = const True
coveredByNamespaceSpecifier TypeNamespaceSpecifier{} = isTcClsNameSpace <||> isTvNameSpace
coveredByNamespaceSpecifier DataNamespaceSpecifier{} = isValNameSpace
instance Outputable NamespaceSpecifier where
ppr NoNamespaceSpecifier = empty
ppr TypeNamespaceSpecifier{} = text "type"
ppr DataNamespaceSpecifier{} = text "data"
instance OutputableBndrId p
=> Outputable (WarnDecls (GhcPass p)) where
......