Skip to content
Snippets Groups Projects
  1. Oct 17, 2024
    • Cheng Shao's avatar
      ci: update wasm jobs configuration · 5043507c
      Cheng Shao authored
      This commit bumps ci-image revision to use updated wasm toolchain, and
      use host_fully_static instead of fully_static for wasm jobs so to
      ensure wasm shared libraries can be properly built.
      5043507c
    • Cheng Shao's avatar
      hadrian: add the host_fully_static flavour transformer · b45080a3
      Cheng Shao authored
      This commit adds the host_fully_static flavour transformer to hadrian,
      which ensures stage0 is fully statically linked while still permitting
      stage1 libdir to contain shared libraries. This is intended to be used
      by the wasm backend to build portable linux bindists that contain wasm
      shared libraries.
      b45080a3
    • Cheng Shao's avatar
      hadrian: re-enable PIC for gmp on wasm · 775410fd
      Cheng Shao authored
      This commit re-enables --with-pic=yes configuration option of gmp when
      building for wasm, given we're about to include support for shared
      libraries, TH and ghci.
      775410fd
    • Cheng Shao's avatar
      hadrian: fix CFLAGS for gmp shared objs on wasm · c247f2ee
      Cheng Shao authored
      This commit adds -fvisibility=default to CFLAGS of gmp when building
      for wasm. This is required to generate the ghc-bignum shared library
      without linking errors. Clang defaults to -fvisibility=hidden for wasm
      targets, which will cause issues when a symbol is expected to be
      exported in a shared library but without explicit visibility attribute
      annotation.
      c247f2ee
    • Cheng Shao's avatar
      hadrian: enable internal-interpreter for ghc-bin stage0 · 577c1819
      Cheng Shao authored
      This commit enables internal-interpreter flag for ghc-bin even when
      compiling stage0, as long as target supports ghci. It enables ghci
      functionality for cross targets that support ghci, since cross ghc-bin
      is really stage0.
      577c1819
    • Cheng Shao's avatar
      hadrian: disable internal-interpreter of ghc library when cross compiling · f232c872
      Cheng Shao authored
      This commit disable the internal-interpreter flag of ghc library when
      cross compiling, only external interpreter works in such cases.
      f232c872
    • Cheng Shao's avatar
      hadrian: use targetSupportsRPaths predicate · a6a82cdb
      Cheng Shao authored
      This commit changes the hostSupportsRPaths predicate to
      targetSupportsRPaths and use that to decide whether to pass
      RPATH-related link-time options. It's not applied to stage0, we should
      just use the default link-time options of stageBoot ghc.
      a6a82cdb
    • Cheng Shao's avatar
      rts: fix conflicting StgRun definitions on wasm · bef94bde
      Cheng Shao authored
      This commit fixes conflicting StgRun definition when building dynamic
      ways of RTS for wasm in unregisterised mode.
      bef94bde
    • Cheng Shao's avatar
      rts: don't build predefined GloblRegs for wasm PIC mode · 98a32ec5
      Cheng Shao authored
      This commit wraps the predefined GlobalRegs in Wasm.S under a CPP
      guard to prevent building for PIC mode. When building dynamic ways of
      RTS, the wasm globals that represent STG GlobalRegs will be created
      and supplied by dyld.mjs. The current wasm dylink convention doesn't
      properly support exporting relocatable wasm globals at all, any wasm
      global exported by a .so is assumed to be a GOT.mem entry.
      98a32ec5
    • Cheng Shao's avatar
      rts: drop interpretBCO support from non-dyn ways on wasm · 90a35c41
      Cheng Shao authored
      This commit drops interpretBCO support from non dynamic rts ways on
      wasm. The bytecode interpreter is only useful when the RTS linker also
      works, and on wasm it only works for dynamic ways anyway. An
      additional benefit of dropping interpretBCO is reduction in code size
      of linked wasm modules, especially since interpretBCO references
      ffi_call which is an auto-generated large function in libffi-wasm and
      unused by most user applications.
      90a35c41
    • Cheng Shao's avatar
      rts: correct stale link in comment · 0d0a16a8
      Cheng Shao authored
      0d0a16a8
    • Cheng Shao's avatar
      rts: add __wrapped_freeJSVal · 33d9db17
      Cheng Shao authored
      This commit wraps imported freeJSVal in a __wrapped_freeJSVal C
      function for wasm backend RTS. In general, wasm imports are only
      supposed to be directly called by C; they shouldn't be used as
      function pointers, which confuses wasm-ld at link-time when generating
      shared libraries.
      33d9db17
    • Cheng Shao's avatar
      rts: rename prelude.js to prelude.mjs · 71a471e7
      Cheng Shao authored
      This commit renames prelude.js to prelude.mjs for wasm backend rts
      jsbits, and slightly adjusts the jsbits contents. This is for
      preparing the implementation of dyld.mjs that contains wasm dynamic
      linker logic, which needs to import prelude.mjs as a proper ESM
      module.
      71a471e7
    • Cheng Shao's avatar
      ghc-internal: add missing CPPs for wasm · a998f69d
      Cheng Shao authored
      This patch adds some missing CPP guards to ghc-internal, given those
      functions are non existent on wasm and would cause linking issues.
      a998f69d
    • Cheng Shao's avatar
      ghci: use plain malloc for mkConInfoTable on non-TNTC platforms · 839ac52e
      Cheng Shao authored
      This patch avoids using mmap() to allocate executable memory for
      mkConInfoTable on platforms without tables-next-to-code, see added
      comment for explanation.
      839ac52e
    • Cheng Shao's avatar
      ghci: mitigate host/target word size mismatch in BCOByteArray serialization · 90891962
      Cheng Shao authored
      This patch mitigates a severe host/target word size mismatch issue in
      BCOByteArray serialization logic introduced since !12142, see added
      note for detailed explanation.
      90891962
    • Bodigrim's avatar
      documentation: more examples for Control.Category · 076c1a10
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      076c1a10
    • Daan Rijks's avatar
      Expand the haddocks for Control.Category · fbbbd010
      Daan Rijks authored and Marge Bot's avatar Marge Bot committed
      fbbbd010
    • Alan Zimmerman's avatar
      EPA: Remove [AddEpAnn] commit 3 · 5f67db48
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      EPA: Remove [AddEpAnn] from HsDocTy
      
      EPA: Remove [AddEpAnn] from HsBangTy
      
      EPA: Remove [AddEpAnn] from HsExplicitListTy
      
      EPA: Remove [AddEpAnn] from HsExplicitTupleTy
      
      EPA: Remove [AddEpAnn] from HsTypedBracket
      
      EPA: Remove [AddEpAnn] from HsUntypedBracket
      
      EPA: Remove [AddEpAnn] from PatBuilderOpApp
      
      EPA: break out 'EpToken "|"' from ClassDecl anns
      
      EPA: Remove [AddEpAnn] from ClassDecl
      
      EPA: Remove [AddEpAnn] from SynDecl
      5f67db48
  2. Oct 16, 2024
  3. Oct 15, 2024
    • Hassan Al-Awwadi's avatar
      Changed import from Ghc. module to L.H.S module · e59fe5c6
      Hassan Al-Awwadi authored
      Progresses #21592
      
      For some reason we still imported GHC.Types.Fixity when the definitino of Fixity and LexicalFixity have already been moved to Language.Haskell.Syntax.Basic. This fixes that for
      e59fe5c6
    • ARATA Mizuki's avatar
      LLVM backend: Use correct rounding for Float literals · 55b83587
      ARATA Mizuki authored and Marge Bot's avatar Marge Bot committed
      Fixes #22033
      55b83587
    • Ben Gamari's avatar
      users-guide: Document field coalescence · edeafc14
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      edeafc14
    • Simon Peyton Jones's avatar
      Add -Werror=-Wno-error=incomplete-record-selectors to hadrian-multi · 6a067226
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      In the main MR, -Wall now includes -Wincomplete-record-selectors.
      However `hadrian-multi` has many, many warnings about incomplete
      record selectors, so this patch stops those warnings being treated
      as errors.  (See discussion on !13308.)
      
      A better fix would be to remove the use of incomplete record
      selectors, since each of them represents a potential crash.
      6a067226
    • Simon Peyton Jones's avatar
      Elmininate incomplete record selectors · ae7bc08e
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This patch is a pure refactor of GHC's source code, to avoid the use
      of partial record selectors.  It was provoked by adding
      -Wincomplete-record-selectors to -Wall (as the GHC Proposal specified),
      which in turn showed up lots of places where GHC was using incomplete
      record selectors.
      
      This patch does mostly-simple refactoring to make it clear to the pattern
      match checker that there is in fact no partiality.
      
      There is one externally-visible change: I changed the data type HoleFit
      to split out the two cases
      
        data HoleFit = TcHoleFit  TcHoleFit | RawHoleFit SDoc
        data TcHoleFit = HoleFit { ...lots of fields }
      
      There are large swathes of code that just deal with `TcHoleFit`, and
      having it as a separate data types makes it apparent that `RawHoleFit`
      can't occur.
      
      This makes it much better -- but the change is visible in the
      HolePlugin interface.  I decided that there are so few clients of this
      API that it's worth the change.
      
      I moved several functions from Language.Haskell.Syntax to GHC.Hs.
      Reason, when instantiated at (GhcPass _), the extension data construtcor
      is guaranteed unused, and that justifies omitted patterns in these
      functions.  By putting them in GHC.Hs.X I can specialise the type for
      (GhcPass _) and thereby make the function total.
      
      An interesting side-light is that there were a few local function
      definitions without a type signature, like this one in GHC.Parser.Header
           convImport (L _ i) = (ideclPkgQual i, reLoc $ ideclName i)
      This is fully closed, and so is generalised; but that generalises
      it to any old pass, not (GhcPass _), so GHC rightly complains about the
      use of the selector `ideclPkgQual`.  I added a type signature to `i`, thus
           convImport (L _ (i::ImportDecl GhcPs))
               = (ideclPkgQual i, reLoc $ ideclName i)
      which specialised the function enough to make the record selector complete.
      Quite a surprising consequence of local let-generalisation!
      ae7bc08e
    • Sebastian Graf's avatar
      Desugaring, plus -Wincomplete-record-selectors · 81a570bf
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      This commit does several related things:
      
      * Major refactor of the handling of applications in the desugarer.
        Now all applications are handled in `dsApp`, `ds_app` and related
        functions.  This dramatically simplifies the code and removes
        complicated cruft that had accumulated.  Hooray.
      
        Fixes #25281.
      
      * Improve the handling of -Wincomplete-record-selectors.
      
        We now incorporate the result type of unsaturated record selector
        applications as well as consider long-distance information in
        getField applications.
      
        Plus, the implmentation now builds the improved `dsApp` stuff
        above, so it is much easier to understand.
      
        Plus, incorporates improved error message wording suggested
        by Adam Gundry in !12685.
      
        Fixes #24824, #24891
      
        See the long Note [Detecting incomplete record selectors]
      
      * Add -Wincomplete-record-selectors to -Wall, as specified in
        GHC Proposal 516.
      
        To do this, I also had to add -Wno-incomplete-record-selectors
        to the build flags for Cabal in GHC's CI.  See
        hadrian/src/Settings/Warnings.hs.  We can remove this when
        Cabal is updated so that it doesn't trigger the warning:
        https://github.com/haskell/cabal/issues/10402
      
      2.6% decrease in compile time allocation in RecordUpPerf
      
      Metric Decrease:
          RecordUpdPerf
      81a570bf
  4. Oct 14, 2024
    • Alan Zimmerman's avatar
      EPA: Remove [AddEpAnn] from IE, Pat and some Tys · e9cc4699
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      EPA: Remove [AddEpAnn] from LazyPat
      
      EPA: Remove [AddEpAnn] from RecordCon/RecordUpd/ConPat
      
      EPA: Remove [AddEpAnn] from HsFieldBind
      
      EPA: Remove [AddEpAnn] from PatSynBind
      
      EPA: Remove [AddEpAnn] from IPBind
      
      EPA: Remove [AddEpAnn] from FixSig
      
      EPA: Remove [AddEpAnn] from activation rules
      
      EPA: Remove [AddEpann] from SpecInstSig
      
      EPA: Remove [AddEpAnn] from MinimalSig
      
      EPA: Remove [AddEpAnn] from SCCFunSig
      
      EPA: Remove [AddEpAnn] from CompleteMatchSig
      
      EPA: Remove [AddEpAnn] from AnnSig, as used in PatSynSig, ClassOpSig, TypeSig
      
      EPA: Remove [AddEpAnn] from IEThingAbs
      
      EPA: Remove [AddEpAnn] from IEThingAll / IEThingWith
      
      EPA: Remove [AddEpAnn] from IEModuleContents
      
      EPA: Remove [AddEpAnn] from HsOpTy
      
      EPA: Remove [AddEpAnn] for various binders
      
      EPA: Remove [AddEpAnn] for HsIParamTy
      e9cc4699
    • Ben Gamari's avatar
      users-guide: Document GHCi :where command · 745dd590
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Resolve #24509.
      745dd590
  5. Oct 12, 2024
Loading