This project is mirrored from https://gitlab.haskell.org/ghc/ghc.git. Pull mirroring updated .
  1. 19 Jan, 2022 3 commits
  2. 18 Jan, 2022 7 commits
    • Sergey Vinokurov's avatar
      Improve detection of lld linker · 21510698
      Sergey Vinokurov authored and  Marge Bot's avatar Marge Bot committed
      Newer lld versions may include vendor info in --version output and
      thus the version string may not start with ‘LLD’.
      
      Fixes #20907
      21510698
    • Matthew Pickering's avatar
      Add note about heap invariant · 01254ceb
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Closed #20904
      01254ceb
    • Ben Gamari's avatar
      rts/winio: Fix #18382 · 5a6efd21
      Ben Gamari authored and  Marge Bot's avatar Marge Bot committed
      Here we refactor WinIO's IO completion scheme, squashing a memory leak
      and fixing #18382.
      To fix #18382 we drop the special thread status introduced for IoPort
      blocking, BlockedOnIoCompletion, as well as drop the non-threaded RTS's
      special dead-lock detection logic (which is redundant to the GC's
      deadlock detection logic), as proposed in #20947.
      
      Previously WinIO relied on foreign import ccall "wrapper" to create an
      adjustor thunk which can be attached to the OVERLAPPED structure passed
      to the operating system. It would then use foreign import ccall
      "dynamic" to back out the original continuation from the adjustor. This
      roundtrip is significantly more expensive than the alternative, using a
      StablePtr. Furthermore, the implementation let the adjustor leak,
      meaning that every IO request would leak a page of memory.
      
      Fixes T18382.
      5a6efd21
    • Sebastian Graf's avatar
      Stricten the Strict State monad · 2d205154
      Sebastian Graf authored and  Marge Bot's avatar Marge Bot committed
      I found it weird that most of the combinators weren't actually strict. Making
      `pure` strict in the state should hopefully give Nested CPR an easier time to
      unbox the nested state.
      2d205154
    • Matthew Pickering's avatar
      Add test for using type families with static pointers · 7ec783de
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Issue was reported on #13306
      7ec783de
    • Matthew Pickering's avatar
      Correct type of static forms in hsExprType · 310424d0
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      The simplest way to do this seemed to be to persist the whole type in
      the extension field from the typechecker so that the few relevant places
      
       * Desugaring can work out the return type by splitting this type rather
         than calling `dsExpr` (slightly more efficient).
       * hsExprType can just return the correct type.
       * Zonking has to now zonk the type as well
      
      The other option we considered was wiring in StaticPtr but that is
      actually quite tricky because StaticPtr refers to StaticPtrInfo which
      has field selectors (which we can't easily wire in).
      
      Fixes #20150
      310424d0
    • Jens Petersen's avatar
      hadrian BinaryDist: version ghc in ghciScriptWrapper · 18c797b8
      Jens Petersen authored and  Marge Bot's avatar Marge Bot committed
      like we do for the non-Hadrian wrapper script.
      Otherwise if $bindir/ghc is a different ghc version then versioned ghci will incorrectly run the other ghc version instead.
      (Normally this would only happen if there are parallel ghc versions installed in bindir.)
      All the other wrapper scripts already have versioned executablename
      18c797b8
  3. 17 Jan, 2022 2 commits
  4. 15 Jan, 2022 3 commits
    • Eric Lindblad's avatar
      wikipedia link · 4031ef62
      Eric Lindblad authored
      4031ef62
    • Tamar Christina's avatar
      winio: fix heap corruption and various leaks. · 0dc72395
      Tamar Christina authored and  Marge Bot's avatar Marge Bot committed
      0dc72395
    • Ben Gamari's avatar
      rts: Consolidate RtsSymbols from libc · e2b60be8
      Ben Gamari authored and  Marge Bot's avatar Marge Bot committed
      Previously (9ebda74e) `environ` was
      added to `RtsSymbols` to ensure that environment was correctly
      propagated when statically linking. However, this introduced #20577
      since platforms are inconsistent in whether they provide a prototype for
      `environ`. I fixed this by providing a prototype but while doing so
      dropped symbol-table entry, presumably thinking that it was redundant
      due to the entry in the mingw-specific table.
      
      Here I reintroduce the symbol table entry for `environ` and move libc
      symbols shared by Windows and Linux into a new macro,
      `RTS_LIBC_SYMBOLS`, avoiding this potential confusion.
      e2b60be8
  5. 14 Jan, 2022 5 commits
  6. 13 Jan, 2022 6 commits
  7. 12 Jan, 2022 14 commits
    • Matthew Pickering's avatar
      docs: MonadComprehension desugar using Alternative rather than MonadPlus · 92f3e6e4
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Fixes #20928
      92f3e6e4
    • Matthew Pickering's avatar
      RTTI: Substitute the [rk] skolems into kinds · c2099059
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      (Fixes #10616 and #10617
      
      )
      Co-authored-by: Roland Senn's avatarRoland Senn <rsx@bluewin.ch>
      c2099059
    • Peter Trommler's avatar
      RTS: Remove unused file xxhash.c · 35bea01b
      Peter Trommler authored and  Marge Bot's avatar Marge Bot committed
      35bea01b
    • Greg Steuck's avatar
      Disable keep-cafs{,-fail} tests on OpenBSD · ed39d15c
      Greg Steuck authored and  Marge Bot's avatar Marge Bot committed
      They are likely broken for the same reason as FreeBSD where the tests
      are already disabled.
      ed39d15c
    • Greg Steuck's avatar
      Feed /dev/null into cgrun025 · 7911aaa9
      Greg Steuck authored and  Marge Bot's avatar Marge Bot committed
      The test currently times out waiting for end of stdin in getContents.
      The expected output indicates that nothing should come for the test to
      pass as written. It is unclear how the test was supposed to pass, but
      this looks like a sufficient hack to make it work.
      7911aaa9
    • Greg Steuck's avatar
      Remove from error the parenthesized amount of memory requested · e505dbd3
      Greg Steuck authored and  Marge Bot's avatar Marge Bot committed
      Diagnostics for outofmem test on OpenBSD includes the amount of memory
      that it failed to allocate. This seems like an irrelevant detail that
      could change over time and isn't required for determining if test
      passed.
      
      Typical elided text is '(requested 2148532224 bytes)'
      e505dbd3
    • Matthew Pickering's avatar
      Change assertions in Stats.c to warnings (and introduce WARN macro) · 7ca43a3f
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      ASSERT should be used in situations where something very bad will happen
      later on if a certain invariant doesn't hold. The idea is that IF we
      catch the assertion earlier then it will be easier to work out what's
      going on at that point rather than at some indeterminate point in the
      future of the program.
      
      The assertions in Stats.c do not obey this philsophy and it is quite
      annoying if you are running a debug build (or a ticky compiler) and one
      of these assertions fails right at the end of your program, before the
      ticky report is printed out so you don't get any profiling information.
      
      Given that nothing terrible happens if these assertions are not true, or
      at least the terrible thing will happen in very close proximity to the
      assertion failure, these assertions use the new WARN macro which prints
      the assertion failure to stdout but does not exit the program.
      
      Of course, it would be better to fix these metrics to not trigger the
      assertion in the first place but if they did fail again in the future it
      is frustrating to be bamboozled in this manner.
      
      Fixes #20899
      7ca43a3f
    • Matthew Pickering's avatar
      Enable :seti in a multi component repl · 19b13698
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      Part of #20889
      19b13698
    • Matthew Pickering's avatar
      Use interactive flags when printing expressions in GHCi · 833216a3
      Matthew Pickering authored and  Marge Bot's avatar Marge Bot committed
      The documentation states that the interactive flags should be use for
      any interactive expressions. The interactive flags are used when
      typechecking these expressions but not when printing. The session flags
      (modified by :set) are only used when loading a module.
      
      Fixes #20909
      833216a3
    • Krzysztof Gogolewski's avatar
      warnPprTrace: pass separately the reason · 23d215fc
      Krzysztof Gogolewski authored and  Marge Bot's avatar Marge Bot committed
      This makes it more similar to pprTrace, pprPanic etc.
      23d215fc
    • sheaf's avatar
      TcPlugins: `newWanted` uses the provided `CtLoc` · 49731fed
      sheaf authored and  Marge Bot's avatar Marge Bot committed
      The `GHC.Tc.Plugin.newWanted` function takes a `CtLoc` as an argument,
      but it used to discard the location information, keeping only
      the `CtOrigin`. It would then retrieve the source location from the
      `TcM` environment using `getCtLocM`.
      
      This patch changes this so that `GHC.Tc.Plugin.newWanted` passes on
      the full `CtLoc`. This means that authors of type-checking plugins
      no longer need to manually set the `CtLoc` environment in the `TcM`
      monad if they want to create a new Wanted constraint with the given
      `CtLoc` (in particular, for setting the `SrcSpan` of an emitted
      constraint). This makes the `newWanted` function consistent with
      `newGiven`, which always used the full `CtLoc` instead of using
      the environment.
      
      Fixes #20895
      49731fed
    • sheaf's avatar
      Fix parsing & printing of unboxed sums · 34d8bc24
      sheaf authored and  Marge Bot's avatar Marge Bot committed
      The pretty-printing of partially applied unboxed sums was incorrect,
      as we incorrectly dropped the first half of the arguments, even
      for a partial application such as
      
        (# | #) @IntRep @DoubleRep Int#
      
      which lead to the nonsensical (# DoubleRep | Int# #).
      
      This patch also allows users to write unboxed sum type constructors
      such as
      
        (# | #) :: TYPE r1 -> TYPE r2 -> TYPE (SumRep '[r1,r2]).
      
      Fixes #20858 and #20859.
      34d8bc24
    • sheaf's avatar
      Kind TyCons: require KindSignatures, not DataKinds · addf8e54
      sheaf authored and  Marge Bot's avatar Marge Bot committed
        Uses of a TyCon in a kind signature required users to enable
        DataKinds, which didn't make much sense, e.g. in
      
          type U = Type
          type MyMaybe (a :: U) = MyNothing | MyJust a
      
        Now the DataKinds error is restricted to data constructors;
        the use of kind-level type constructors is instead gated behind
        -XKindSignatures.
      
        This patch also adds a convenience pattern synonym for patching
        on both a TyCon or a TcTyCon stored in a TcTyThing, used in
        tcTyVar and tc_infer_id.
      
        fixes #20873
      addf8e54
    • Greg Steuck's avatar
      Skip T16180 on OpenBSD due to bug #14012 · c6300cb3
      Greg Steuck authored and  Marge Bot's avatar Marge Bot committed
      c6300cb3