Skip to content
Snippets Groups Projects
  1. Jul 23, 2023
    • Vladislav Zavialov's avatar
      Visible forall in types of terms: Part 1 (#22326) · 33b6850a
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This patch implements part 1 of GHC Proposal #281,
      introducing explicit `type` patterns and `type` arguments.
      
      Summary of the changes:
      
      1. New extension flag:
           RequiredTypeArguments
      
      2. New user-facing syntax:
           `type p` patterns    (represented by EmbTyPat)
           `type e` expressions (represented by HsEmbTy)
      
      3. Functions with required type arguments (visible forall)
         can now be defined and applied:
            idv :: forall a -> a -> a    -- signature   (relevant change: checkVdqOK in GHC/Tc/Validity.hs)
            idv (type a) (x :: a) = x    -- definition  (relevant change: tcPats in GHC/Tc/Gen/Pat.hs)
            x = idv (type Int) 42        -- usage       (relevant change: tcInstFun in GHC/Tc/Gen/App.hs)
      
      4. template-haskell support:
            TH.TypeE corresponds to HsEmbTy
            TH.TypeP corresponds to EmbTyPat
      
      5. Test cases and a new User's Guide section
      
      Changes *not* included here are the t2t (term-to-type) transformation
      and term variable capture; those belong to part 2.
      33b6850a
  2. Jul 22, 2023
    • Krzysztof Gogolewski's avatar
      Misc cleanup · a7349217
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      - Remove unused RDR names
      - Fix typos in comments
      - Deriving: simplify boxConTbl and remove unused litConTbl
      - chmod -x GHC/Exts.hs, this seems accidental
      a7349217
    • sheaf's avatar
      Stop marking plugin tests as fragile on Windows · cb9c93d7
      sheaf authored and Marge Bot's avatar Marge Bot committed
      Now that b2bb3e62 has landed we are in a better situation with
      regards to plugins on Windows, allowing us to unmark many plugin tests
      as fragile.
      
      Fixes #16405
      cb9c93d7
    • sheaf's avatar
      Mark plugins-external as broken on Windows · a72015d6
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This test is broken on Windows, so we explicitly mark it as such now
      that we stop skipping plugin tests on Windows.
      a72015d6
    • sheaf's avatar
      RTS: declare setKeepCAFs symbol · 42b05e9b
      sheaf authored and Marge Bot's avatar Marge Bot committed
      Commit 08ba8720 failed to declare the dependency of keepCAFsForGHCi on
      the symbol setKeepCAFs in the RTS, which led to undefined symbol errors
      on Windows, as exhibited by the testcase frontend001.
      
      Thanks to Moritz Angermann and Ryan Scott for the diagnosis and fix.
      
      Fixes #22961
      42b05e9b
    • Matthew Pickering's avatar
      ci: Mention ~full-ci label in MR template · b91bbc2b
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We mention that if you need a full validation pipeline then you can
      apply the ~full-ci label to your MR in order to test against the full
      validation pipeline (like we do for marge).
      b91bbc2b
    • Jens Petersen's avatar
      user_guide/flags.py: python-3.12 no longer includes distutils · 026991d7
      Jens Petersen authored and Marge Bot's avatar Marge Bot committed
      packaging.version seems able to handle this fine
      026991d7
    • Matthew Pickering's avatar
      ci: Enable some more jobs to run in a marge batch · 4876fddc
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      In !10907 I made the majority of jobs not run on a validate pipeline but
      then forgot to renable a select few jobs on the marge batch MR.
      4876fddc
    • sheaf's avatar
      Finish migration of diagnostics in GHC.Tc.Validity · 7e05f6df
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch finishes migrating the error messages in GHC.Tc.Validity
      to use the new diagnostic infrastructure.
      
      It also refactors the error message datatypes for class and family
      instances, to common them up under a single datatype as much as possible.
      7e05f6df
    • Krzysztof Gogolewski's avatar
      Add a test for #23413 · 5ad8d597
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      It was fixed by commit e1590ddc: Add the SolverStage monad.
      5ad8d597
    • Matthew Pickering's avatar
      simplifier: Correct InScopeSet in rule matching · 4f5538a8
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      The in-scope set passedto the `exprIsLambda_maybe` call lacked all the
      in-scope binders. @simonpj suggests this fix where we augment the
      in-scope set with the free variables of expression which fixes this
      failure mode in quite a direct way.
      
      Fixes #23630
      4f5538a8
    • Ilias Tsitsimpis's avatar
      ghc-prim: Link against libatomic · fc186b0c
      Ilias Tsitsimpis authored and Marge Bot's avatar Marge Bot committed
      Commit b4d39adb made 'hs_cmpxchg64()' available to all architectures.
      Unfortunately this made GHC to fail to build on armel, since armel needs
      libatomic to support atomic operations on 64-bit word sizes.
      
      Configure libraries/ghc-prim/ghc-prim.cabal to link against libatomic,
      the same way as we do in rts/rts.cabal.
      fc186b0c
    • Matthew Pickering's avatar
      Allow users to override non-essential haddock options in a Flavour · e4350b41
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      We now supply the non-essential options to haddock using the `extraArgs`
      field, which can be specified in a Flavour so that if an advanced user
      wants to change how documentation is generated then they can use
      something other than the `defaultHaddockExtraArgs`.
      
      This does have the potential to regress some packaging if a user has
      overridden `extraArgs` themselves, because now they also need to add
      the haddock options to extraArgs. This can easily be done by appending
      `defaultHaddockExtraArgs` to their extraArgs invocation but someone
      might not notice this behaviour has changed.
      
      In any case, I think passing the non-essential options in this manner is
      the right thing to do and matches what we do for the "ghc" builder,
      which by default doesn't pass any optmisation levels, and would likewise
      be very bad if someone didn't pass suitable `-O` levels for builds.
      
      Fixes #23625
      e4350b41
    • Ben Gamari's avatar
      testsuite: Elaborate in interface stability README · 87f9bd47
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This discussion didn't make it into the original MR.
      87f9bd47
    • Ben Gamari's avatar
      primops: Introduce unsafeThawByteArray# · c30cea53
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This addresses an odd asymmetry in the ByteArray# primops, which
      previously provided unsafeFreezeByteArray# but no corresponding
      thaw operation.
      
      Closes #22710
      c30cea53
  3. Jul 21, 2023
    • Finley McIlwaine's avatar
      Insert documentation into parsed signature modules · b444c16f
      Finley McIlwaine authored and Marge Bot's avatar Marge Bot committed
      Causes haddock comments in signature modules to be properly
      inserted into the AST (just as they are for regular modules)
      if the `-haddock` flag is given.
      
      Also adds a test that compares `-ddump-parsed-ast` output
      for a signature module to prevent further regressions.
      
      Fixes #23315
      b444c16f
    • Ben Gamari's avatar
      nativeGen: Set explicit section types on all platforms · db7f7240
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      db7f7240
    • Ben Gamari's avatar
      nativeGen: Explicitly set flags of text sections on Windows · 3ece9856
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      The binutils documentation (for COFF) claims,
      
      > If no flags are specified, the default flags depend upon the section
      > name. If the section name is not recognized, the default will be for the
      > section to be loaded and writable.
      
      We previously assumed that this would do the right thing for split
      sections (e.g. a section named `.text$foo` would be correctly inferred
      to be a text section). However, we have observed that this is not the
      case (at least under the clang toolchain used on Windows): when
      split-sections is enabled, text sections are treated by the assembler as
      data (matching the "default" behavior specified by the documentation).
      
      Avoid this by setting section flags explicitly. This should fix split
      sections on Windows.
      
      Fixes #22834.
      3ece9856
  4. Jul 20, 2023
    • Alan Zimmerman's avatar
      EPA: Simplify GHC/Parser.y sL1 · 0b23db03
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      This is the next patch in a series simplifying location management in
      GHC/Parser.y
      
      This one simplifies sL1, to use the HasLoc instances introduced in
      !10743 (closed)
      0b23db03
  5. Jul 19, 2023
  6. Jul 18, 2023
    • Jaro Reinders's avatar
      Add StgFromCore and StgCodeGen linting · 257f1567
      Jaro Reinders authored and Marge Bot's avatar Marge Bot committed
      257f1567
    • Krzysztof Gogolewski's avatar
      Use extended literals when deriving Show · 787bae96
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      This implements GHC proposal
      https://github.com/ghc-proposals/ghc-proposals/pull/596
      
      Also add support for Int64# and Word64#; see testcase ShowPrim.
      787bae96
    • Krzysztof Gogolewski's avatar
      Core Lint: distinguish let and letrec in locations · 00648e5d
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Lint messages were saying "in the body of letrec" even for non-recursive
      let.
      
      I've also renamed BodyOfLetRec to BodyOfLet in stg, since there's no
      separate letrec.
      00648e5d
    • sheaf's avatar
      Do primop rep-poly checks when instantiating · 889c2bbb
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This patch changes how we perform representation-polymorphism checking
      for primops (and other wired-in Ids such as coerce).
      When instantiating the primop, we check whether each type variable
      is required to instantiated to a concrete type, and if so we create a
      new concrete metavariable (a ConcreteTv) instead of a simple MetaTv.
      (A little subtlety is the need to apply the substitution obtained from
      instantiating to the ConcreteTvOrigins, see
      Note [substConcreteTvOrigin] in GHC.Tc.Utils.TcMType.)
      
      This allows us to prevent representation-polymorphism in non-argument
      position, as that is required for some of these primops.
      
      We can also remove the logic in tcRemainingValArgs, except for
      the part concerning representation-polymorphic unlifted newtypes.
      The function has been renamed rejectRepPolyNewtypes; all it does now
      is reject unsaturated occurrences of representation-polymorphic newtype
      constructors when the representation of its argument isn't a concrete
      RuntimeRep (i.e. still a PHASE 1 FixedRuntimeRep check).
      The Note [Eta-expanding rep-poly unlifted newtypes] in GHC.Tc.Gen.Head
      gives more explanation about a possible path to PHASE 2, which would be
      in line with the treatment for primops taken in this patch.
      
      We also update the Core Lint check to handle this new framework. This
      means Core Lint now checks representation-polymorphism in continuation
      position like needed for catch#.
      
      Fixes #21906
      
      -------------------------
      Metric Increase:
          LargeRecord
      -------------------------
      889c2bbb
    • Sylvain Henry's avatar
      JS: better implementation for plusWord64 (#23597) · b55a8ea7
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      b55a8ea7
    • Rodrigo Mesquita's avatar
      Split GHC.Platform.ArchOS from ghc-boot into ghc-platform · ddcdd88c
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Split off the `GHC.Platform.ArchOS` module from the `ghc-boot` package
      into this reinstallable standalone package which abides by the PVP, in
      part motivated by the ongoing work on `ghc-toolchain` towards runtime
      retargetability.
      ddcdd88c
    • sheaf's avatar
      Skip PMC for boring patterns · bea0e323
      sheaf authored and Marge Bot's avatar Marge Bot committed
      Some patterns introduce no new information to the pattern-match
      checker (such as plain variable or wildcard patterns). We can thus
      skip doing any pattern-match checking on them when the sole purpose
      for doing so was introducing new long-distance information.
      
      See Note [Boring patterns] in GHC.Hs.Pat.
      
      Doing this avoids regressing in performance now that we do additional
      pattern-match checking inside do notation.
      bea0e323
Loading