1. 08 Dec, 2022 2 commits
  2. 30 Nov, 2022 6 commits
  3. 29 Nov, 2022 7 commits
    • Sylvain Henry's avatar
      Add Javascript backend · cc25d52e
      Sylvain Henry authored
      Add JS backend adapted from the GHCJS project by Luite Stegeman.
      Some features haven't been ported or implemented yet. Tests for these
      features have been disabled with an associated gitlab ticket.
      Bump array submodule
      Work funded by IOG.
      Co-authored-by: doyougnu's avatarJeffrey Young <jeffrey.young@iohk.io>
      Co-authored-by: Luite Stegeman's avatarLuite Stegeman <stegeman@gmail.com>
      Co-authored-by: Josh Meredith's avatarJosh Meredith <joshmeredith2008@gmail.com>
    • Ben Gamari's avatar
      testsuite: Don't use grep -q in unpack_sums_7 · def47dd3
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      `grep -q` closes stdin as soon as it finds the pattern it is looking
      for, resulting in #22484.
    • Ben Gamari's avatar
      testsuite: Mark unpack_sums_6 as fragile due to #22504 · ab23dc5e
      Ben Gamari authored and Marge Bot's avatar Marge Bot committed
      This test is explicitly dependent upon runtime, which is generally not
      appropriate given that the testsuite is run in parallel and generally
      saturates the CPU.
    • Simon Peyton Jones's avatar
      Be a bit more selective about floating bottoming expressions · 02e282ec
      Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
      This MR arranges to float a bottoming expression to the top
      only if it escapes a value lambda.
      See #22494 and Note [Floating to the top] in SetLevels.
      This has a generally beneficial effect in nofib
      |                               ||tsv (rel) |
      |           imaginary/paraffins ||   -0.93% |
      |                imaginary/rfib ||   -0.05% |
      |                      real/fem ||   -0.03% |
      |                    real/fluid ||   -0.01% |
      |                   real/fulsom ||   +0.05% |
      |                   real/gamteb ||   -0.27% |
      |                       real/gg ||   -0.10% |
      |                   real/hidden ||   -0.01% |
      |                      real/hpg ||   -0.03% |
      |                      real/scs ||  -11.13% |
      |         shootout/k-nucleotide ||   -0.01% |
      |               shootout/n-body ||   -0.08% |
      |   shootout/reverse-complement ||   -0.00% |
      |        shootout/spectral-norm ||   -0.02% |
      |             spectral/fibheaps ||   -0.20% |
      |           spectral/hartel/fft ||   -1.04% |
      |         spectral/hartel/solid ||   +0.33% |
      |     spectral/hartel/wave4main ||   -0.35% |
      |                 spectral/mate ||   +0.76% |
      |                     geom mean ||   -0.12% |
      The effect on compile time is generally slightly beneficial
      Metrics: compile_time/bytes allocated
      MultiLayerModulesTH_OneShot(normal)  +0.3%
                        PmSeriesG(normal)  -0.2%
                        PmSeriesT(normal)  -0.1%
                           T10421(normal)  -0.1%
                          T10421a(normal)  -0.1%
                           T10858(normal)  -0.1%
                           T11276(normal)  -0.1%
                          T11303b(normal)  -0.2%
                           T11545(normal)  -0.1%
                           T11822(normal)  -0.1%
                           T12150(optasm)  -0.1%
                           T12234(optasm)  -0.3%
                           T13035(normal)  -0.2%
                           T16190(normal)  -0.1%
                           T16875(normal)  -0.4%
                          T17836b(normal)  -0.2%
                           T17977(normal)  -0.2%
                          T17977b(normal)  -0.2%
                           T18140(normal)  -0.1%
                           T18282(normal)  -0.1%
                           T18304(normal)  -0.2%
                          T18698a(normal)  -0.1%
                           T18923(normal)  -0.1%
                           T20049(normal)  -0.1%
                          T21839r(normal)  -0.1%
                            T5837(normal)  -0.4%
                            T6048(optasm)  +3.2% BAD
                            T9198(normal)  -0.2%
                            T9630(normal)  -0.1%
             TcPlugin_RewritePerf(normal)  -0.4%
                   hard_hole_fits(normal)  -0.1%
                                geo. mean  -0.0%
                                minimum    -0.4%
                                maximum    +3.2%
      The T6048 outlier is hard to pin down, but it may be the effect of
      reading in more interface files definitions. It's a small program for
      which compile time is very short, so I'm not bothered about it.
      Metric Increase:
    • Krzysztof Gogolewski's avatar
      Change printing of sized literals to match the proposal · 646969d4
      Krzysztof Gogolewski authored and Marge Bot's avatar Marge Bot committed
      Literals in Core were printed as e.g. 0xFF#16 :: Int16#.
      The proposal 451 now specifies syntax 0xFF#Int16.
      This change affects the Core printer only - more to be done later.
      Part of #21422.
    • Apoorv Ingle's avatar
      Killing cc_fundeps, streamlining kind equality orientation, and type equality processing order · 8d15eadc
      Apoorv Ingle authored and Marge Bot's avatar Marge Bot committed
      Fixes: #217093
      Associated to #19415
      This change
      * Flips the orientation of the the generated kind equality coercion in canEqLHSHetero;
      * Removes `cc_fundeps` in CDictCan as the check was incomplete;
      * Changes `canDecomposableTyConAppOk` to ensure we process kind equalities before type equalities and avoiding a call to `canEqLHSHetero` while processing wanted TyConApp equalities
      * Adds 2 new tests for validating the change
         - testsuites/typecheck/should_compile/T21703.hs and
         - testsuites/typecheck/should_fail/T19415b.hs (a simpler version of T19415.hs)
      * Misc: Due to the change in the equality direction some error messages now have flipped type mismatch errors
      * Changes in Notes:
        - Note [Fundeps with instances, and equality orientation] supercedes Note [Fundeps with instances]
        - Added Note [Kind Equality Orientation] to visualize the kind flipping
        - Added Note [Decomposing Dependent TyCons and Processing Wanted Equalties]
    • Cheng Shao's avatar
      compiler: remove unused MO_U_MulMayOflo · d4134e92
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      We actually only emit MO_S_MulMayOflo and never emit MO_U_MulMayOflo anywhere.
  4. 28 Nov, 2022 2 commits
  5. 26 Nov, 2022 1 commit
  6. 25 Nov, 2022 4 commits
    • Simon Peyton Jones's avatar
      Fix decomposition of TyConApps · d10dc6bd
      Simon Peyton Jones authored and Simon Peyton Jones's avatar Simon Peyton Jones committed
      Ticket #22331 showed that we were being too eager to decompose
      a Wanted TyConApp, leading to incompleteness in the solver.
      To understand all this I ended up doing a substantial rewrite
      of the old Note [Decomposing equalities], now reborn as
      Note [Decomposing TyConApp equalities]. Plus rewrites of other
      related Notes.
      The actual fix is very minor and actually simplifies the code: in
      `can_decompose` in `GHC.Tc.Solver.Canonical.canTyConApp`, we now call
      `noMatchableIrreds`.  A closely related refactor: we stop trying to
      use the same "no matchable givens" function here as in
      `matchClassInst`.  Instead split into two much simpler functions.
    • Vladislav Zavialov's avatar
      Print unticked promoted data constructors (#20531) · 13d627bb
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      Before this patch, GHC unconditionally printed ticks before promoted
      data constructors:
      	ghci> type T = True  -- unticked (user-written)
      	ghci> :kind! T
      	T :: Bool
      	= 'True              -- ticked (compiler output)
      After this patch, GHC prints ticks only when necessary:
      	ghci> type F = False    -- unticked (user-written)
      	ghci> :kind! F
      	F :: Bool
      	= False                 -- unticked (compiler output)
      	ghci> data False        -- introduce ambiguity
      	ghci> :kind! F
      	F :: Bool
      	= 'False                -- ticked by necessity (compiler output)
      The old behavior can be enabled by -fprint-redundant-promotion-ticks.
      Summary of changes:
      * Rename PrintUnqualified to NamePprCtx
      * Add QueryPromotionTick to it
      * Consult the GlobalRdrEnv to decide whether to print a tick (see mkPromTick)
      * Introduce -fprint-redundant-promotion-ticks
      Co-authored-by: Artyom Kuznetsov's avatarArtyom Kuznetsov <hi@wzrd.ht>
    • sheaf's avatar
      Review suggestions for assorted fixes to avoid Data.List.{head,tail} · 1f1b99b8
      sheaf authored and Marge Bot's avatar Marge Bot committed
    • Bodigrim's avatar
      Assorted fixes to avoid Data.List.{head,tail} · 5943e739
      Bodigrim authored and Marge Bot's avatar Marge Bot committed
  7. 24 Nov, 2022 5 commits
    • Cheng Shao's avatar
      rts: fix missing Arena.h symbols in RtsSymbols.c · d198a19a
      Cheng Shao authored and Marge Bot's avatar Marge Bot committed
      It was an unfortunate oversight in !8961 and broke devel2 builds.
    • Andrei Borzenkov's avatar
      Convert diagnostics in GHC.Rename.Expr to proper TcRnMessage (#20115) · 86ff1523
      Andrei Borzenkov authored and Marge Bot's avatar Marge Bot committed
      Problem: avoid usage of TcRnMessageUnknown
      The following `TcRnMessage` messages has been introduced:
      Co-authored-by: sheaf's avatarsheaf <sam.derbyshire@gmail.com>
    • Matthew Pickering's avatar
      notes: Fix references to HPT space leak note · 11627c42
      Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
      Updating this note was missed when updating the HPT to the HUG.
      Fixes #22477
    • Vladislav Zavialov's avatar
      Check if the SDoc starts with a single quote (#22488) · 178c1fd8
      Vladislav Zavialov authored and Marge Bot's avatar Marge Bot committed
      This patch fixes pretty-printing of character literals
      inside promoted lists and tuples.
      When we pretty-print a promoted list or tuple whose first element
      starts with a single quote, we want to add a space between the opening
      bracket and the element:
      	'[True]    -- ok
      	'[ 'True]  -- ok
      	'['True]   -- not ok
      If we don't add the space, we accidentally produce a character
      literal '['.
      Before this patch, pprSpaceIfPromotedTyCon inspected the type as an AST
      and tried to guess if it would be rendered with a single quote. However,
      it missed the case when the inner type was itself a character literal:
      	'[ 'x']  -- ok
      	'['x']   -- not ok
      Instead of adding this particular case, I opted for a more future-proof
      solution: check the SDoc directly. This way we can detect if the single
      quote is actually there instead of trying to predict it from the AST.
      The new function is called spaceIfSingleQuote.
    • M Farkas-Dyck's avatar
      Scrub some no-warning pragmas. · 040bfdc3
      M Farkas-Dyck authored and Marge Bot's avatar Marge Bot committed
  8. 23 Nov, 2022 5 commits
  9. 22 Nov, 2022 8 commits