Skip to content
Snippets Groups Projects
  1. Nov 17, 2023
  2. Nov 16, 2023
    • Krzysztof Gogolewski's avatar
      Fix IPE test · 3e606230
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      A helper function was defined in a different module than used.
      To reproduce: ./hadrian/build test --test-root-dirs=testsuite/tests/rts/ipe
      3e606230
    • Sylvain Henry's avatar
      Fix unusable units and module reexport interaction (#21097) · cee81370
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      This commit fixes an issue with ModUnusable introduced in df0f148f.
      
      In mkUnusableModuleNameProvidersMap we traverse the list of unusable
      units and generate ModUnusable origin for all the modules they contain:
      exposed modules, hidden modules, and also re-exported modules. To do
      this we have a two-level map:
      
        ModuleName -> Unit:ModuleName (aka Module) -> ModuleOrigin
      
      So for each module name "M" in broken unit "u" we have:
        "M" -> u:M -> ModUnusable reason
      
      However in the case of module reexports we were using the *target*
      module as a key. E.g. if "u:M" is a reexport for "X" from unit "o":
         "M" -> o:X -> ModUnusable reason
      
      Case 1: suppose a reexport without module renaming (u:M -> o:M) from
      unusable unit u:
         "M" -> o:M -> ModUnusable reason
      
      Here it's claiming that the import of M is unusable because a reexport
      from u is unusable. But if unit o isn't unusable we could also have in
      the map:
         "M" -> o:M -> ModOrigin ...
      
      Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
      (ModUnusable <> ModOrigin)
      
      Case 2: similarly we could have 2 unusable units reexporting the same module
      without renaming, say (u:M -> o:M) and (v:M -> o:M) with u and v
      unusable. It gives:
      
        "M" -> o:M -> ModUnusable ... (for u)
        "M" -> o:M -> ModUnusable ... (for v)
      
      Issue: the Semigroup instance of ModuleOrigin doesn't handle the case
      (ModUnusable <> ModUnusable).
      
      This led to #21097, #16996, #11050.
      
      To fix this, in this commit we make ModUnusable track whether the module
      used as key is a reexport or not (for better error messages) and we use
      the re-export module as key. E.g. if "u:M" is a reexport for "o:X" and u
      is unusable, we now record:
      
          "M" -> u:M -> ModUnusable reason reexported=True
      
      So now, we have two cases for a reexport u:M -> o:X:
         - u unusable: "M" -> u:M -> ModUnusable ... reexported=True
         - u usable:   "M" -> o:X -> ModOrigin   ... reexportedFrom=u:M
      
      The second case is indexed with o:X because in this case the Semigroup
      instance of ModOrigin is used to combine valid expositions of a module
      (directly or via reexports).
      
      Note that module lookup functions select usable modules first (those who
      have a ModOrigin value), so it doesn't matter if we add new ModUnusable
      entries in the map like this:
      
        "M" -> {
          u:M -> ModUnusable ... reexported=True
          o:M -> ModOrigin ...
        }
      
      The ModOrigin one will be used. Only if there is no ModOrigin or
      ModHidden entry will the ModUnusable error be printed. See T21097 for an
      example printing several reasons why an import is unusable.
      cee81370
    • Simon Peyton Jones's avatar
      Second fix to #24083 · 2776920e
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      My earlier fix turns out to be too aggressive for data/type families
      
      See wrinkle (DTV1) in Note [Disconnected type variables]
      2776920e
    • Krzysztof Gogolewski's avatar
      Document defaulting of RuntimeReps · a6467834
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Fixes #24099
      a6467834
  3. Nov 15, 2023
  4. Nov 13, 2023
  5. 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
  6. Nov 11, 2023
  7. 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
  8. Nov 09, 2023
  9. Nov 07, 2023
  10. Nov 06, 2023
  11. Nov 05, 2023
Loading