Skip to content
Snippets Groups Projects
  1. Nov 15, 2023
    • Rodrigo Mesquita's avatar
      testsuite: Update to LC_ALL=C no longer being ignored in darwin · ce7fe5a9
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      MacOS seems to have fixed an issue where it used to ignore the variable
      `LC_ALL` in program invocations and default to using Unicode.
      
      Since the behaviour seems to be fixed to account for the locale
      variable, we mark tests that were previously broken in spite of it as
      fragile (since they now pass in recent macOS distributions)
      
      See #24161
      ce7fe5a9
    • Rodrigo Mesquita's avatar
      testsuite: Encoding test witnesses recent iconv bug is fragile · c411c431
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      A regression in the new iconv() distributed with XCode 15 and MacOS
      Sonoma causes the test 'encoding004' to fail in the CP936 roundrip.
      
      We mark this test as fragile until this is fixed upstream (rather than
      broken, since previous versions of iconv pass the test)
      
      See #24161
      c411c431
    • Rodrigo Mesquita's avatar
      Suppress duplicate librares linker warning of new macOS linker · e98051a5
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      Fixes #24167
      
      XCode 15 introduced a new linker which warns on duplicate libraries being
      linked. To disable this warning, we pass -Wl,-no_warn_duplicate_libraries as
      suggested by Brad King in CMake issue #25297.
      
      This flag isn't necessarily available to other linkers on darwin, so we must
      only configure it into the CC linker arguments if valid.
      e98051a5
  2. Nov 13, 2023
  3. Nov 12, 2023
    • Alan Zimmerman's avatar
      EPA: get rid of AnchorOperation · a7492048
      Alan Zimmerman authored
      Now that the Anchor type is an alias for EpaLocation, remove
      AnchorOperation.
      
      Updates haddock submodule
      a7492048
    • Alan Zimmerman's avatar
      EPA: Replace Anchor with EpaLocation · 3f0036ec
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      An Anchor has a location and an operation, which is either that it is
      unchanged or that it has moved with a DeltaPos
      
          data Anchor = Anchor { anchor :: RealSrcSpan
                               , anchor_op :: AnchorOperation }
      
      An EpaLocation also has either a location or a DeltaPos
      
          data EpaLocation = EpaSpan !RealSrcSpan !(Strict.Maybe BufSpan)
                           | EpaDelta !DeltaPos ![LEpaComment]
      
      Now that we do not care about always having a location in the anchor,
      we remove Anchor and replace it with EpaLocation
      
      We do this with a type alias initially, to ease the transition.
      The alias will be removed in time.
      
      We also have helpers to reconstruct the AnchorOperation from an
      EpaLocation. This is also temporary.
      
      Updates Haddock submodule
      3f0036ec
    • Teo Camarasu's avatar
      nofib: bump submodule · 7ae517a0
      Teo Camarasu authored and Marge Bot's avatar Marge Bot committed
      This includes changes that:
      - fix building a benchmark with HEAD
      - remove a Makefile-ism that causes errors in bash scripts
      
      Resolves #24178
      7ae517a0
  4. Nov 11, 2023
  5. Nov 10, 2023
    • Simon Peyton Jones's avatar
      Add an extra check in kcCheckDeclHeader_sig · 6dbab180
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      Fix #24083 by checking for a implicitly-scoped type variable that is not
      actually bound.  See Note [Disconnected type variables] in GHC.Tc.Gen.HsType
      
      For some reason, on aarch64-darwin we saw a 2.8% decrease in compiler
      allocations for MultiLayerModulesTH_Make; but 0.0% on other architectures.
      
      Metric Decrease:
          MultiLayerModulesTH_Make
      6dbab180
    • PHO's avatar
      Use '[' instead of '[[' because the latter is a Bash-ism · 7233b3b1
      PHO authored and Marge Bot's avatar Marge Bot committed
      It doesn't work on platforms where /bin/sh is something other than Bash.
      7233b3b1
    • PHO's avatar
      Don't assume the current locale is *.UTF-8, set the encoding explicitly · 52c0fc69
      PHO authored and Marge Bot's avatar Marge Bot committed
      primops.txt contains Unicode characters:
      > LC_ALL=C ./genprimopcode --data-decl < ./primops.txt
      > genprimopcode: <stdin>: hGetContents: invalid argument (cannot decode byte sequence starting from 226)
      
      Hadrian must also avoid using readFile' to read primops.txt because it
      tries to decode the file with a locale-specific encoding.
      52c0fc69
  6. Nov 09, 2023
  7. Nov 07, 2023
  8. Nov 06, 2023
  9. Nov 05, 2023
  10. Nov 03, 2023
    • Vladislav Zavialov's avatar
      T2T in Expressions (#23738) · 0dfb1fa7
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This patch implements the T2T (term-to-type) transformation in
      expressions. Given a function with a required type argument
      	vfun :: forall a -> ...
      
      the user can now call it as
      	vfun (Maybe Int)
      
      instead of
      	vfun (type (Maybe Int))
      
      The Maybe Int argument is parsed and renamed as a term (HsExpr), but then
      undergoes a conversion to a type (HsType).
      See the new function expr_to_type in compiler/GHC/Tc/Gen/App.hs
      and Note [RequiredTypeArguments and the T2T mapping]
      
      Left as future work: checking for puns.
      0dfb1fa7
    • Jaro Reinders's avatar
      Add NCG support for common 64bit operations to the x86 backend. · 6755d833
      Jaro Reinders authored and Andreas Klebinger's avatar Andreas Klebinger committed
      These used to be implemented via C calls which was obviously quite bad
      for performance for operations like simple addition.
      
      Co-authored-by: Andreas Klebinger
      6755d833
  11. Nov 02, 2023
    • Matthew Pickering's avatar
      Compatibility with 9.8.1 as boot compiler · ef3d20f8
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This fixes several compatability issues when using 9.8.1 as the boot
      compiler.
      
      * An incorrect version guard on the stack decoding logic in ghc-heap
      * Some ghc-prim bounds need relaxing
      * ghc is no longer wired in, so we have to remove the -this-unit-id ghc
        call.
      
      Fixes #24077
      ef3d20f8
    • Matthew Pickering's avatar
      ci: Add 9.8.1 bootstrap testing job · 00b9b8d3
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      00b9b8d3
    • Matthew Pickering's avatar
      hadrian: Update bootstrap plans (9.4.6, 9.4.7, 9.6.2, 9.6.3, 9.8.1) · 362cc693
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Updating the bootstrap plans with more recent GHC versions.
      362cc693
    • Rodrigo Mesquita's avatar
      Fix in docs regarding SSymbol, SNat, SChar (#24119) · 03e82511
      Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
      03e82511
    • Alan Zimmerman's avatar
      EPA: Use full range for Anchor · 81fb8885
      Alan Zimmerman authored and Marge Bot's avatar Marge Bot committed
      This change requires a series of related changes, which must all land
      at the same time, otherwise all the EPA tests break.
      
      * Use the current Anchor end as prior end
      
        Use the original anchor location end as the source of truth for
        calculating print deltas.
      
        This allows original spacing to apply in most cases, only changed
        AST items need initial delta positions.
      
      * Add DArrow to TrailingAnn
      
      * EPA Introduce HasTrailing in ExactPrint
      
         Use [TrailingAnn] in enterAnn and remove it from
         ExactPrint (LocatedN RdrName)
      
      * In HsDo, put TrailingAnns at top of LastStmt
      
      * EPA: do not convert comments to deltas when balancing.
      
      * EPA: deal with fallout from getMonoBind
      
      * EPA fix captureLineSpacing
      
      * EPA print any comments in the span before exiting it
      
      * EPA: Add comments to AnchorOperation
      
      * EPA: remove AnnEofComment, it is no longer used
      
      Updates Haddock submodule
      81fb8885
  12. Nov 01, 2023
    • Sylvain Henry's avatar
      JS: fix FFI "wrapper" and "dynamic" · 575d7690
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      Fix codegen and helper functions for "wrapper" and "dynamic" foreign
      imports.
      
      Fix tests:
      - ffi006
      - ffi011
      - T2469
      - T4038
      
      Related to #22363
      575d7690
    • Ryan Scott's avatar
      More robust checking for DataKinds · 9f9c9227
      Ryan Scott authored and Marge Bot's avatar Marge Bot committed
      As observed in #22141, GHC was not doing its due diligence in catching code
      that should require `DataKinds` in order to use. Most notably, it was allowing
      the use of arbitrary data types in kind contexts without `DataKinds`, e.g.,
      
      ```hs
      data Vector :: Nat -> Type -> Type where
      ```
      
      This patch revamps how GHC tracks `DataKinds`. The full specification is
      written out in the `DataKinds` section of the GHC User's Guide, and the
      implementation thereof is described in `Note [Checking for DataKinds]` in
      `GHC.Tc.Validity`. In brief:
      
      * We catch _type_-level `DataKinds` violations in the renamer. See
        `checkDataKinds` in `GHC.Rename.HsType` and `check_data_kinds` in
        `GHC.Rename.Pat`.
      
      * We catch _kind_-level `DataKinds` violations in the typechecker, as this
        allows us to catch things that appear beneath type synonyms. (We do *not*
        want to do this in type-level contexts, as it is perfectly fine for a type
        synonym to mention something that requires DataKinds while still using the
        type synonym in a module that doesn't enable DataKinds.) See `checkValidType`
        in `GHC.Tc.Validity`.
      
      * There is now a single `TcRnDataKindsError` that classifies all manner of
        `DataKinds` violations, both in the renamer and the typechecker. The
        `NoDataKindsDC` error has been removed, as it has been subsumed by
        `TcRnDataKindsError`.
      
      * I have added `CONSTRAINT` is `isKindTyCon`, which is what checks for illicit
        uses of data types at the kind level without `DataKinds`. Previously,
        `isKindTyCon` checked for `Constraint` but not `CONSTRAINT`. This is
        inconsistent, given that both `Type` and `TYPE` were checked by `isKindTyCon`.
        Moreover, it thwarted the implementation of the `DataKinds` check in
        `checkValidType`, since we would expand `Constraint` (which was OK without
        `DataKinds`) to `CONSTRAINT` (which was _not_ OK without `DataKinds`) and
        reject it. Now both are allowed.
      
      * I have added a flurry of additional test cases that test various corners of
        `DataKinds` checking.
      
      Fixes #22141.
      9f9c9227
    • Matthew Pickering's avatar
      ci: Run aarch64 llvm backend job with "LLVM backend" label · 5b0392e0
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This brings it into line with the x86 LLVM backend job.
      5b0392e0
    • Ben Gamari's avatar
      gitlab-ci: Bump LLVM bootstrap jobs to Debian 12 · 73c191c0
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      As the Debian 10 images have too old an LLVM.
      
      Addresses #24056.
      73c191c0
    • Krzysztof Gogolewski's avatar
      Fix pretty-printing of type family dependencies · 49f69f50
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      "where" should be after the injectivity annotation.
      49f69f50
    • Krzysztof Gogolewski's avatar
      docs: fix ScopedTypeVariables example (#24101) · 7a90020f
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      The previous example didn't compile.
      
      Furthermore, it wasn't demonstrating the point properly.
      I have changed it to an example which shows that 'a' in the signature
      must be the same 'a' as in the instance head.
      7a90020f
Loading