[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Include -f{write,validate}-ide-info in the User's Guide flag reference

Marge Bot gitlab at gitlab.haskell.org
Wed Sep 16 09:26:15 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
90229c4b by Ryan Scott at 2020-09-16T04:53:22-04:00
Include -f{write,validate}-ide-info in the User's Guide flag reference

Previously, these were omitted from the flag reference due to a
layout oversight in `docs/users_guide/flags.{rst,py}`.

Fixes #18426.

- - - - -
ce42e187 by Ben Gamari at 2020-09-16T04:53:59-04:00
rts: Fix erroneous usage of vsnprintf

As pointed out in #18685, this should be snprintf not vsnprintf. This
appears to be due to a cut-and-paste error.

Fixes #18658.

- - - - -
b695e7d7 by Sylvain Henry at 2020-09-16T04:54:38-04:00
Rename ghci flag into internal-interpreter

"ghci" as a flag name was confusing because it really enables the
internal-interpreter. Even the ghci library had a "ghci" flag...

- - - - -
8af954d2 by Sylvain Henry at 2020-09-16T04:55:17-04:00
Make ghc-boot reexport modules from ghc-boot-th

Packages don't have to import both ghc-boot and ghc-boot-th. It makes
the dependency graph easier to understand and to refactor.

- - - - -
5f425b09 by Simon Peyton Jones at 2020-09-16T05:26:06-04:00
Do absence analysis on stable unfoldings

Ticket #18638 showed that Very Bad Things happen if we fail
to do absence analysis on stable unfoldings.  It's all described
in Note [Absence analysis for stable unfoldings and RULES].

I'm a bit surprised this hasn't bitten us before. Fortunately
the fix is pretty simple.

- - - - -
e0b61fb1 by Leif Metcalf at 2020-09-16T05:26:06-04:00
Replace deprecated git --recursive

The --recursive flag of git-clone has been replaced by the
--recurse-submodules flag since git 1.7.4, released in 2011.
- - - - -
c6dda93b by Richard Eisenberg at 2020-09-16T05:26:06-04:00
Document IfaceTupleTy

- - - - -


19 changed files:

- README.md
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Iface/Type.hs
- compiler/GHC/Types/Demand.hs
- compiler/ghc.cabal.in
- compiler/ghc.mk
- docs/users_guide/flags.py
- docs/users_guide/flags.rst
- ghc.mk
- ghc/ghc-bin.cabal.in
- ghc/ghc.mk
- hadrian/src/Settings/Packages.hs
- libraries/ghc-boot/ghc-boot.cabal.in
- libraries/ghci/ghci.cabal.in
- rts/RtsMessages.c
- + testsuite/tests/simplCore/should_run/T18638.hs
- + testsuite/tests/simplCore/should_run/T18638.stdout
- testsuite/tests/simplCore/should_run/all.T


Changes:

=====================================
README.md
=====================================
@@ -26,7 +26,7 @@ There are two ways to get a source tree:
 
  2. *Check out the source code from git*
 
-        $ git clone --recursive git at gitlab.haskell.org:ghc/ghc.git
+        $ git clone --recurse-submodules git at gitlab.haskell.org:ghc/ghc.git
 
     Note: cloning GHC from Github requires a special setup. See [Getting a GHC
     repository from Github][7].


=====================================
compiler/GHC/Core/FVs.hs
=====================================
@@ -34,9 +34,10 @@ module GHC.Core.FVs (
         bndrRuleAndUnfoldingVarsDSet,
         idFVs,
         idRuleVars, idRuleRhsVars, stableUnfoldingVars,
-        ruleRhsFreeVars, ruleFreeVars, rulesFreeVars,
+        ruleFreeVars, rulesFreeVars,
         rulesFreeVarsDSet, mkRuleInfo,
         ruleLhsFreeIds, ruleLhsFreeIdsList,
+        ruleRhsFreeVars, ruleRhsFreeIds,
 
         expr_fvs,
 
@@ -524,6 +525,14 @@ ruleLhsFVIds (BuiltinRule {}) = emptyFV
 ruleLhsFVIds (Rule { ru_bndrs = bndrs, ru_args = args })
   = filterFV isLocalId $ addBndrs bndrs (exprs_fvs args)
 
+ruleRhsFreeIds :: CoreRule -> VarSet
+-- ^ This finds all locally-defined free Ids on the left hand side of a rule
+-- and returns them as a non-deterministic set
+ruleRhsFreeIds (BuiltinRule {}) = emptyVarSet
+ruleRhsFreeIds (Rule { ru_bndrs = bndrs, ru_args = args })
+  = fvVarSet $ filterFV isLocalId $
+     addBndrs bndrs $ exprs_fvs args
+
 {-
 Note [Rule free var hack]  (Not a hack any more)
 ~~~~~~~~~~~~~~~~~~~~~~~~~


=====================================
compiler/GHC/Core/Opt/DmdAnal.hs
=====================================
@@ -23,6 +23,7 @@ import GHC.Core.Multiplicity ( scaledThing )
 import GHC.Core.Seq     ( seqBinds )
 import GHC.Utils.Outputable
 import GHC.Types.Var.Env
+import GHC.Types.Var.Set
 import GHC.Types.Basic
 import Data.List        ( mapAccumL )
 import GHC.Core.DataCon
@@ -32,6 +33,7 @@ import GHC.Types.Id.Info
 import GHC.Core.Utils
 import GHC.Core.TyCon
 import GHC.Core.Type
+import GHC.Core.FVs      ( exprFreeIds, ruleRhsFreeIds )
 import GHC.Core.Coercion ( Coercion, coVarsOfCo )
 import GHC.Core.FamInstEnv
 import GHC.Utils.Misc
@@ -552,7 +554,9 @@ dmdAnalRhsLetDown rec_flag env let_dmd id rhs
             -- See Note [Demand signatures are computed for a threshold demand based on idArity]
             = mkRhsDmd env rhs_arity rhs
 
-    (DmdType rhs_fv rhs_dmds rhs_div, rhs') = dmdAnal env rhs_dmd rhs
+    (rhs_dmd_ty, rhs') = dmdAnal env rhs_dmd rhs
+    DmdType rhs_fv rhs_dmds rhs_div = rhs_dmd_ty
+
     sig = mkStrictSigForArity rhs_arity (DmdType sig_fv rhs_dmds rhs_div)
 
     -- See Note [Aggregated demand for cardinality]
@@ -560,10 +564,23 @@ dmdAnalRhsLetDown rec_flag env let_dmd id rhs
                 Just bs -> reuseEnv (delVarEnvList rhs_fv bs)
                 Nothing -> rhs_fv
 
+    rhs_fv2 = rhs_fv1 `keepAliveDmdEnv` extra_fvs
+
     -- See Note [Lazy and unleashable free variables]
-    (lazy_fv, sig_fv) = splitFVs is_thunk rhs_fv1
+    (lazy_fv, sig_fv) = splitFVs is_thunk rhs_fv2
     is_thunk = not (exprIsHNF rhs) && not (isJoinId id)
 
+    -- Find the RHS free vars of the unfoldings and RULES
+    -- See Note [Absence analysis for stable unfoldings and RULES]
+    extra_fvs = foldr (unionVarSet . ruleRhsFreeIds) unf_fvs $
+                idCoreRules id
+
+    unf = realIdUnfolding id
+    unf_fvs | isStableUnfolding unf
+            , Just unf_body <- maybeUnfoldingTemplate unf
+            = exprFreeIds unf_body
+            | otherwise = emptyVarSet
+
 -- | @mkRhsDmd env rhs_arity rhs@ creates a 'CleanDemand' for
 -- unleashing on the given function's @rhs@, by creating
 -- a call demand of @rhs_arity@
@@ -799,6 +816,43 @@ Fortunately, GHC.Core.Opt.Arity gives 'foo' arity 2, which is enough for LetDown
 forward plusInt's demand signature, and all is well (see Note [Newtype arity] in
 GHC.Core.Opt.Arity)! A small example is the test case NewtypeArity.
 
+Note [Absence analysis for stable unfoldings and RULES]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Ticket #18638 shows that it's really important to do absence analysis
+for stable unfoldings. Consider
+
+   g = blah
+
+   f = \x.  ...no use of g....
+   {- f's stable unfolding is f = \x. ...g... -}
+
+If f is ever inlined we use 'g'. But f's current RHS makes no use
+of 'g', so if we don't look at the unfolding we'll mark g as Absent,
+and transform to
+
+   g = error "Entered absent value"
+   f = \x. ...
+   {- f's stable unfolding is f = \x. ...g... -}
+
+Now if f is subsequently inlined, we'll use 'g' and ... disaster.
+
+SOLUTION: if f has a stable unfolding, adjust its DmdEnv (the demands
+on its free variables) so that no variable mentioned in its unfolding
+is Absent.  This is done by the function Demand.keepAliveDmdEnv.
+
+ALSO: do the same for Ids free in the RHS of any RULES for f.
+
+PS: You may wonder how it can be that f's optimised RHS has somehow
+discarded 'g', but when f is inlined we /don't/ discard g in the same
+way. I think a simple example is
+   g = (a,b)
+   f = \x.  fst g
+   {-# INLINE f #-}
+
+Now f's optimised RHS will be \x.a, but if we change g to (error "..")
+(since it is apparently Absent) and then inline (\x. fst g) we get
+disaster.  But regardless, #18638 was a more complicated version of
+this, that actually happened in practice.
 
 Historical Note [Product demands for function body]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


=====================================
compiler/GHC/Iface/Type.hs
=====================================
@@ -176,6 +176,11 @@ data IfaceType
        PromotionFlag                 -- A bit like IfaceTyCon
        IfaceAppArgs               -- arity = length args
           -- For promoted data cons, the kind args are omitted
+          -- Why have this? Only for efficiency: IfaceTupleTy can omit the
+          -- type arguments, as they can be recreated when deserializing.
+          -- In an experiment, removing IfaceTupleTy resulted in a 0.75% regression
+          -- in interface file size (in GHC's boot libraries).
+          -- See !3987.
 
 type IfaceMult = IfaceType
 


=====================================
compiler/GHC/Types/Demand.hs
=====================================
@@ -25,7 +25,7 @@ module GHC.Types.Demand (
         BothDmdArg, mkBothDmdArg, toBothDmdArg,
         nopDmdType, botDmdType, addDemand,
 
-        DmdEnv, emptyDmdEnv,
+        DmdEnv, emptyDmdEnv, keepAliveDmdEnv,
         peelFV, findIdDemand,
 
         Divergence(..), lubDivergence, isDeadEndDiv,
@@ -59,8 +59,9 @@ module GHC.Types.Demand (
 
 import GHC.Prelude
 
-import GHC.Types.Var ( Var )
+import GHC.Types.Var ( Var, Id )
 import GHC.Types.Var.Env
+import GHC.Types.Var.Set
 import GHC.Types.Unique.FM
 import GHC.Types.Basic
 import GHC.Data.Maybe   ( orElse )
@@ -809,10 +810,22 @@ splitFVs is_thunk rhs_fvs
                     :*:
                     addToUFM_Directly sig_fv  uniq (JD { sd = s,    ud = Abs })
 
-data StrictPair a b = !a :*: !b
+keepAliveDmdEnv :: DmdEnv -> IdSet -> DmdEnv
+-- (keepAliveDmdType dt vs) makes sure that the Ids in vs have
+-- /some/ usage in the returned demand types -- they are not Absent
+-- See Note [Absence analysis for stable unfoldings and RULES]
+--     in GHC.Core.Opt.DmdAnal
+keepAliveDmdEnv env vs
+  = nonDetStrictFoldVarSet add env vs
+  where
+    add :: Id -> DmdEnv -> DmdEnv
+    add v env = extendVarEnv_C add_dmd env v topDmd
 
-strictPairToTuple :: StrictPair a b -> (a, b)
-strictPairToTuple (x :*: y) = (x, y)
+    add_dmd :: Demand -> Demand -> Demand
+    -- If the existing usage is Absent, make it used
+    -- Otherwise leave it alone
+    add_dmd dmd _ | isAbsDmd dmd = topDmd
+                  | otherwise    = dmd
 
 splitProdDmd_maybe :: Demand -> Maybe [Demand]
 -- Split a product into its components, iff there is any
@@ -827,6 +840,11 @@ splitProdDmd_maybe (JD { sd = s, ud = u })
       (Lazy,  Use _ (UProd ux)) -> Just (mkJointDmds (replicate (length ux) Lazy) ux)
       _ -> Nothing
 
+data StrictPair a b = !a :*: !b
+
+strictPairToTuple :: StrictPair a b -> (a, b)
+strictPairToTuple (x :*: y) = (x, y)
+
 {- *********************************************************************
 *                                                                      *
                TypeShape and demand trimming
@@ -1541,9 +1559,9 @@ There are several wrinkles:
   can be evaluated in a short finite time -- and that rules out nasty
   cases like the one above.  (I'm not quite sure why this was a
   problem in an earlier version of GHC, but it isn't now.)
+-}
 
-
-************************************************************************
+{- *********************************************************************
 *                                                                      *
                      Demand signatures
 *                                                                      *


=====================================
compiler/ghc.cabal.in
=====================================
@@ -23,8 +23,8 @@ Category: Development
 Build-Type: Simple
 Cabal-Version: >=1.10
 
-Flag ghci
-    Description: Build GHCi support.
+Flag internal-interpreter
+    Description: Build with internal interpreter support.
     Default: False
     Manual: True
 
@@ -72,7 +72,6 @@ Library
                    transformers == 0.5.*,
                    exceptions == 0.10.*,
                    ghc-boot   == @ProjectVersionMunged@,
-                   ghc-boot-th == @ProjectVersionMunged@,
                    ghc-heap   == @ProjectVersionMunged@,
                    ghci == @ProjectVersionMunged@
 
@@ -88,7 +87,7 @@ Library
                  -Wnoncanonical-monad-instances
                  -Wnoncanonical-monoid-instances
 
-    if flag(ghci)
+    if flag(internal-interpreter)
         CPP-Options: -DHAVE_INTERNAL_INTERPRETER
         Include-Dirs: ../rts/dist/build @FFIIncludeDir@
 


=====================================
compiler/ghc.mk
=====================================
@@ -203,7 +203,7 @@ compiler_stage1_CONFIGURE_OPTS += --ghc-option=-optc-DTHREADED_RTS
 endif
 
 ifeq "$(GhcWithInterpreter)" "YES"
-compiler_stage2_CONFIGURE_OPTS += --flags=ghci
+compiler_stage2_CONFIGURE_OPTS += --flags=internal-interpreter
 
 # Should the debugger commands be enabled?
 ifeq "$(GhciWithDebugger)" "YES"


=====================================
docs/users_guide/flags.py
=====================================
@@ -64,6 +64,7 @@ categories = {
     'coverage': 'Program coverage',
     'cpp': 'C pre-processor',
     'debugging': 'Debugging the compiler',
+    'extended-interface-files': 'Extended interface files',
     'interactive': 'Interactive mode',
     'interface-files': 'Interface files',
     'keep-intermediates': 'Keeping intermediate files',


=====================================
docs/users_guide/flags.rst
=====================================
@@ -127,6 +127,21 @@ More details in :ref:`hi-options`
     :type: table
     :category: interface-files
 
+Extended interface file options
+-------------------------------
+
+More details in :ref:`hie-options`
+
+.. tabularcolumns::
+    | p{\dimexpr 0.30\textwidth-2\tabcolsep} |
+      p{\dimexpr 0.31\textwidth-2\tabcolsep} |
+      p{\dimexpr 0.11\textwidth-2\tabcolsep} |
+      p{\dimexpr 0.29\textwidth-2\tabcolsep} |
+
+.. flag-print::
+    :type: table
+    :category: extended-interface-files
+
 Recompilation checking
 ----------------------
 


=====================================
ghc.mk
=====================================
@@ -598,7 +598,7 @@ endif
 BOOT_LIBS = $(foreach lib,$(PACKAGES_STAGE0),$(libraries/$(lib)_dist-boot_v_LIB))
 
 # Only build internal interpreter support for the stage2 ghci lib
-libraries/ghci_dist-install_CONFIGURE_OPTS += --flags=ghci
+libraries/ghci_dist-install_CONFIGURE_OPTS += --flags=internal-interpreter
 
 # ----------------------------------------
 # Special magic for the ghc-prim package


=====================================
ghc/ghc-bin.cabal.in
=====================================
@@ -19,8 +19,8 @@ Data-Files: settings
 Build-Type: Simple
 Cabal-Version: >=1.10
 
-Flag ghci
-    Description: Build GHCi support.
+Flag internal-interpreter
+    Description: Build with internal interpreter support.
     Default: False
     Manual: True
 
@@ -55,7 +55,7 @@ Executable ghc
                  -Wnoncanonical-monad-instances
                  -Wnoncanonical-monoid-instances
 
-    if flag(ghci)
+    if flag(internal-interpreter)
         -- NB: this is never built by the bootstrapping GHC+libraries
         Build-depends:
             deepseq        == 1.4.*,
@@ -102,4 +102,4 @@ Executable ghc
     Default-Extensions:
         NoImplicitPrelude
       , ScopedTypeVariables
-      , BangPatterns
\ No newline at end of file
+      , BangPatterns


=====================================
ghc/ghc.mk
=====================================
@@ -19,8 +19,8 @@ ghc_stage2_CONFIGURE_OPTS += --flags=stage2
 ghc_stage3_CONFIGURE_OPTS += --flags=stage3
 
 ifeq "$(GhcWithInterpreter)" "YES"
-ghc_stage2_CONFIGURE_OPTS += --flags=ghci
-ghc_stage3_CONFIGURE_OPTS += --flags=ghci
+ghc_stage2_CONFIGURE_OPTS += --flags=internal-interpreter
+ghc_stage3_CONFIGURE_OPTS += --flags=internal-interpreter
 endif
 
 # This package doesn't pass the Cabal checks because data-dir


=====================================
hadrian/src/Settings/Packages.hs
=====================================
@@ -73,7 +73,7 @@ packageArgs = do
               notStage0 ? arg "--ghc-pkg-option=--force" ]
 
           , builder (Cabal Flags) ? mconcat
-            [ ghcWithInterpreter ? notStage0 ? arg "ghci"
+            [ ghcWithInterpreter ? notStage0 ? arg "internal-interpreter"
             , cross ? arg "-terminfo"
             ]
 
@@ -84,7 +84,7 @@ packageArgs = do
           [ builder Ghc ? arg ("-I" ++ compilerPath)
 
           , builder (Cabal Flags) ? mconcat
-            [ ghcWithInterpreter ? notStage0 ? arg "ghci"
+            [ ghcWithInterpreter ? notStage0 ? arg "internal-interpreter"
             , cross ? arg "-terminfo"
             -- Note [Linking ghc-bin against threaded stage0 RTS]
             -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -121,13 +121,13 @@ packageArgs = do
 
         --------------------------------- ghci ---------------------------------
         , package ghci ? mconcat
-          [ notStage0 ? builder (Cabal Flags) ? arg "ghci"
+          [ notStage0 ? builder (Cabal Flags) ? arg "internal-interpreter"
 
-          -- The use case here is that we want to build @ghc-proxy@ for the
+          -- The use case here is that we want to build @iserv-proxy@ for the
           -- cross compiler. That one needs to be compiled by the bootstrap
           -- compiler as it needs to run on the host. Hence @libiserv@ needs
           -- @GHCi.TH@, @GHCi.Message@ and @GHCi.Run@ from @ghci at . And those are
-          -- behind the @-fghci@ flag.
+          -- behind the @-finternal-interpreter@ flag.
           --
           -- But it may not build if we have made some changes to ghci's
           -- dependencies (see #16051).
@@ -142,13 +142,14 @@ packageArgs = do
           --
           -- The workaround we use is to check if the bootstrap compiler has
           -- the same version as the one we are building. In this case we can
-          -- avoid the first step above and directly build with `-fghci`.
+          -- avoid the first step above and directly build with
+          -- `-finternal-interpreter`.
           --
           -- TODO: Note that in that case we also do not need to build most of
           -- the Stage1 libraries, as we already know that the bootstrap
           -- compiler comes with the same versions as the one we are building.
           --
-          , cross ? stage0 ? bootCross ? builder (Cabal Flags) ? arg "ghci"
+          , cross ? stage0 ? bootCross ? builder (Cabal Flags) ? arg "internal-interpreter"
 
           ]
 


=====================================
libraries/ghc-boot/ghc-boot.cabal.in
=====================================
@@ -49,6 +49,14 @@ Library
             GHC.UniqueSubdir
             GHC.Version
 
+    -- reexport modules from ghc-boot-th so that packages don't have to import
+    -- both ghc-boot and ghc-boot-th. It makes the dependency graph easier to
+    -- understand and to refactor.
+    reexported-modules:
+              GHC.LanguageExtensions.Type
+            , GHC.ForeignSrcLang.Type
+            , GHC.Lexeme
+
     -- but done by Hadrian
     -- autogen-modules:
     --         GHC.Version


=====================================
libraries/ghci/ghci.cabal.in
=====================================
@@ -17,8 +17,8 @@ cabal-version:  >=1.10
 build-type:     Simple
 extra-source-files: changelog.md
 
-Flag ghci
-    Description: Build GHCi support.
+Flag internal-interpreter
+    Description: Build with internal interpreter support.
     Default: False
     Manual: True
 
@@ -47,7 +47,7 @@ library
         TupleSections
         UnboxedTuples
 
-    if flag(ghci)
+    if flag(internal-interpreter)
         CPP-Options: -DHAVE_INTERNAL_INTERPRETER
         exposed-modules:
             GHCi.Run
@@ -79,7 +79,6 @@ library
         deepseq          == 1.4.*,
         filepath         == 1.4.*,
         ghc-boot         == @ProjectVersionMunged@,
-        ghc-boot-th      == @ProjectVersionMunged@,
         ghc-heap         == @ProjectVersionMunged@,
         template-haskell == 2.17.*,
         transformers     == 0.5.*


=====================================
rts/RtsMessages.c
=====================================
@@ -248,7 +248,7 @@ rtsSysErrorMsgFn(const char *s, va_list ap)
 
         r = vsnprintf(buf, BUFSIZE, s, ap);
         if (r > 0 && r < BUFSIZE) {
-            r = vsnprintf(buf+r, BUFSIZE-r, ": %s", syserr);
+            r = snprintf(buf+r, BUFSIZE-r, ": %s", syserr);
             MessageBox(NULL /* hWnd */,
                        buf,
                        prog_name,


=====================================
testsuite/tests/simplCore/should_run/T18638.hs
=====================================
@@ -0,0 +1,54 @@
+{-# LANGUAGE ExistentialQuantification, BangPatterns #-}
+{-# OPTIONS_GHC -O #-}
+
+module Main (main) where
+
+import Data.IORef (newIORef, readIORef)
+
+data Step s = Done
+            | Skip !s
+            | Yield !Char !s
+
+data Stream = forall s. Stream (s -> Step s) !s !Int
+
+unstreamList :: Stream -> [Char]
+unstreamList (Stream next s0 _) = unfold s0
+    where unfold !s = case next s of
+                        Done       -> []
+                        Skip s'    -> unfold s'
+                        Yield x s' -> x : unfold s'
+{-# INLINE [0] unstreamList #-}
+
+appendS :: Stream -> Stream -> Stream
+appendS (Stream next s len) _ = Stream next s len
+{-# INLINE [0] appendS #-}
+
+justifyLeftI :: Int -> Int -> Stream
+justifyLeftI k u =
+  let
+       next Nothing = next (Just 0)
+       next (Just n)
+           | n < k       = Yield 'a' (Just (n+1))
+           | otherwise   = Done
+       {-# INLINE next #-}
+
+     in Stream next Nothing (max k u)
+{-# INLINE [0] justifyLeftI #-}
+
+prettyPrintLogStats :: Int -> [String]
+prettyPrintLogStats rawResults = map fromRow columns
+  where
+    columns :: [Int]
+    columns = map (\_ -> 0) [rawResults]
+
+    moduleLen, lineLen :: Int
+    (moduleLen, lineLen) = foldr (\_ (_,_) -> (5, 2)) (0, 0) columns
+
+    fromRow :: Int -> String
+    fromRow x = unstreamList (justifyLeftI moduleLen x `appendS` justifyLeftI lineLen x)
+
+main :: IO ()
+main = do
+    timingsRef <- newIORef 0
+    timings <- readIORef timingsRef
+    putStrLn $ concat $ prettyPrintLogStats timings


=====================================
testsuite/tests/simplCore/should_run/T18638.stdout
=====================================
@@ -0,0 +1 @@
+aaaaa


=====================================
testsuite/tests/simplCore/should_run/all.T
=====================================
@@ -92,3 +92,4 @@ test('T17206', exit_code(1), compile_and_run, [''])
 test('T17151', [], multimod_compile_and_run, ['T17151', ''])
 test('T18012', normal, compile_and_run, [''])
 test('T17744', normal, compile_and_run, [''])
+test('T18638', normal, compile_and_run, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/98ff87a38d6a896a002ac9014327b1cfddeb28ce...c6dda93bdf791cc19298a2c35b8bdb040394c8a7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/98ff87a38d6a896a002ac9014327b1cfddeb28ce...c6dda93bdf791cc19298a2c35b8bdb040394c8a7
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/20200916/6e995dcf/attachment-0001.html>


More information about the ghc-commits mailing list