[Git][ghc/ghc][wip/andreask/sse_macro_docs] 5 commits: Implements the Exportable Named Default proposal (#24305)

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Mon Aug 19 12:38:45 UTC 2024



Andreas Klebinger pushed to branch wip/andreask/sse_macro_docs at Glasgow Haskell Compiler / GHC


Commits:
fa0dbaca by Mario Blažević at 2024-08-17T03:31:32+00:00
Implements the Exportable Named Default proposal (#24305)

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.

- - - - -
1deba6b2 by Simon Peyton Jones at 2024-08-17T13:58:13-04:00
Make kick-out more selective

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 :-).

- - - - -
88488847 by Cheng Shao at 2024-08-18T04:44:01+02:00
testsuite: remove undesired -fasm flag from test ways

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.

- - - - -
3a145315 by Cheng Shao at 2024-08-18T13:05:45-04:00
ghci: fix isMinTTY.h casing for Windows targets

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.
```

- - - - -
57903b74 by Andreas Klebinger at 2024-08-19T12:38:42+00:00
Document the (x86) SIMD macros.

Fixes #25021.

- - - - -


30 changed files:

- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/IfaceToCore.hs-boot
- compiler/GHC/Parser.y
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Runtime/Context.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Default.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver.hs
- compiler/GHC/Tc/Solver/InertSet.hs
- compiler/GHC/Tc/Solver/Monad.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f1382aa0551e317239c239a5aa061291e6387a6d...57903b74717dea668123e3518b9bc59fdfeeaefe

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f1382aa0551e317239c239a5aa061291e6387a6d...57903b74717dea668123e3518b9bc59fdfeeaefe
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240819/c3aec9ff/attachment.html>


More information about the ghc-commits mailing list