Skip to content
Snippets Groups Projects
  1. Jan 23, 2023
  2. Jan 19, 2023
    • Andrei Borzenkov's avatar
      Fix printing of promoted MkSolo datacon (#22785) · 14b5982a
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      Problem: In 2463df2f, the Solo data constructor was renamed to MkSolo,
      and Solo was turned into a pattern synonym for backwards compatibility.
      Since pattern synonyms can not be promoted, the old code that pretty-printed
      promoted single-element tuples started producing ill-typed code:
         t :: Proxy ('Solo Int)
      This fails with "Pattern synonym ‘Solo’ used as a type"
      
      The solution is to track the distinction between type constructors and data
      constructors more carefully when printing single-element tuples.
      14b5982a
    • Ryan Scott's avatar
      Add regression test for #22151 · 154889db
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      Issue #22151 was coincidentally fixed in commit
      aed1974e (`Refactor the treatment of loopy
      superclass dicts`). This adds a regression test to ensure that the issue
      remains fixed.
      
      Fixes #22151.
      154889db
    • Ben Gamari's avatar
      nativeGen/X86: MFENCE is unnecessary for release semantics · f058e367
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      In #22764 a user noticed that a program implementing a simple atomic
      counter via an STRef regressed significantly due to the introduction of
      necessary atomic operations in the MutVar# primops (#22468). This
      regression was caused by a bug in the NCG, which emitted an unnecessary
      MFENCE instruction for a release-ordered atomic write. MFENCE is rather
      only needed to achieve sequentially consistent ordering.
      
      Fixes #22764.
      f058e367
    • Bodigrim's avatar
      ghc-pkg does not have to depend on terminfo · 981ff7c4
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      981ff7c4
    • Bodigrim's avatar
      ghc package does not have to depend on terminfo · 32ab07bf
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      32ab07bf
    • John Ericson's avatar
      Give the RTS it's own configure script · eb5a6b91
      John Ericson authored and Marge Bot's avatar Marge Bot committed
      Currently it doesn't do much anything, we are just trying to introduce
      it without breaking the build. Later, we will move functionality from
      the top-level configure script over to it.
      
      We need to bump Cabal for https://github.com/haskell/cabal/pull/8649; to
      facilitate and existing hack of skipping some configure checks for the
      RTS we now need to skip just *part* not *all* of the "post configure"
      hook, as running the configure script (which we definitely want to do)
      is also implemented as part of the "post configure" hook. But doing this
      requires exposing functionality that wasn't exposed before.
      eb5a6b91
  3. Jan 18, 2023
    • Adam Gundry's avatar
      Move documentation of deferred type error flags out of warnings section · ab0d5cda
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      ab0d5cda
    • Adam Gundry's avatar
      Revise warnings documentation in user's guide · 5389681e
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      5389681e
    • Adam Gundry's avatar
      Minor corrections to comments · 7ed1b8ef
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      7ed1b8ef
    • Adam Gundry's avatar
      Refactor warning flag parsing to add missing flags · d0a63ef8
      Adam Gundry authored and Marge Bot's avatar Marge Bot committed
      This adds `-Werror=<group>` and `-fwarn-<group>` flags for warning
      groups as well as individual warnings. Previously these were defined
      on an ad hoc basis so for example we had `-Werror=compat` but not
      `-Werror=unused-binds`, whereas we had `-fwarn-unused-binds` but not
      `-fwarn-compat`. Fixes #22182.
      d0a63ef8
    • Luite Stegeman's avatar
      Add PrimCallConv support to GHCi · b4c14c4b
      Luite Stegeman authored and Marge Bot's avatar Marge Bot committed
      This adds support for calling Cmm code from bytecode using the native
      calling convention, allowing modules that use `foreign import prim`
      to be loaded and debugged in GHCi.
      
      This patch introduces a new `PRIMCALL` bytecode instruction and
      a helper stack frame `stg_primcall`. The code is based on the
      existing functionality for dealing with unboxed tuples in bytecode,
      which has been generalised to handle arbitrary calls.
      
      Fixes #22051
      b4c14c4b
    • Cheng Shao's avatar
      Fix typo in recent darwin tests fix · c45a5fff
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      Corrects a typo in !9647. Otherwise T18623 will still fail on darwin
      and stall other people's work.
      c45a5fff
    • Ben Gamari's avatar
      Bump gmp-tarballs submodule · b13c6ea5
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This backports the upstream fix for CVE-2021-43618, fixing #22789.
      b13c6ea5
    • Ben Gamari's avatar
      Bump ghc-tarballs to fix #22497 · f891a442
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      It turns out that gmp 6.2.1 uses the platform-reserved `x18` register on
      AArch64/Darwin. This was fixed in upstream changeset 18164:5f32dbc41afc,
      which was merged in 2020. Here I backport this patch although I do hope
      that a new release is forthcoming soon.
      
      Bumps gmp-tarballs submodule.
      
      Fixes #22497.
      f891a442
    • Ryan Scott's avatar
      Add missing parenthesizeHsType in cvtSigTypeKind · 4efee43d
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      We need to ensure that the output of `cvtSigTypeKind` is parenthesized (at
      precedence `sigPrec`) so that any type signatures with an outermost, explicit
      kind signature can parse correctly.
      
      Fixes #22784.
      4efee43d
    • Vladislav Zavialov's avatar
      Enable -Wstar-is-type by default (#22759) · e9c0537c
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Following the plan in GHC Proposal #143 "Remove the * kind syntax",
      which states:
      
      	In the next release (or 3 years in), enable -fwarn-star-is-type by default.
      
      The "next release" happens to be 9.6.1
      
      I also moved the T21583 test case from should_fail to should_compile,
      because the only reason it was failing was -Werror=compat in our test
      suite configuration.
      e9c0537c
    • Krzysztof Gogolewski's avatar
      Use -Wdefault when running Python testdriver (#22727) · ee9b78aa
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      ee9b78aa
    • Sylvain Henry's avatar
      testsuite: req_smp --> req_target_smp, req_ghc_smp · 06036d93
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      See #22630 and !9552
      
      This commit:
       - splits req_smp into req_target_smp and req_ghc_smp
       - changes the testsuite driver to calculate req_ghc_smp
       - changes a handful of tests to use req_target_smp instead of req_smp
       - changes a handful of tests to use req_host_smp when needed
      
      The problem:
       - the problem this solves is the ambiguity surrounding req_smp
       - on master req_smp was used to express the constraint that the program
       being compiled supports smp _and_ that the host RTS (i.e., the RTS used
       to compile the program) supported smp. Normally that is fine, but in
       cross compilation this is not always the case as was discovered in #22630.
      
      The solution:
       - Differentiate the two constraints:
         - use req_target_smp to say the RTS the compiled program is linked
         with (and the platform) supports smp
         - use req_host_smp to say the RTS the host is linked with supports smp
      
      WIP: fix req_smp (target vs ghc)
      
      add flag to separate bootstrapper
      
      split req_smp -> req_target_smp and req_ghc_smp
      
      update tests smp flags
      
      cleanup and add some docstrings
      
      only set ghc_with_smp to bootstrapper on S1 or CC
      
      Only set ghc_with_smp to bootstrapperWithSMP of when testing stage 1
      and cross compiling
      
      test the RTS in config/ghc not hadrian
      
      re-add ghc_with_smp
      
      fix and align req names
      
      fix T11760 to use req_host_smp
      
      test the rts directly, avoid python 3.5 limitation
      
      test the compiler in a try block
      
      align out of tree and in tree withSMP flags
      
      mark failing tests as host req smp
      
      testsuite: req_host_smp --> req_ghc_smp
      
      Fix ghc vs host, fix ghc_with_smp leftover
      06036d93
  4. Jan 17, 2023
    • Vladislav Zavialov's avatar
      Hadrian: fix warnings (#22783) · f4d50baf
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This change fixes the following warnings when building Hadrian:
      
      	src/Hadrian/Expression.hs:38:10: warning: [-Wredundant-constraints]
      	src/Hadrian/Expression.hs:84:13: warning: [-Wtype-equality-requires-operators]
      	src/Hadrian/Expression.hs:84:21: warning: [-Wtype-equality-requires-operators]
      	src/Hadrian/Haskell/Cabal/Parse.hs:67:1: warning: [-Wunused-imports]
      f4d50baf
    • Simon Peyton Jones's avatar
      Document the semantics of pattern bindings a bit better · 003b6d44
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR is in response to the discussion on #22719
      003b6d44
    • vdukhovni's avatar
      Avoid unnecessary printf warnings in EventLog.c · fc02f3bb
      vdukhovni authored and Marge Bot's avatar Marge Bot committed
      Fixes #22778
      fc02f3bb
    • Ben Gamari's avatar
      compiler: Small optimisation of assertM · dbbab95d
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      In #22739 @AndreasK noticed that assertM performed the action to compute
      the asserted predicate regardless of whether DEBUG is enabled. This is
      inconsistent with the other assertion operations and general convention.
      Fix this.
      
      Closes #22739.
      dbbab95d
    • Alan Zimmerman's avatar
      EPA: Add annotation for 'type' in DataDecl · 97ac8230
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      Closes #22765
      97ac8230
    • Bodigrim's avatar
      Bump submodule parsec to 3.1.16.1 · 97bd4d8c
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
      97bd4d8c
    • Matthew Pickering's avatar
      Add scripts to generate ghcup metadata on nightly and release pipelines · eeea59bb
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      1. A python script in .gitlab/rel_eng/mk-ghcup-metadata which generates
         suitable metadata for consumption by GHCUp for the relevant
         pipelines.
      
        - The script generates the metadata just as the ghcup maintainers
          want, without taking into account platform/library combinations. It
          is updated manually when the mapping changes.
      
        - The script downloads the bindists which ghcup wants to distribute,
          calculates the hash and generates the yaml in the correct structure.
      
        - The script is documented in the .gitlab/rel_eng/mk-ghcup-metadata/README.mk file
      
      1a. The script requires us to understand the mapping from platform ->
          job. To choose the preferred bindist for each platform the
          .gitlab/gen_ci.hs script is modified to allow outputting a metadata
          file which answers the question about which job produces the
          bindist which we want to distribute to users for a specific
          platform.
      
      2. Pipelines to run on nightly and release jobs to generate metadata
      
        - ghcup-metadata-nightly: Generates metadata which points directly to
          artifacts in the nightly job.
      
        - ghcup-metadata-release: Generates metadata suitable for inclusion
          directly in ghcup by pointing to the downloads folder where the
          bindist will be uploaded to.
      
      2a. Trigger jobs which test the generated metadata in the downstream
          `ghccup-ci` repo. See that repo for documentation about what is
          tested and how but essentially we test in a variety of clean images
          that ghcup can download and install the bindists we say exist in our
          metadata.
      eeea59bb
    • Matthew Pickering's avatar
      ci: Don't use complicated image or clone in not-interruptible job · 28cb2ed0
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This job exists only for the meta-reason of not allowing nightly
      pipelines to be cancelled. It was taking two minutes to run as in order
      to run "true" we would also clone the whole GHC repo.
      28cb2ed0
    • Matthew Pickering's avatar
      rel_eng: Add release engineering scripts into ghc tree · 0b358d0c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      It is better to keep these scripts in the tree as they depend on the CI
      configuration and so on. By keeping them in tree we can keep them
      up-to-date as the CI config changes and also makes it easier to backport
      changes to the release script between release branches in future.
      
      The final motivation is that it makes generating GHCUp metadata
      possible.
      0b358d0c
    • Matthew Pickering's avatar
      ci: Change owner of files in test-bootstrap job · 8039feb9
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      8039feb9
    • Matthew Pickering's avatar
      ci: Don't build aarch64-deb10-llvm job on release pipelines · 4afb952c
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Closes #22721
      4afb952c
    • Matthew Pickering's avatar
      ci: Change owner of files in source-tarball job · 6a5845fb
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This fixes errors of the form:
      
      ```
      fatal: detected dubious ownership in repository at '/builds/ghc/ghc'
      To add an exception for this directory, call:
      	git config --global --add safe.directory /builds/ghc/ghc
      inferred 9.7.20230113
      checking for GHC Git commit id... fatal: detected dubious ownership in repository at '/builds/ghc/ghc'
      To add an exception for this directory, call:
      	git config --global --add safe.directory /builds/ghc/ghc
      ```
      6a5845fb
    • Matthew Pickering's avatar
      ci: Bump CACHE_REV so that ghc-9.6 branch and HEAD have different caches · 99d151bb
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Having the same CACHE_REV on both branches leads to issues where the
      darwin toolchain is different on ghc-9.6 and HEAD which leads to long
      darwin build times.
      
      In general we should ensure that each branch has a different CACHE_REV.
      99d151bb
    • Andreas Klebinger's avatar
      Mark maximumBy/minimumBy as INLINE. · 6abea760
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      The RHS was too large to inline which often prevented the overhead of the Maybe
      from being optimized away. By marking it as INLINE we can eliminate the
      overhead of both the maybe and are able to unpack the accumulator when
      possible.
      
      Fixes #22609
      6abea760
    • Andreas Klebinger's avatar
      Add regression test for #22611. · 8c7a991c
      Andreas Klebinger authored and Marge Bot's avatar Marge Bot committed
      A case were a function used to fail to specialize, but now does.
      8c7a991c
    • sheaf's avatar
      Hadrian: generalise &%> to avoid warnings · 33b58f77
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch introduces a more general version of &%> that works
      with general traversable shapes, instead of lists. This allows us
      to pass along the information that the length of the list of filepaths
      passed to the function exactly matches the length of the input list
      of filepath patterns, avoiding pattern match warnings.
      
      Fixes #22430
      33b58f77
Loading