Skip to content
Snippets Groups Projects
  1. Oct 14, 2023
    • sheaf's avatar
      Combine GREs when combining in mkImportOccEnv · ec3c4488
      sheaf authored and Marge Bot's avatar Marge Bot committed
      In `GHC.Rename.Names.mkImportOccEnv`, we sometimes discard one import
      item in favour of another, as explained in Note [Dealing with imports]
      in `GHC.Rename.Names`. However, this can cause us to lose track of
      important parent information.
      
      Consider for example #24084:
      
        module M1 where { class C a where { type T a } }
        module M2 ( module M1 ) where { import M1 }
        module M3 where { import M2 ( C, T ); instance C () where T () = () }
      
      When processing the import list of `M3`, we start off (for reasons that
      are not relevant right now) with two `Avail`s attached to `T`, namely
      `C(C, T)` and `T(T)`. We combine them in the `combine` function of
      `mkImportOccEnv`; as described in Note [Dealing with imports] we discard
      `C(C, T)` in favour of `T(T)`. However, in doing so, we **must not**
      discard the information want that `C` is the parent of `T`. Indeed,
      losing track of this information can cause errors when importing,
      as we could get an error of the form
      
        ‘T’ is not a (visible) associated type of class ‘C’
      
      We fix this by combining the two GREs for `T` using `plusGRE`.
      
      Fixes #24084
      ec3c4488
    • Matthew Pickering's avatar
      hadrian: Move ghcBinDeps into ghcLibDeps · 32523713
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      This completes a5227080, the
      `ghc-usage.txt` and `ghci-usage.txt` file are also used by the `ghc`
      library so need to make sure they are present in the libdir even if we
      are not going to build `ghc-bin`.
      
      This also fixes things for cross compilers because the stage2
      cross-compiler requires the ghc-usage.txt file, but we are using
      the stage2 lib folder but not building stage3:exe:ghc-bin so
      ghc-usage.txt was not being generated.
      32523713
    • Sebastian Graf's avatar
      CorePrep: Refactor FloatingBind (#23442) · fea9ecdb
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      A drastically improved architecture for local floating in CorePrep
      that decouples the decision of whether a float is going to be let- or case-bound
      from how far it can float (out of strict contexts, out of lazy contexts, to
      top-level).
      
      There are a couple of new Notes describing the effort:
      
        * `Note [Floating in CorePrep]` for the overview
        * `Note [BindInfo and FloatInfo]` for the new classification of floats
        * `Note [Floats and FloatDecision]` for how FloatInfo is used to inform
          floating decisions
      
      This is necessary ground work for proper treatment of Strict fields and
      unlifted values at top-level.
      
      Fixes #23442.
      
      NoFib results (omitted = 0.0%):
      ```
      --------------------------------------------------------------------------------
              Program         Allocs    Instrs
      --------------------------------------------------------------------------------
               pretty           0.0%     -1.6%
                  scc           0.0%     -1.7%
      --------------------------------------------------------------------------------
                  Min           0.0%     -1.7%
                  Max           0.0%     -0.0%
       Geometric Mean          -0.0%     -0.0%
      ```
      fea9ecdb
    • Sebastian Graf's avatar
      Fix restarts in .ghcid · a0ac8785
      Sebastian Graf authored and Marge Bot's avatar Marge Bot committed
      Using the whole of `hadrian/` restarted in a loop for me.
      a0ac8785
  2. Oct 13, 2023
  3. Oct 12, 2023
  4. Oct 11, 2023
  5. Oct 10, 2023
Loading