Skip to content
Snippets Groups Projects
  1. Jan 07, 2024
  2. Jan 05, 2024
    • Krzysztof Gogolewski's avatar
      VoidRep-related refactor · 90ea574e
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      * In GHC.StgToByteCode, replace bcIdPrimId with idPrimRep,
        bcIdArgRep with idArgRep, atomPrimRep with stgArgRep1.
        All of them were duplicates.
      * In GHC.Stg.Unarise, we were converting a PrimRep to a Type and back to
        PrimRep. Remove the calls to primRepToType and typePrimRep1 which cancel out.
      * In GHC.STG.Lint, GHC.StgToCmm, GHC.Types.RepType we were filtering out
        VoidRep from the result of typePrimRep. But typePrimRep never returns
        VoidRep - remove the filtering.
      90ea574e
    • Krzysztof Gogolewski's avatar
      Fix VoidRep handling in ghci debugger · 67dbcc0a
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      'go' inside extractSubTerms was giving a bad result given a VoidRep,
      attempting to round towards the next multiple of 0.
      I don't understand much about the debugger but the code should be better
      than it was.
      
      Fixes #24306
      67dbcc0a
  3. Jan 04, 2024
  4. Jan 01, 2024
  5. Dec 31, 2023
  6. Dec 29, 2023
  7. Dec 25, 2023
  8. Dec 24, 2023
  9. Dec 23, 2023
  10. Dec 21, 2023
    • Matthew Pickering's avatar
      hadrian: Build all executables in bin/ folder · f7e21fab
      Matthew Pickering authored
      In the end the bindist creation logic copies them all into the bin
      folder. There is no benefit to building a specific few binaries in the
      lib/bin folder anymore.
      
      This also removes the ad-hoc logic to copy the touchy and unlit
      executables from stage0 into stage1. It takes <1s to build so we might
      as well just build it.
      f7e21fab
  11. Dec 20, 2023
    • Vladislav Zavialov's avatar
      docs: Fix link to 051-ghc-base-libraries.rst · f4b53538
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      The proposal is no longer available at the previous URL.
      f4b53538
    • Ben Gamari's avatar
      Fix thunk update ordering · 9a52ae46
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      Previously we attempted to ensure soundness of concurrent thunk update
      by synchronizing on the access of the thunk's info table pointer field.
      This was believed to be sufficient since the indirectee (which may
      expose a closure allocated by another core) would not be examined
      until the info table pointer update is complete.
      
      However, it turns out that this can result in data races in the presence
      of multiple threads racing a update a single thunk. For instance,
      consider this interleaving under the old scheme:
      
                  Thread A                             Thread B
                  ---------                            ---------
          t=0     Enter t
            1     Push update frame
            2     Begin evaluation
      
            4     Pause thread
            5     t.indirectee=tso
            6     Release t.info=BLACKHOLE
      
            7     ... (e.g. GC)
      
            8     Resume thread
            9     Finish evaluation
            10    Relaxed t.indirectee=x
      
            11                                         Load t.info
            12  ...
      9a52ae46
  12. Dec 15, 2023
  13. Dec 14, 2023
  14. Dec 13, 2023
  15. Dec 12, 2023
  16. Dec 11, 2023
    • Arnaud Spiwack's avatar
      Linear let and where bindings · 8e0446df
      Arnaud Spiwack authored
      For expediency, the initial implementation of linear types in GHC
      made it so that let and where binders would always be considered
      unrestricted. This was rather unpleasant, and probably a big obstacle
      to adoption. At any rate, this was not how the proposal was designed.
      
      This patch fixes this infelicity. It was surprisingly difficult to
      build, which explains, in part, why it took so long to materialise.
      
      As of this patch, let or where bindings marked with %1 will be
      linear (respectively %p for an arbitrary multiplicity p). Unmarked let
      will infer their multiplicity.
      
      Here is a prototypical example of program that used to be rejected and
      is accepted with this patch:
      
      ```haskell
      f :: A %1 -> B
      g :: B %1 -> C
      
      h :: A %1 -> C
      h x = g y
        where
          y = f x
      ```
      
      Exceptions:
      - Recursive let are unrestricted, as there isn't a clear semantics of
        what a linear recursive binding would be.
      - Destructive lets with lazy bindings are unrestricted, as their
        desugaring isn't linear (see also #23461).
      - (Strict) destructive lets with inferred polymorphic type are
        unrestricted. Because the desugaring isn't linear (See #18461
        down-thread).
      
      Closes #18461 and #18739
      
      Co-authored-by: @jackohughes
      8e0446df
Loading