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
Showing
with 111 additions and 80 deletions
......@@ -1425,7 +1425,7 @@ data NegationHandling = ReassociateNegation | KeepNegationIntact
-- | Name of an operator in an operator application or section
data OpName = NormalOp Name -- ^ A normal identifier
| NegateOp -- ^ Prefix negation
| UnboundOp OccName -- ^ An unbound identifier
| UnboundOp RdrName -- ^ An unbound identifier
| RecFldOp (FieldOcc GhcRn) -- ^ A record field occurrence
instance Outputable OpName where
......@@ -1607,7 +1607,7 @@ checkSectionPrec direction section op arg
lookupFixityOp :: OpName -> RnM Fixity
lookupFixityOp (NormalOp n) = lookupFixityRn n
lookupFixityOp NegateOp = lookupFixityRn negateName
lookupFixityOp (UnboundOp u) = lookupFixityRn (mkUnboundName u)
lookupFixityOp (UnboundOp u) = lookupFixityRn (mkUnboundName (occName u))
lookupFixityOp (RecFldOp f) = lookupFieldFixityRn f
......
......@@ -1370,8 +1370,7 @@ badRuleLhsErr name lhs bad_e
err =
case bad_e of
HsUnboundVar _ uv ->
let rdr = mkRdrUnqual uv
in pprScopeError rdr $ notInScopeErr WL_Global (mkRdrUnqual uv)
pprScopeError uv $ notInScopeErr WL_Global uv
_ -> text "Illegal expression:" <+> ppr bad_e
{- **************************************************************
......
......@@ -806,45 +806,35 @@ embedJsFile logger dflags tmpfs unit_env input_fn output_fn = do
-- the header lets the linker recognize processed JavaScript files
-- But don't add JavaScript header to object files!
is_js_obj <- if True
then pure False
else isJsObjectFile input_fn
-- FIXME (Sylvain 2022-09): this call makes the
-- testsuite go into a loop, I don't know why yet!
-- Disabling it for now.
if is_js_obj
then copyWithHeader "" input_fn output_fn
else do
-- header appended to JS files stored as .o to recognize them.
let header = "//JavaScript\n"
jsFileNeedsCpp input_fn >>= \case
False -> copyWithHeader header input_fn output_fn
True -> do
-- append common CPP definitions to the .js file.
-- They define macros that avoid directly wiring zencoded names
-- in RTS JS files
pp_fn <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "js"
payload <- B.readFile input_fn
B.writeFile pp_fn (commonCppDefs profiling <> payload)
-- run CPP on the input JS file
js_fn <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "js"
let
cpp_opts = CppOpts
{ cppUseCc = True
, cppLinePragmas = False -- LINE pragmas aren't JS compatible
}
doCpp logger
tmpfs
dflags
unit_env
cpp_opts
pp_fn
js_fn
-- add header to recognize the object as a JS file
copyWithHeader header js_fn output_fn
-- header appended to JS files stored as .o to recognize them.
let header = "//JavaScript\n"
jsFileNeedsCpp input_fn >>= \case
False -> copyWithHeader header input_fn output_fn
True -> do
-- append common CPP definitions to the .js file.
-- They define macros that avoid directly wiring zencoded names
-- in RTS JS files
pp_fn <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "js"
payload <- B.readFile input_fn
B.writeFile pp_fn (commonCppDefs profiling <> payload)
-- run CPP on the input JS file
js_fn <- newTempName logger tmpfs (tmpDir dflags) TFL_CurrentModule "js"
let
cpp_opts = CppOpts
{ cppUseCc = True
, cppLinePragmas = False -- LINE pragmas aren't JS compatible
}
doCpp logger
tmpfs
dflags
unit_env
cpp_opts
pp_fn
js_fn
-- add header to recognize the object as a JS file
copyWithHeader header js_fn output_fn
jsFileNeedsCpp :: FilePath -> IO Bool
jsFileNeedsCpp fn = do
......
......@@ -1347,7 +1347,7 @@ mkHoleError _ _tidy_simples ctxt hole@(Hole { hole_occ = occ, hole_loc = ct_loc
; let (imp_errs, hints)
= unknownNameSuggestions WL_Anything
dflags hpt curr_mod rdr_env
(tcl_rdr lcl_env) imp_info (mkRdrUnqual occ)
(tcl_rdr lcl_env) imp_info occ
err = SolverReportWithCtxt ctxt (ReportHoleError hole $ OutOfScopeHole imp_errs)
report = SolverReport err [] hints
......
......@@ -3360,14 +3360,14 @@ pprSameOccInfo (SameOcc same_pkg n1 n2) =
**********************************************************************-}
pprHoleError :: SolverReportErrCtxt -> Hole -> HoleError -> SDoc
pprHoleError _ (Hole { hole_ty, hole_occ = occ }) (OutOfScopeHole imp_errs)
pprHoleError _ (Hole { hole_ty, hole_occ = rdr }) (OutOfScopeHole imp_errs)
= out_of_scope_msg $$ vcat (map ppr imp_errs)
where
herald | isDataOcc occ = text "Data constructor not in scope:"
herald | isDataOcc (rdrNameOcc rdr) = text "Data constructor not in scope:"
| otherwise = text "Variable not in scope:"
out_of_scope_msg -- Print v :: ty only if the type has structure
| boring_type = hang herald 2 (ppr occ)
| otherwise = hang herald 2 (pp_occ_with_type occ hole_ty)
| boring_type = hang herald 2 (ppr rdr)
| otherwise = hang herald 2 (pp_rdr_with_type rdr hole_ty)
boring_type = isTyVarTy hole_ty
pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_skol_info) =
vcat [ hole_msg
......@@ -3379,7 +3379,7 @@ pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_sko
hole_msg = case sort of
ExprHole {} ->
hang (text "Found hole:")
2 (pp_occ_with_type hole_occ hole_ty)
2 (pp_rdr_with_type hole_occ hole_ty)
TypeHole ->
hang (text "Found type wildcard" <+> quotes (ppr hole_occ))
2 (text "standing for" <+> quotes pp_hole_type_with_kind)
......@@ -3404,7 +3404,7 @@ pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_sko
-- Coercion variables can be free in the
-- hole, via kind casts
expr_hole_hint -- Give hint for, say, f x = _x
| lengthFS (occNameFS hole_occ) > 1 -- Don't give this hint for plain "_"
| lengthFS (occNameFS (rdrNameOcc hole_occ)) > 1 -- Don't give this hint for plain "_"
= text "Or perhaps" <+> quotes (ppr hole_occ)
<+> text "is mis-spelled, or not in scope"
| otherwise
......@@ -3425,8 +3425,8 @@ pprHoleError ctxt (Hole { hole_ty, hole_occ}) (HoleError sort other_tvs hole_sko
= ppWhenOption sdocPrintExplicitCoercions $
quotes (ppr tv) <+> text "is a coercion variable"
pp_occ_with_type :: OccName -> Type -> SDoc
pp_occ_with_type occ hole_ty = hang (pprPrefixOcc occ) 2 (dcolon <+> pprType hole_ty)
pp_rdr_with_type :: RdrName -> Type -> SDoc
pp_rdr_with_type occ hole_ty = hang (pprPrefixOcc occ) 2 (dcolon <+> pprType hole_ty)
{- *********************************************************************
* *
......
......@@ -124,6 +124,7 @@ import GHC.Data.Bag
import GHC.Utils.Misc
import GHC.Utils.Panic
import GHC.Utils.Constants (debugIsOn)
import GHC.Types.Name.Reader
import Data.Coerce
import Data.Monoid ( Endo(..) )
......@@ -307,7 +308,7 @@ instance Outputable DelayedError where
-- signatures). See Note [Holes].
data Hole
= Hole { hole_sort :: HoleSort -- ^ What flavour of hole is this?
, hole_occ :: OccName -- ^ The name of this hole
, hole_occ :: RdrName -- ^ The name of this hole
, hole_ty :: TcType -- ^ Type to be printed to the user
-- For expression holes: type of expr
-- For type holes: the missing type
......@@ -1233,7 +1234,7 @@ insolubleCt ct
-- | Does this hole represent an "out of scope" error?
-- See Note [Insoluble holes]
isOutOfScopeHole :: Hole -> Bool
isOutOfScopeHole (Hole { hole_occ = occ }) = not (startsWithUnderscore occ)
isOutOfScopeHole (Hole { hole_occ = occ }) = not (startsWithUnderscore (occName occ))
instance Outputable WantedConstraints where
ppr (WC {wc_simple = s, wc_impl = i, wc_errors = e})
......
......@@ -580,7 +580,7 @@ data CtOrigin
PredType CtOrigin RealSrcSpan -- This constraint arising from ...
PredType CtOrigin RealSrcSpan -- and this constraint arising from ...
| ExprHoleOrigin (Maybe OccName) -- from an expression hole
| ExprHoleOrigin (Maybe RdrName) -- from an expression hole
| TypeHoleOrigin OccName -- from a type hole (partial type signature)
| PatCheckOrigin -- normalisation of a type during pattern-match checking
| ListOrigin -- An overloaded list
......
......@@ -1916,7 +1916,7 @@ emitAnonTypeHole :: IsExtraConstraint
emitAnonTypeHole extra_constraints tv
= do { ct_loc <- getCtLocM (TypeHoleOrigin occ) Nothing
; let hole = Hole { hole_sort = sort
, hole_occ = occ
, hole_occ = mkRdrUnqual occ
, hole_ty = mkTyVarTy tv
, hole_loc = ct_loc }
; emitHole hole }
......@@ -1930,7 +1930,7 @@ emitNamedTypeHole (name, tv)
= do { ct_loc <- setSrcSpan (nameSrcSpan name) $
getCtLocM (TypeHoleOrigin occ) Nothing
; let hole = Hole { hole_sort = TypeHole
, hole_occ = occ
, hole_occ = nameRdrName name
, hole_ty = mkTyVarTy tv
, hole_loc = ct_loc }
; emitHole hole }
......
......@@ -153,6 +153,7 @@ import GHC.Utils.Constants (debugIsOn)
import Control.Monad
import GHC.Data.Maybe
import qualified Data.Semigroup as Semi
import GHC.Types.Name.Reader
{-
************************************************************************
......@@ -300,7 +301,7 @@ emitWantedEvVars :: CtOrigin -> [TcPredType] -> TcM [EvVar]
emitWantedEvVars orig = mapM (emitWantedEvVar orig)
-- | Emit a new wanted expression hole
emitNewExprHole :: OccName -- of the hole
emitNewExprHole :: RdrName -- of the hole
-> Type -> TcM HoleExprRef
emitNewExprHole occ ty
= do { u <- newUnique
......
......@@ -64,6 +64,9 @@ module GHC.Types.SrcLoc (
isGoodSrcSpan, isOneLineSpan, isZeroWidthSpan,
containsSpan, isNoSrcSpan,
-- ** Predicates on RealSrcSpan
isPointRealSpan,
-- * StringBuffer locations
BufPos(..),
getBufPos,
......
......@@ -30,7 +30,6 @@ import Language.Haskell.Syntax.Type
import Language.Haskell.Syntax.Binds
-- others:
import GHC.Types.Name (OccName)
import GHC.Types.Fixity (LexicalFixity(Infix), Fixity)
import GHC.Types.SourceText (StringLiteral)
......@@ -44,6 +43,7 @@ import Data.Either
import Data.Eq
import Data.Maybe
import Data.List.NonEmpty ( NonEmpty )
import GHC.Types.Name.Reader
{- Note [RecordDotSyntax field updates]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......@@ -255,7 +255,7 @@ data HsExpr p
-- See Note [Located RdrNames]
| HsUnboundVar (XUnboundVar p)
OccName -- ^ Unbound variable; also used for "holes"
RdrName -- ^ Unbound variable; also used for "holes"
-- (_ or _x).
-- Turned from HsVar to HsUnboundVar by the
-- renamer, when it finds an out-of-scope
......
......@@ -13,7 +13,7 @@ dnl
# see what flags are available. (Better yet, read the documentation!)
#
AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.6], [glasgow-haskell-bugs@haskell.org], [ghc-AC_PACKAGE_VERSION])
AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.7], [glasgow-haskell-bugs@haskell.org], [ghc-AC_PACKAGE_VERSION])
# Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
# to be useful (cf #19058). However, the version must have three components
# (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
......
......@@ -66,7 +66,7 @@ install_bin: install_bin_libdir install_wrappers
endif
install: install_bin install_lib
install: install_docs update_package_db
install: install_man install_docs update_package_db
ActualBinsDir=${ghclibdir}/bin
ifeq "$(RelocatableBuild)" "YES"
......@@ -187,19 +187,30 @@ install_lib: lib/settings
install_docs:
@echo "Copying docs to $(DESTDIR)$(docdir)"
$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
if [ -d doc ]; then \
cd doc; $(FIND) . -type f -exec sh -c \
'$(INSTALL_DIR) "$(DESTDIR)$(docdir)/`dirname $$1`" && $(INSTALL_DATA) "$$1" "$(DESTDIR)$(docdir)/`dirname $$1`"' \
sh '{}' ';'; \
fi
if [ -d docs-utils ]; then \
$(INSTALL_DIR) "$(DESTDIR)$(docdir)/html/libraries/"; \
$(INSTALL_DATA) docs-utils/prologue.txt "$(DESTDIR)$(docdir)/html/libraries/"; \
$(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"; \
fi
MAN_SECTION := 1
MAN_PAGES := doc/users_guide/build-man/ghc.1
.PHONY: install_man
install_man:
if [ -f $(MAN_PAGES) ]; then \
$(INSTALL_DIR) "$(DESTDIR)$(mandir)"; \
$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \
$(INSTALL_MAN) $(INSTALL_OPTS) $(MAN_PAGES) "$(DESTDIR)$(mandir)/man$(MAN_SECTION)"; \
fi
export SHELL
install_wrappers: install_bin_libdir
@echo "Installing wrapper scripts"
......
Subproject commit ce4a8958d327eef90ac64ac3bfdecc130fdb87d9
Subproject commit 5624fd5c8bbce8432cd3c0b0ea92d152a1bba047
......@@ -94,7 +94,8 @@ module Control.Exception.Base (
finally,
-- * Calls for GHC runtime
recSelError, recConError, runtimeError,
recSelError, recConError,
impossibleError, impossibleConstraintError,
nonExhaustiveGuardsError, patError, noMethodBindingError,
typeError,
nonTermination, nestedAtomically, noMatchingContinuationPrompt,
......@@ -409,21 +410,25 @@ instance Exception NoMatchingContinuationPrompt
-----
-- See Note [Compiler error functions] in ghc-prim:GHC.Prim.Panic
recSelError, recConError, runtimeError,
nonExhaustiveGuardsError, patError, noMethodBindingError,
typeError
recSelError, recConError, typeError,
nonExhaustiveGuardsError, patError, noMethodBindingError
:: Addr# -> a -- All take a UTF8-encoded C string
recSelError s = throw (RecSelError ("No match in record selector "
++ unpackCStringUtf8# s)) -- No location info unfortunately
runtimeError s = errorWithoutStackTrace (unpackCStringUtf8# s) -- No location info unfortunately
nonExhaustiveGuardsError s = throw (PatternMatchFail (untangle s "Non-exhaustive guards in"))
recConError s = throw (RecConError (untangle s "Missing field in record construction"))
noMethodBindingError s = throw (NoMethodError (untangle s "No instance nor default method for class operation"))
patError s = throw (PatternMatchFail (untangle s "Non-exhaustive patterns in"))
typeError s = throw (TypeError (unpackCStringUtf8# s))
impossibleError, impossibleConstraintError :: Addr# -> a
-- These two are used for impossible case alternatives, and lack location info
impossibleError s = errorWithoutStackTrace (unpackCStringUtf8# s)
impossibleConstraintError s = errorWithoutStackTrace (unpackCStringUtf8# s)
-- GHC's RTS calls this
nonTermination :: SomeException
nonTermination = toException NonTermination
......
......@@ -50,7 +50,7 @@ import System.Posix.Types (Fd)
import Foreign.C.Error (throwErrnoIfMinus1, eBADF)
import Foreign.C.Types (CULLong(..))
#else
import Foreign.C.Error (eAGAIN, eWOULDBLOCK)
import Foreign.C.Error (eAGAIN, eWOULDBLOCK, eBADF)
#endif
data ControlMessage = CMsgWakeup
......@@ -211,8 +211,15 @@ sendWakeup c = do
_ | n /= -1 -> return ()
| otherwise -> do
errno <- getErrno
when (errno /= eAGAIN && errno /= eWOULDBLOCK) $
throwErrno "sendWakeup"
isDead <- readIORef (controlIsDead c)
case () of
_ -- Someone else has beat us to waking it up
| errno == eAGAIN -> return ()
| errno == eWOULDBLOCK -> return ()
-- we are shutting down
| errno == eBADF && isDead -> return ()
-- something bad happened
| otherwise -> throwErrno "sendWakeup"
#endif
sendDie :: Control -> IO ()
......
......@@ -111,9 +111,9 @@ absentConstraintError :: forall (a :: Type). Addr# -> a
-- We want to give this the type
-- forall (a :: Constraint). Addr# -> a
-- but Haskell source code doesn't allow functions that return Constraint
-- Fortunately, absentConstraintError is a wired-in Id with the above
-- desired type. So the only purpose of this definition is to give a
-- function to call. And for that purpose, absentError will do fine.
-- It's fine to lie about about the type; it is not looked at
-- because absentConstraintError is wired-in.
-- So in this module we lie about the type. This is fine because
-- absentConstraintError is a wired-in Id with the desired Constraint-kinded
-- type; the type in the interface file is never looked at.
-- The only purpose of this definition is to give a function to call,
-- and for that purpose, delegating to absentError is fine.
absentConstraintError errmsg = absentError errmsg
......@@ -21,6 +21,13 @@
- The `threadLabel#` primop was added, allowing the user to query the label of
a given `ThreadId#`.
- `isByteArrayPinned#` now only considers an array pinned if it was explicitly pinned
by the user. This is required to avoid ghc issue [#22255](https://gitlab.haskell.org/ghc/ghc/-/issues/22255)
which showed that the old behaviour could cause segfaults when used in combination
with compact regions.
We are working on ways to allow users and library authors to get back the
performance benefits of the old behaviour where possible.
## 0.9.0 *August 2022*
- Shipped with GHC 9.4.1
......
......@@ -1807,6 +1807,10 @@ mkNameU s u = Name (mkOccName s) (NameU u)
mkNameL :: String -> Uniq -> Name
mkNameL s u = Name (mkOccName s) (NameL u)
-- | Only used internally
mkNameQ :: String -> String -> Name
mkNameQ mn occ = Name (mkOccName occ) (NameQ (mkModName mn))
-- | Used for 'x etc, but not available to the programmer
mkNameG :: NameSpace -> String -> String -> String -> Name
mkNameG ns pkg modu occ
......
......@@ -209,7 +209,10 @@ stg_isByteArrayPinnedzh ( gcptr ba )
// See the comment in Storage.c:allocatePinned.
// We also consider BF_COMPACT objects to be immovable. See #14900.
flags = TO_W_(bdescr_flags(bd));
return (flags & (BF_PINNED | BF_LARGE | BF_COMPACT) != 0);
// We used to also consider BF_LARGE pinned, but stopped doing so
// because it interacted badly with compact regions. See #22255
return (flags & BF_PINNED != 0);
}
stg_isMutableByteArrayPinnedzh ( gcptr mba )
......