[Git][ghc/ghc][master] [Fix #27287] preserve ModBreaks in ModIface
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 4396a6f2 by Andrea Vezzosi at 2026-07-10T11:09:25-04:00 [Fix #27287] preserve ModBreaks in ModIface - - - - - 20 changed files: - compiler/GHC/ByteCode/Breakpoints.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/Driver/Main/Compile.hs - compiler/GHC/Driver/Main/Hsc.hs - compiler/GHC/Driver/Main/Passes.hs - compiler/GHC/HsToCore/Breakpoints.hs - + compiler/GHC/HsToCore/Breakpoints/Types.hs - compiler/GHC/Iface/Load.hs - compiler/GHC/Iface/Make.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/GHC/Unit/Module/ModIface.hs - compiler/GHC/Unit/Module/WholeCoreBindings.hs - compiler/GHC/Utils/Binary.hs - compiler/ghc.cabal.in - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/ghci/should_run/Makefile - + testsuite/tests/ghci/should_run/T27287.hs - + testsuite/tests/ghci/should_run/T27287.stdout - testsuite/tests/ghci/should_run/all.T Changes: ===================================== compiler/GHC/ByteCode/Breakpoints.hs ===================================== @@ -41,7 +41,7 @@ import qualified Data.ByteString.Short as SBS import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IM -import GHC.HsToCore.Breakpoints +import GHC.HsToCore.Breakpoints.Types import GHC.Iface.Syntax import GHC.Unit.Module (Module) ===================================== compiler/GHC/ByteCode/Types.hs ===================================== @@ -46,7 +46,7 @@ import GHC.Utils.Binary import GHC.Utils.Outputable import GHC.Builtin.PrimOps import GHC.Types.SptEntry -import GHC.HsToCore.Breakpoints +import GHC.HsToCore.Breakpoints.Types import GHC.ByteCode.Breakpoints import GHCi.Message import GHCi.RemoteTypes @@ -376,4 +376,3 @@ instance Binary FFIInfo where get bh = FFIInfo <$> get bh <*> get bh put_ bh FFIInfo {..} = put_ bh ffiInfoArgs *> put_ bh ffiInfoRet - ===================================== compiler/GHC/Driver/Main/Compile.hs ===================================== @@ -331,11 +331,11 @@ compileWholeCoreBindings hsc_env type_env wcb = do gen_bytecode core_binds stubs foreign_files = do let cgi_guts = CgInteractiveGuts wcb_module core_binds (typeEnvTyCons type_env) stubs foreign_files - Nothing [] NoHpcInfo + wcb_modBreaks [] NoHpcInfo trace_if logger (text "Generating ByteCode for" <+> ppr wcb_module) mkModuleByteCode hsc_env wcb_module wcb_mod_location cgi_guts - WholeCoreBindings {wcb_module, wcb_mod_location, wcb_foreign} = wcb + WholeCoreBindings {wcb_module, wcb_mod_location, wcb_foreign, wcb_modBreaks} = wcb logger = hsc_logger hsc_env ===================================== compiler/GHC/Driver/Main/Hsc.hs ===================================== @@ -61,6 +61,8 @@ import GHC.Iface.Load ( ifaceStats ) import GHC.Iface.Make import GHC.Iface.Tidy +import GHC.HsToCore.Breakpoints.Types (ModBreaks) + import GHC.Core import GHC.Parser.Errors.Types @@ -191,9 +193,10 @@ initModDetails hsc_env iface = -- | Assemble 'WholeCoreBindings' if the interface contains Core bindings. iface_core_bindings :: ModIface -> ModLocation -> Maybe WholeCoreBindings iface_core_bindings iface wcb_mod_location = - mi_simplified_core <&> \(IfaceSimplifiedCore bindings foreign') -> + mi_simplified_core <&> \(IfaceSimplifiedCore bindings mbreaks foreign') -> WholeCoreBindings { wcb_bindings = bindings, + wcb_modBreaks = mbreaks, wcb_module = mi_module, wcb_mod_location, wcb_foreign = foreign' @@ -311,17 +314,19 @@ genModDetails hsc_env old_iface -- generates interface files. See Note [hscSimpleIface - mkBootModDetailsTc] hscSimpleIface :: HscEnv -> Maybe CoreProgram + -> Maybe ModBreaks -> TcGblEnv -> ModSummary -> IO (ModIface, ModDetails) -hscSimpleIface hsc_env mb_core_program tc_result summary - = runHsc hsc_env $ hscSimpleIface' mb_core_program tc_result summary +hscSimpleIface hsc_env mb_core_program mb_modBreaks tc_result summary + = runHsc hsc_env $ hscSimpleIface' mb_core_program mb_modBreaks tc_result summary hscSimpleIface' :: Maybe CoreProgram + -> Maybe ModBreaks -> TcGblEnv -> ModSummary -> Hsc (ModIface, ModDetails) -hscSimpleIface' mb_core_program tc_result summary = do +hscSimpleIface' mb_core_program mb_modBreaks tc_result summary = do hsc_env <- getHscEnv logger <- getLogger details <- liftIO $ mkBootModDetailsTc logger tc_result @@ -329,7 +334,7 @@ hscSimpleIface' mb_core_program tc_result summary = do new_iface <- {-# SCC "MkFinalIface" #-} liftIO $ - mkIfaceTc hsc_env safe_mode details summary mb_core_program tc_result + mkIfaceTc hsc_env safe_mode details summary mb_core_program mb_modBreaks tc_result -- And the answer is ... liftIO $ dumpIfaceStats hsc_env return (new_iface, details) ===================================== compiler/GHC/Driver/Main/Passes.hs ===================================== @@ -424,7 +424,7 @@ hsc_typecheck tc_rn_opts mod_summary mb_rdr_module = do Nothing -> hscParse' mod_summary tc_result0 <- tcRnModule' mod_summary tc_rn_opts' hpm if hsc_src == HsigFile - then do (iface, _) <- liftIO $ hscSimpleIface hsc_env Nothing tc_result0 mod_summary + then do (iface, _) <- liftIO $ hscSimpleIface hsc_env Nothing Nothing tc_result0 mod_summary ioMsgMaybe $ hoistTcRnMessage $ tcRnMergeSignatures hsc_env hpm tc_result0 iface else return tc_result0 @@ -895,7 +895,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h liftIO $ hscTidy hsc_env simplified_guts (iface, _details) <- liftIO $ - hscSimpleIface hsc_env (Just $ cg_binds cg_guts) tc_result summary + hscSimpleIface hsc_env (Just $ cg_binds cg_guts) (cg_modBreaks cg_guts) tc_result summary liftIO $ hscMaybeWriteIface logger dflags True iface mb_old_hash (ms_location summary) @@ -910,7 +910,7 @@ hscDesugarAndSimplify summary (FrontendTypecheck tc_result) tc_warnings mb_old_h -- and generate a simple interface. _ -> do (iface, _details) <- liftIO $ - hscSimpleIface hsc_env Nothing tc_result summary + hscSimpleIface hsc_env Nothing Nothing tc_result summary liftIO $ hscMaybeWriteIface logger dflags True iface mb_old_hash (ms_location summary) @@ -1715,4 +1715,3 @@ jsCodeGen hsc_env srcspan i this_mod stg_binds_with_deps binding_id = do mkForeignRef href (freeReallyRemoteRef inst href) return (castForeignRef binding_fref, dep_linkables, this_pkgs_loaded) - ===================================== compiler/GHC/HsToCore/Breakpoints.hs ===================================== @@ -23,54 +23,15 @@ module GHC.HsToCore.Breakpoints import GHC.Prelude import Data.Array -import qualified Data.ByteString.Short as SBS import GHC.HsToCore.Ticks (Tick (..)) +import GHC.HsToCore.Breakpoints.Types import GHC.Data.SizedSeq -import GHC.Types.SrcLoc (SrcSpan) -import GHC.Types.Name (OccName) -import GHC.Types.Tickish (BreakTickIndex, BreakpointId(..)) import GHC.Unit.Module (Module) import GHC.Utils.Binary import GHC.Utils.Encoding (utf8EncodeShortByteString) import GHC.Utils.Outputable import Data.List (intersperse) -import Data.Coerce - --------------------------------------------------------------------------------- --- ModBreaks --------------------------------------------------------------------------------- - --- | All the information about the source-relevant breakpoints for a module --- --- This information is constructed once during desugaring (with `mkModBreaks`) --- from breakpoint ticks and fixed/unchanged from there on forward. It could be --- exported as an abstract datatype because it should never be updated after --- construction, only queried. --- --- The arrays can be indexed using the int in the corresponding 'BreakpointId' --- (i.e. the 'BreakpointId' whose 'Module' matches the 'Module' corresponding --- to these 'ModBreaks') with the accessors 'modBreaks_locs', 'modBreaks_vars', --- and 'modBreaks_decls'. -data ModBreaks - = ModBreaks - { modBreaks_locs_ :: !(Array BreakTickIndex BinSrcSpan) - -- ^ An array giving the source span of each breakpoint. - , modBreaks_vars :: !(Array BreakTickIndex [OccName]) - -- ^ An array giving the names of the free variables at each breakpoint. - , modBreaks_decls :: !(Array BreakTickIndex [String]) - -- ^ An array giving the names of the declarations enclosing each breakpoint. - -- See Note [Field modBreaks_decls] - , modBreaks_ccs :: !(Array BreakTickIndex (SBS.ShortByteString, SBS.ShortByteString)) - -- ^ Array pointing to cost centre info for each breakpoint; - -- actual 'CostCentre' allocation is done at link-time. - , modBreaks_module :: !Module - -- ^ The module to which this ModBreaks is associated. - -- We also cache this here for internal sanity checks. - } - -modBreaks_locs :: ModBreaks -> Array BreakTickIndex SrcSpan -modBreaks_locs = coerce . modBreaks_locs_ -- | Initialize memory for breakpoint data that is shared between the bytecode -- generator and the interpreter. @@ -113,13 +74,3 @@ The breakpoint is in the function called "baz" that is declared in a `let` or `where` clause of a declaration called "bar", which itself is declared in a `let` or `where` clause of the top-level function called "foo". -} - -instance Binary ModBreaks where - get bh = ModBreaks <$> get bh <*> get bh <*> get bh <*> get bh <*> get bh - - put_ bh ModBreaks {..} = - put_ bh modBreaks_locs_ - *> put_ bh modBreaks_vars - *> put_ bh modBreaks_decls - *> put_ bh modBreaks_ccs - *> put_ bh modBreaks_module ===================================== compiler/GHC/HsToCore/Breakpoints/Types.hs ===================================== @@ -0,0 +1,82 @@ +{-# LANGUAGE RecordWildCards #-} + +-- | Information attached to Breakpoints generated from Ticks +-- +-- The breakpoint information stored in 'ModBreaks' is generated during +-- desugaring from the ticks annotating the source expressions. +-- +-- This information can be queried per-breakpoint using the 'BreakpointId' +-- datatype, which indexes tick-level breakpoint information. +-- +-- 'ModBreaks' and 'BreakpointId's are not to be confused with +-- 'InternalModBreaks' and 'InternalBreakId's. The latter are constructed +-- during bytecode generation and can be found in 'GHC.ByteCode.Breakpoints'. +-- +-- See Note [ModBreaks vs InternalModBreaks] and Note [Breakpoint identifiers] +module GHC.HsToCore.Breakpoints.Types + ( -- * ModBreaks + ModBreaks(..), modBreaks_locs + + -- ** Re-exports BreakpointId + , BreakpointId(..), BreakTickIndex + ) where + +import GHC.Prelude +import Data.Array +import qualified Data.ByteString.Short as SBS + +import GHC.Types.SrcLoc (SrcSpan) +import GHC.Types.Name (OccName) +import GHC.Types.Tickish (BreakTickIndex, BreakpointId(..)) +import GHC.Unit.Module (Module) +import Data.Coerce +import GHC.Utils.Binary (BinSrcSpan(..), Binary(..)) +import Control.DeepSeq + +-------------------------------------------------------------------------------- +-- ModBreaks +-------------------------------------------------------------------------------- + +-- | All the information about the source-relevant breakpoints for a module +-- +-- This information is constructed once during desugaring (with `mkModBreaks`) +-- from breakpoint ticks and fixed/unchanged from there on forward. It could be +-- exported as an abstract datatype because it should never be updated after +-- construction, only queried. +-- +-- The arrays can be indexed using the int in the corresponding 'BreakpointId' +-- (i.e. the 'BreakpointId' whose 'Module' matches the 'Module' corresponding +-- to these 'ModBreaks') with the accessors 'modBreaks_locs', 'modBreaks_vars', +-- and 'modBreaks_decls'. +data ModBreaks + = ModBreaks + { modBreaks_locs_ :: !(Array BreakTickIndex BinSrcSpan) + -- ^ An array giving the source span of each breakpoint. + , modBreaks_vars :: !(Array BreakTickIndex [OccName]) + -- ^ An array giving the names of the free variables at each breakpoint. + , modBreaks_decls :: !(Array BreakTickIndex [String]) + -- ^ An array giving the names of the declarations enclosing each breakpoint. + -- See Note [Field modBreaks_decls] + , modBreaks_ccs :: !(Array BreakTickIndex (SBS.ShortByteString, SBS.ShortByteString)) + -- ^ Array pointing to cost centre info for each breakpoint; + -- actual 'CostCentre' allocation is done at link-time. + , modBreaks_module :: !Module + -- ^ The module to which this ModBreaks is associated. + -- We also cache this here for internal sanity checks. + } + +modBreaks_locs :: ModBreaks -> Array BreakTickIndex SrcSpan +modBreaks_locs = coerce . modBreaks_locs_ + +instance Binary ModBreaks where + get bh = ModBreaks <$> get bh <*> get bh <*> get bh <*> get bh <*> get bh + + put_ bh ModBreaks {..} = + put_ bh modBreaks_locs_ + *> put_ bh modBreaks_vars + *> put_ bh modBreaks_decls + *> put_ bh modBreaks_ccs + *> put_ bh modBreaks_module + +instance NFData ModBreaks where + rnf (ModBreaks a b c d e) = rnf a `seq` rnf b `seq` rnf c `seq` rnf d `seq` rnf e \ No newline at end of file ===================================== compiler/GHC/Iface/Load.hs ===================================== @@ -61,6 +61,8 @@ import GHC.Iface.Rename import GHC.Iface.Env import GHC.Iface.Errors as Iface_Errors +import GHC.HsToCore.Breakpoints.Types (modBreaks_locs) + import GHC.Tc.Errors.Types import GHC.Tc.Utils.Monad @@ -111,6 +113,7 @@ import GHC.Unit.Env import GHC.Data.Maybe import Control.Monad +import qualified Data.Foldable as Foldable import Data.Map ( toList ) import System.FilePath import System.Directory @@ -1158,9 +1161,11 @@ pprModIface unit_state iface , vcat [ppr ver $$ nest 2 (ppr decl) | (ver,decl) <- mi_decls iface] , case mi_simplified_core iface of Nothing -> empty - Just (IfaceSimplifiedCore eds fs) -> + Just (IfaceSimplifiedCore eds mbs fs) -> vcat [ text "extra decls:" $$ nest 2 (vcat ([ppr bs | bs <- eds])) + , text "mod breaks:" + $$ nest 2 (ppr $ Foldable.toList . modBreaks_locs <$> mbs) , text "foreign stubs:" $$ nest 2 (ppr fs) ] ===================================== compiler/GHC/Iface/Make.hs ===================================== @@ -34,6 +34,7 @@ import GHC.Iface.Syntax import GHC.Iface.Recomp import GHC.Iface.Load import GHC.Iface.Ext.Fields +import GHC.HsToCore.Breakpoints.Types (ModBreaks) import GHC.CoreToIface @@ -121,11 +122,12 @@ mkPartialIface hsc_env core_prog mod_details mod_summary import_decls , mg_safe_haskell = safe_mode , mg_trust_pkg = self_trust , mg_docs = docs + , mg_modBreaks = modBreaks } = do self_recomp <- traverse (mkSelfRecomp hsc_env this_mod (ms_hs_hash mod_summary)) usages return $ mkIface_ hsc_env this_mod core_prog hsc_src deps rdr_env import_decls fix_env warns self_trust - safe_mode self_recomp docs mod_details + safe_mode self_recomp docs mod_details modBreaks -- | Fully instantiate an interface. Adds fingerprints and potentially code -- generator produced information. @@ -227,9 +229,10 @@ mkIfaceTc :: HscEnv -> ModDetails -- gotten from mkBootModDetails, probably -> ModSummary -> Maybe CoreProgram + -> Maybe ModBreaks -> TcGblEnv -- Usages, deprecations, etc -> IO ModIface -mkIfaceTc hsc_env safe_mode mod_details mod_summary mb_program +mkIfaceTc hsc_env safe_mode mod_details mod_summary mb_program mb_modBreaks tc_result@TcGblEnv{ tcg_mod = this_mod, tcg_src = hsc_src, tcg_imports = imports, @@ -257,6 +260,7 @@ mkIfaceTc hsc_env safe_mode mod_details mod_summary mb_program (imp_trust_own_pkg imports) safe_mode self_recomp docs mod_details + mb_modBreaks mkFullIface hsc_env partial_iface Nothing Nothing NoStubs [] @@ -303,6 +307,7 @@ mkIface_ :: HscEnv -> Module -> CoreProgram -> HscSource -> Maybe IfaceSelfRecomp -> Maybe Docs -> ModDetails + -> Maybe ModBreaks -> PartialModIface mkIface_ hsc_env this_mod core_prog hsc_src deps rdr_env import_decls fix_env src_warns @@ -320,7 +325,7 @@ mkIface_ hsc_env -- only at the TypeEnv. The previous Tidy phase has -- put exactly the info into the TypeEnv that we want -- to expose in the interface - + modBreaks = do let home_unit = hsc_home_unit hsc_env semantic_mod = homeModuleNameInstantiation home_unit (moduleName this_mod) @@ -328,7 +333,7 @@ mkIface_ hsc_env simplified_core = if gopt Opt_WriteIfSimplifiedCore dflags - then Just (IfaceSimplifiedCore [ toIfaceTopBind b | b <- core_prog ] emptyIfaceForeign) + then Just (IfaceSimplifiedCore [ toIfaceTopBind b | b <- core_prog ] modBreaks emptyIfaceForeign) else Nothing decls = [ tyThingToIfaceDecl entity | entity <- entities, ===================================== compiler/GHC/Iface/Recomp.hs ===================================== @@ -1256,7 +1256,7 @@ addFingerprints hsc_env iface0 = do sorted_extra_decls :: Maybe IfaceSimplifiedCore sorted_extra_decls = mi_simplified_core iface0 <&> \simpl_core -> - IfaceSimplifiedCore (sortOn binding_key (mi_sc_extra_decls simpl_core)) (mi_sc_foreign simpl_core) + IfaceSimplifiedCore (sortOn binding_key (mi_sc_extra_decls simpl_core)) (mi_sc_modBreaks simpl_core) (mi_sc_foreign simpl_core) -- The interface hash depends on: -- - the ABI hash, plus ===================================== compiler/GHC/Unit/Module/ModGuts.hs ===================================== @@ -7,7 +7,7 @@ where import GHC.Prelude -import GHC.HsToCore.Breakpoints +import GHC.HsToCore.Breakpoints.Types import GHC.ForeignSrcLang import GHC.Hs ===================================== compiler/GHC/Unit/Module/ModIface.hs ===================================== @@ -122,6 +122,8 @@ import GHC.Iface.Flags import GHC.Iface.Ext.Fields import GHC.Iface.Recomp.Types +import GHC.HsToCore.Breakpoints.Types + import GHC.Unit import GHC.Unit.Module.Deps import GHC.Unit.Module.Warnings @@ -420,6 +422,8 @@ data IfaceSimplifiedCore = IfaceSimplifiedCore { -- ^ Extra variable definitions which are **NOT** exposed but when -- combined with mi_decls allows us to restart code generation. -- See Note [Interface Files with Core Definitions] and Note [Interface File with Core: Sharing RHSs] + , mi_sc_modBreaks :: Maybe ModBreaks + -- ^ If breakpoints are present in @mi_sc_extra_decls@ this field provides this field provides the metadata required by the bytecode debugger. , mi_sc_foreign :: IfaceForeign -- ^ Foreign stubs and files to supplement 'mi_extra_decls_'. -- See Note [Foreign stubs and TH bytecode linking] @@ -749,14 +753,16 @@ instance Binary IfaceAbiHashes where } instance Binary IfaceSimplifiedCore where - put_ bh (IfaceSimplifiedCore eds fs) = do + put_ bh (IfaceSimplifiedCore eds mbs fs) = do put_ bh eds + put_ bh mbs put_ bh fs get bh = do eds <- get bh + mbs <- get bh fs <- get bh - return (IfaceSimplifiedCore eds fs) + return (IfaceSimplifiedCore eds mbs fs) emptyPartialModIface :: Module -> PartialModIface emptyPartialModIface mod @@ -865,7 +871,7 @@ instance NFData IfaceModInfo where instance NFData IfaceSimplifiedCore where - rnf (IfaceSimplifiedCore eds fs) = rnf eds `seq` rnf fs + rnf (IfaceSimplifiedCore eds mbs fs) = rnf eds `seq` rnf mbs `seq` rnf fs instance NFData IfaceAbiHashes where rnf (IfaceAbiHashes a1 a2 a3 a4 a5 a6) ===================================== compiler/GHC/Unit/Module/WholeCoreBindings.hs ===================================== @@ -8,6 +8,7 @@ import GHC.Cmm.CLabel import GHC.Driver.DynFlags (DynFlags (targetPlatform), initSDocContext) import GHC.ForeignSrcLang (ForeignSrcLang (..)) import GHC.Iface.Syntax +import GHC.HsToCore.Breakpoints.Types (ModBreaks) import GHC.Prelude import GHC.Types.ForeignStubs import GHC.Unit.Module.Location @@ -122,6 +123,7 @@ the object files. data WholeCoreBindings = WholeCoreBindings { wcb_bindings :: [IfaceBindingX IfaceMaybeRhs IfaceTopBndrInfo] -- ^ serialised tidied core bindings. + , wcb_modBreaks :: Maybe ModBreaks -- ^ if @wcb_bindings@ contains breakpoints, this field provides the metadata required by the bytecode debugger. , wcb_module :: Module -- ^ The module which the bindings are for , wcb_mod_location :: ModLocation -- ^ The location where the sources reside. -- | Stubs for foreign declarations and files added via ===================================== compiler/GHC/Utils/Binary.hs ===================================== @@ -1974,6 +1974,7 @@ instance Binary UnhelpfulSpanReason where _ -> UnhelpfulOther <$> get bh newtype BinSrcSpan = BinSrcSpan { unBinSrcSpan :: SrcSpan } + deriving newtype NFData instance Binary GeneratedSrcSpanDetails where put_ bh (OrigSpan ss) = do ===================================== compiler/ghc.cabal.in ===================================== @@ -572,6 +572,7 @@ Library GHC.HsToCore.Arrows GHC.HsToCore.Binds GHC.HsToCore.Breakpoints + GHC.HsToCore.Breakpoints.Types GHC.HsToCore.Coverage GHC.HsToCore.Docs GHC.HsToCore.Errors.Ppr ===================================== testsuite/tests/count-deps/CountDepsParser.stdout ===================================== @@ -116,6 +116,7 @@ GHC.Hs.Pat GHC.Hs.Specificity GHC.Hs.Type GHC.Hs.Utils +GHC.HsToCore.Breakpoints.Types GHC.HsToCore.Errors.Types GHC.HsToCore.Pmc.Solver.Types GHC.Iface.Errors.Types ===================================== testsuite/tests/ghci/should_run/Makefile ===================================== @@ -13,3 +13,7 @@ TopEnvIface: # Second compilation starts from interface files, but still can print "a" "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) TopEnvIface -v1 -fno-hide-source-paths -e "a" -e ":q" -fwrite-if-simplified-core -fwrite-interface +T27287: + "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) T27287.hs -v1 -fno-hide-source-paths -e ":q" -fwrite-if-simplified-core -fwrite-interface + # Second compilation starts from interface files, but still can print "a" + "$(TEST_HC)" $(TEST_HC_OPTS_INTERACTIVE) T27287.hs -v1 -fno-hide-source-paths -e ":break T27287 5" -e ":q" -fwrite-if-simplified-core -fwrite-interface ===================================== testsuite/tests/ghci/should_run/T27287.hs ===================================== @@ -0,0 +1,6 @@ +module T27287 where + +myfun :: String -> String +myfun xs = case reverse xs of + [] -> "empty" + xy -> xy ===================================== testsuite/tests/ghci/should_run/T27287.stdout ===================================== @@ -0,0 +1,6 @@ +[1 of 1] Compiling T27287 ( T27287.hs, interpreted )[main] +Ok, one module loaded. +Leaving GHCi. +Ok, one module loaded. +Breakpoint 0 activated at T27287.hs:5:9-15 +Leaving GHCi. ===================================== testsuite/tests/ghci/should_run/all.T ===================================== @@ -8,6 +8,7 @@ test('ghcirun002', just_ghci, compile_and_run, ['']) test('ghcirun003', just_ghci, compile_and_run, ['']) test('T2589', just_ghci, compile_and_run, ['']) test('T2881', just_ghci, compile_and_run, ['']) +test('T27287', [just_ghci, combined_output], makefile_test, []) test('T3171', [when(opsys('mingw32'),skip), View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4396a6f2a4c7799908e1e0b88a218a51... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/4396a6f2a4c7799908e1e0b88a218a51... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)