Skip to content
Snippets Groups Projects
  1. Aug 28, 2024
  2. Aug 23, 2024
  3. Aug 22, 2024
  4. Aug 21, 2024
  5. Aug 18, 2024
    • Cheng Shao's avatar
      ghci: fix isMinTTY.h casing for Windows targets · 3a145315
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for
      Windows targets. While this looks harmless given Windows filesystems
      are case-insensitive by default, it does cause a compilation warning
      with recent versions of clang, so we might as well fix the casing:
      
      ```
      driver\ghci\isMinTTY.c:10:10: error:
           warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
         |
      10 | #include "isMINTTY.h"
         |          ^
      
       #include "isMINTTY.h"
               ^~~~~~~~~~~~
               "isMinTTY.h"
      1 warning generated.
      ```
      3a145315
    • Cheng Shao's avatar
      testsuite: remove undesired -fasm flag from test ways · 88488847
      Cheng Shao authored
      This patch removes the -fasm flag from test ways, except ways like
      optasm that explicitly state they are meant to be compiled with NCG
      backend. Most test ways should use the default codegen backend, and
      the precense of -fasm can cause stderr mismatches like this when GHC
      is configured with the unregisterised backend:
      
      ```
      --- /dev/null
      +++ /tmp/ghctest-3hydwldj/test   spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised
      @@ -0,0 +1,2 @@
      +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)]
      +    Target platform uses unregisterised ABI, so compiling via C
      *** unexpected failure for prof-late-cc(prof_no_auto)
      ```
      
      This has been breaking the wasm unreg nightly job since !12595 landed.
      88488847
  6. Aug 17, 2024
    • Simon Peyton Jones's avatar
      Make kick-out more selective · 1deba6b2
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR revised the crucial kick-out criteria in the constraint solver.
      
      Ticket #24984 showed an example in which
       * We were kicking out unnecessarily
       * That gave rise to extra work, of course
       * But it /also/ led to exponentially-sized coercions due to lack
         of sharing in coercions (something we want to fix separately #20264)
      
      This MR sharpens up the kick-out criteria; specifially in (KK2) we look
      only under type family applications if (fs>=fw).
      
      This forced me to understand the existing kick-out story, and I ended
      up rewriting many of the careful Notes in GHC.Tc.Solver.InertSet.
      Especially look at the new `Note [The KickOut Criteria]`
      
      The proof of termination is not air-tight, but it is better than before,
      and both Richard and I think it's correct :-).
      1deba6b2
    • Mario's avatar
      Implements the Exportable Named Default proposal (#24305) · fa0dbaca
      Mario authored and Mario's avatar Mario committed
      This squashed commit adds support for exportable named defaults, the accepted
      GHC proposal at https://github.com/ghc-proposals/ghc-proposals/pull/409
      
      The proposal extends the Haskell '98 declarations
      
          default (Int, Double)
      
      which were implicitly always applying to Num class alone, to allow specifying
      an arbitrary single-parameter class:
      
          default IsString (Text, String)
      
      The effect of this declaration would be to eliminate the ambiguous type errors
      around string literals when OverloadedStrings extension is active. The
      declaration by itself has effect only in its module, so the proposal also adds
      the ability to export class defaults:
      
          module MyModule (default IsIstring)
      
      Once the language extension is published and established, we can consider using
      it in base and other libraries.
      
      See Note [Named default declarations] in GHC.Tc.Gen.Default
      for implementation details.
      fa0dbaca
  7. Aug 16, 2024
    • Sylvain Henry's avatar
      Linker: some refactoring to prepare for #24886 · 4bee377c
      Sylvain Henry authored and Marge Bot's avatar Marge Bot committed
      - Rename LoadedBCOs into LazyBCOs
      - Bundle SptEntries with CompiledByteCode and removed [SptEntry] field
        from the BCOs constructor
      - Rename Linkable's LM constructor into Linkable: in the past we had LM
        and LP for Module and Package, now we only have the former.
      - Rename Unlinked into LinkablePart (and linkableUnlinked into
        linkableParts)
      - Use NonEmpty to encode invariant in Linkable's linkableParts type
      - Add helpers: linkableLibs, linkableBCOs, etc.
      - Add documentation
      - Remove partial nameOfObject
      - Rename nameOfObject_maybe into linkablePartPath
      - Rename byteCodeOfObject into linkablePartAllBCOs.
      - Refactor linkablePartAllBCOs to avoid a panic if a LazyBCO has a C
        stub. Document the fact that LazyBCOs are returned in this case
        (contrary to linkableBCOs which only returns non-lazy ones)
      
      Refactoring done while trying to understand how to adapt the linker code
      to support the JS backend too (cf #24886).
      4bee377c
    • sheaf's avatar
      isIrrefutableHsPat: look up ConLikes in the HscEnv · bdd77b9e
      sheaf authored and Marge Bot's avatar Marge Bot committed
      At GhcRn stage, in isIrrefutableHsPat we only looked up data constructors
      in the RdrEnv, which meant that we lacked fallibility information for
      out-of-scope constructors (which can arise from Template Haskell splices).
      
      Instead, we use 'lookupGREInfo', which looks up the information in
      the type environment. This was the correct function to call all along,
      but was not used in 572fbc44 due to import cycle reasons. The appropriate
      functions, 'irrefutableConLike{Rn,Tc}' have been moved to 'GHC.Rename.Env',
      which avoids import cycles.
      
      Fixes #25164
      bdd77b9e
  8. Aug 14, 2024
  9. Aug 13, 2024
  10. Aug 07, 2024
Loading