Skip to content
Snippets Groups Projects
  1. Nov 01, 2023
  2. Oct 31, 2023
  3. Oct 28, 2023
  4. Oct 27, 2023
  5. Oct 24, 2023
    • Cheng Shao's avatar
      testsuite: increase timeout of ghc-api tests for wasm32 · 07ab5cc1
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      ghc-api tests for wasm32 are more likely to timeout due to the large
      wasm module sizes, especially when testing with wasm native tail
      calls, given wasmtime's handling of tail call opcodes are suboptimal
      at the moment. It makes sense to increase timeout specifically for
      these tests on wasm32. This doesn't affect other targets, and for
      wasm32 we don't increase timeout for all tests, so not to risk letting
      major performance regressions slip through the testsuite.
      07ab5cc1
  6. Oct 23, 2023
  7. Oct 20, 2023
  8. Oct 19, 2023
  9. Oct 18, 2023
  10. 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
  11. Oct 12, 2023
  12. Oct 10, 2023
  13. Oct 08, 2023
  14. Oct 06, 2023
    • Finley McIlwaine's avatar
      Ensure unconstrained instance dictionaries get IPE info · 69abb171
      Finley McIlwaine authored
      In the `StgRhsCon` case of `GHC.Stg.Debug.collectStgRhs`, we were not coming up
      with an initial source span based on the span of the binder, which was causing
      instance dictionaries without dynamic superclass constraints to not have source
      locations in their IPE info. Now they do.
      
      Resolves #24005
      69abb171
  15. Oct 05, 2023
  16. Oct 04, 2023
  17. Sep 30, 2023
    • Simon Peyton Jones's avatar
      Refactor to combine HsLam and HsLamCase · ef5342cd
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR is pure refactoring (#23916):
      * Combine `HsLam` and `HsLamCase`
      * Combine `HsCmdLam` and `HsCmdLamCase`
      
      This just arranges to treat uniformly
         \x -> e
         \case pi -> ei
         \cases pis -> ie
      
      In the exising code base the first is treated differently
      to the latter two.
      
      No change in behaviour.
      
      More specifics:
      
      * Combine `HsLam` and `HsLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsExpr`) into one data construtor covering
        * Lambda
        * `\case`
        * `\cases`
      
      * The new `HsLam` has an argument of type `HsLamVariant` to distinguish the three cases.
      
      * Similarly, combine `HsCmdLam` and `HsCmdLamCase` (constructors of `Language.Haskell.Syntax.Expr.HsCmd` ) into one.
      
      * Similarly, combine `mkHsLamPV` and `mkHsLamCasePV` (methods of class `DisambECP`) into one. (Thank you Alan Zimmerman.)
      
      * Similarly, combine `LambdaExpr` and `LamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsMatchContext`) into one: `LamAlt` with a `HsLamVariant` argument.
      
      * Similarly, combine `KappaExpr` and `ArrowLamCaseAlt` (constructors of `Language.Haskell.Syntax.Expr.HsArrowMatchContext`) into one: `ArrowLamAlt` with a `HsLamVariant` argument.
      
      * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.
      
      * Similarly, combine `PsErrLambdaInPat` and `PsErrLambdaCaseInPat` (constructors of `GHC.Parser.Errors.Ppr.PsError`) into one.
      
      * In the same `PsError` data type, combine `PsErrLambdaCmdInFunAppCmd` and `PsErrLambdaCaseCmdInFunAppCmd` into one.
      
      * In the same `PsError` data tpye, combine `PsErrLambdaInFunAppExpr` and `PsErrLambdaCaseInFunAppExpr` into one.
      
      p* Smilarly combine `ExpectedFunTyLam` and `ExpectedFunTyLamCase` (constructors of `GHC.Tc.Types.Origin.ExpectedFunTyOrigin`) into one.
      
      Phew!
      ef5342cd
    • Torsten Schmits's avatar
      Fix several mistakes around free variables in iface breakpoints · d3874407
      Torsten Schmits authored and Marge Bot's avatar Marge Bot committed
      Fixes #23612 , #23607, #23998 and #23666.
      
      MR: !11026
      
      The fingerprinting logic in `Iface.Recomp` failed lookups when processing decls containing breakpoints for two reasons:
      
      * IfaceBreakpoint created binders for free variables instead of expressions
      
      * When collecting free names for the dependency analysis for fingerprinting, breakpoint FVs were skipped
      d3874407
  18. Sep 28, 2023
  19. Sep 27, 2023
  20. Sep 21, 2023
  21. Sep 19, 2023
    • sheaf's avatar
      Validity: refactor treatment of data families · 1eed645c
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit refactors the reporting of unused type variables in type
      and data family instances to be more principled. This avoids ad-hoc
      logic in the treatment of data family instances.
      1eed645c
    • sheaf's avatar
      Unused tyvars in FamInst: only report user tyvars · 28dd52ee
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit changes how we perform some validity checking for
      coercion axioms to mirror how we handle default declarations for
      associated type families. This allows us to keep track of whether
      type variables in type and data family instances were user-written
      or not, in order to only report the user-written ones in
      "unused type variable" error messages.
      
      Consider for example:
      
        {-# LANGUAGE PolyKinds #-}
        type family F
        type instance forall a. F = ()
      
      In this case, we get two quantified type variables,
      (k :: Type) and (a :: k); the second being user-written, but the first
      is introduced by the typechecker. We should only report 'a' as being
      unused, as the user has no idea what 'k' is.
      
      Fixes #23734
      28dd52ee
    • sheaf's avatar
      Adjust reporting of unused tyvars in data FamInsts · a525a92a
      sheaf authored and Marge Bot's avatar Marge Bot committed
      This commit adjusts the validity checking of data family
      instances to improve the reporting of unused type variables.
      
      See Note [Out of scope tvs in data family instances] in GHC.Tc.Validity.
      
      The problem was that, in a situation such as
      
        data family D :: Type
        data instance forall (d :: Type). D = MkD
      
      the RHS passed to 'checkFamPatBinders' would be the TyCon app
      
        R:D d
      
      which mentions the type variable 'd' quantified in the user-written
      forall. Thus, when computing the set of unused type variables in
      the RHS of the data family instance, we would find that 'd' is used,
      and report a strange error message that would say that 'd' is not
      bound on the LHS.
      
      To fix this, we special-case the data-family instance case,
      manually extracting all the type variables that appear in the
      arguments of all the data constructores of the data family instance.
      
      Fixes #23778
      a525a92a
    • jeffrey young's avatar
      compiler,ghci: error codes link to HF error index · 86d2971e
      jeffrey young authored and Marge Bot's avatar Marge Bot committed
      closes: #23259
      
      - adds -fprint-error-index-links={auto|always|never} flag
      86d2971e
Loading