[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 7 commits: Renamer: reinstate the template haskell level check in notFound
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 3bd7dd44 by mangoiv at 2025-12-04T04:36:45-05:00 Renamer: reinstate the template haskell level check in notFound Out-of-scope names might be caused by a staging error, as is explained by Note [Out of scope might be a staging error] in GHC.Tc.Utils.Env.hs. This logic was assumed to be dead code after 217caad1 and has thus been removed. This commit reintroduces it and thus fixes issue #26099. - - - - - 0318010b by Zubin Duggal at 2025-12-04T04:37:27-05:00 testlib: Optionally include the way name in the expected output file This allows us to have different outputs for different ways. - - - - - 6d945fdd by Zubin Duggal at 2025-12-04T04:37:27-05:00 testsuite: Accept output of tests failing in ext-interp way due to differing compilation requirements Fixes #26552 - - - - - 0ffc5243 by Cheng Shao at 2025-12-04T04:38:09-05:00 devx: minor fixes for compile_flags.txt This patch includes minor fixes for compile_flags.txt to improve developer experience when using clangd as language server to hack on RTS C sources: - Ensure `-fPIC` is passed and `__PIC__` is defined, to be coherent with `-DDYNAMIC` and ensure the `__PIC__` guarded code paths are indexed - Add the missing `-DRtsWay` definition, otherwise a few source files like `RtsUtils.c` and `Trace.c` would produce clangd errors - - - - - de728aab by Cheng Shao at 2025-12-04T05:11:01-05:00 rts: workaround -Werror=maybe-uninitialized false positives In some cases gcc might report -Werror=maybe-uninitialized that we know are false positives, but need to workaround it to make validate builds with -Werror pass. - - - - - 4a8fb42a by Cheng Shao at 2025-12-04T05:11:01-05:00 hadrian: use -Og as C/C++ optimization level when debugging This commit enables -Og as optimization level when compiling the debug ways of rts. According to gcc documentation (https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-Og), -Og is a better choice than -O0 for producing debuggable code. It's also supported by clang as well, so it makes sense to use it as a default for debugging. Also add missing -g3 flag to C++ compilation flags in +debug_info flavour transformer. - - - - - b6a2ee63 by mangoiv at 2025-12-04T05:11:07-05:00 ExplicitLevelImports: improve documentation of the code - more explicit names for variable names like `flg` or `topLevel` - don't pass the same value twice to functions - some explanations of interesting but undocumented code paths - adjust comment to not mention non-existent error message - - - - - 19 changed files: - compile_flags.txt - compiler/GHC/Rename/Splice.hs - compiler/GHC/Tc/Solver/Monad.hs - compiler/GHC/Tc/Utils/Env.hs - hadrian/src/Flavour.hs - hadrian/src/Settings/Packages.hs - rts/linker/InitFini.c - rts/sm/Sanity.c - testsuite/driver/testlib.py - + testsuite/tests/driver/T20696/T20696.stderr-ext-interp - testsuite/tests/driver/T20696/all.T - testsuite/tests/driver/fat-iface/all.T - + testsuite/tests/driver/fat-iface/fat012.stderr-ext-interp - + testsuite/tests/driver/fat-iface/fat015.stderr-ext-interp - + testsuite/tests/splice-imports/SI07.stderr-ext-interp - testsuite/tests/splice-imports/all.T - + testsuite/tests/th/T26099.hs - + testsuite/tests/th/T26099.stderr - testsuite/tests/th/all.T Changes: ===================================== compile_flags.txt ===================================== @@ -1,3 +1,6 @@ +-fPIC +-U__PIC__ +-D__PIC__ -Wimplicit -include rts/include/ghcversion.h @@ -27,3 +30,4 @@ rts/include/ghcversion.h -DDEBUG -DDYNAMIC -DPROFILING +-DRtsWay="rts_thr_debug_p_dyn" ===================================== compiler/GHC/Rename/Splice.hs ===================================== @@ -182,12 +182,12 @@ rnUntypedBracket e br_body } rn_utbracket :: HsQuote GhcPs -> RnM (HsQuote GhcRn, FreeVars) -rn_utbracket (VarBr _ flg rdr_name) - = do { name <- lookupOccRn (if flg then WL_Term else WL_Type) (unLoc rdr_name) +rn_utbracket (VarBr _ is_value_name rdr_name) + = do { name <- lookupOccRn (if is_value_name then WL_Term else WL_Type) (unLoc rdr_name) ; let res_name = L (l2l (locA rdr_name)) (WithUserRdr (unLoc rdr_name) name) - ; if flg then checkThLocalNameNoLift res_name else checkThLocalTyName name - ; check_namespace flg name - ; return (VarBr noExtField flg (noLocA name), unitFV name) } + ; if is_value_name then checkThLocalNameNoLift res_name else checkThLocalTyName name + ; check_namespace is_value_name name + ; return (VarBr noExtField is_value_name (noLocA name), unitFV name) } rn_utbracket (ExpBr _ e) = do { (e', fvs) <- rnLExpr e ; return (ExpBr noExtField e', fvs) } @@ -919,8 +919,7 @@ checkThLocalTyName name ; case mb_local_use of { Nothing -> return () ; -- Not a locally-bound thing Just (top_lvl, bind_lvl, use_lvl) -> - do { let use_lvl_idx = thLevelIndex use_lvl - -- We don't check the well levelledness of name here. + do -- We don't check the well levelledness of name here. -- this would break test for #20969 -- -- Consequently there is no check&restiction for top level splices. @@ -929,11 +928,11 @@ checkThLocalTyName name -- Therefore checkCrossLevelLiftingTy shouldn't assume anything -- about bind_lvl and use_lvl relation. -- - ; traceRn "checkThLocalTyName" (ppr name <+> ppr bind_lvl + { traceRn "checkThLocalTyName" (ppr name <+> ppr bind_lvl <+> ppr use_lvl <+> ppr use_lvl) ; dflags <- getDynFlags - ; checkCrossLevelLiftingTy dflags top_lvl bind_lvl use_lvl use_lvl_idx name } } } + ; checkCrossLevelLiftingTy dflags top_lvl bind_lvl use_lvl name } } } -- | Check whether we are allowed to use a Name in this context (for TH purposes) -- In the case of a level incorrect program, attempt to fix it by using @@ -947,15 +946,18 @@ checkThLocalNameWithLift = checkThLocalName True checkThLocalNameNoLift :: LIdOccP GhcRn -> RnM () checkThLocalNameNoLift name = checkThLocalName False name >> return () --- | Implemenation of the level checks +-- | Implementation of the level checks -- See Note [Template Haskell levels] checkThLocalName :: Bool -> LIdOccP GhcRn -> RnM (HsExpr GhcRn) checkThLocalName allow_lifting name_var -- Exact and Orig names are not imported, so presumed available at all levels. + -- whenever the user uses exact names, e.g. say @'mkNameG_v' "" "Foo" "bar"@, + -- even though the 'mkNameG_v' here is essentially a quotation, we do not do + -- level checks as we assume that the user was trying to bypass the level checks | isExact (userRdrName (unLoc name_var)) || isOrig (userRdrName (unLoc name_var)) = return (HsVar noExtField name_var) - | isUnboundName name -- Do not report two errors for - = return (HsVar noExtField name_var) -- $(not_in_scope args) + | isUnboundName name -- Do not report two errors for + = return (HsVar noExtField name_var) -- $(not_in_scope args) | isWiredInName name = return (HsVar noExtField name_var) | otherwise @@ -964,16 +966,15 @@ checkThLocalName allow_lifting name_var ; case mb_local_use of { Nothing -> return (HsVar noExtField name_var) ; -- Not a locally-bound thing Just (top_lvl, bind_lvl, use_lvl) -> - do { let use_lvl_idx = thLevelIndex use_lvl - ; cur_mod <- extractModule <$> getGblEnv + do { cur_mod <- extractModule <$> getGblEnv ; let is_local | Just mod <- nameModule_maybe name = mod == cur_mod | otherwise = True - ; traceRn "checkThLocalName" (ppr name <+> ppr bind_lvl <+> ppr use_lvl <+> ppr use_lvl) + ; traceRn "checkThLocalName" (ppr name <+> ppr bind_lvl <+> ppr use_lvl) ; dflags <- getDynFlags ; env <- getGlobalRdrEnv ; let mgre = lookupGRE_Name env name - ; checkCrossLevelLifting dflags (LevelCheckSplice name mgre) top_lvl is_local allow_lifting bind_lvl use_lvl use_lvl_idx name_var } } } + ; checkCrossLevelLifting dflags (LevelCheckSplice name mgre) top_lvl is_local allow_lifting bind_lvl use_lvl name_var } } } where name = getName name_var @@ -981,14 +982,21 @@ checkThLocalName allow_lifting name_var checkCrossLevelLifting :: DynFlags -> LevelCheckReason -> TopLevelFlag + -- ^ whether or not the identifier is a top level identifier -> Bool + -- ^ the name of the current module is the name of the module + -- of the name that we're examining (if it exists) -> Bool + -- ^ whether or not the compiler is allowed to insert + -- 'lift' to fix a potential staging error -> Set.Set ThLevelIndex + -- ^ the levels at which the identifier is bound -> ThLevel - -> ThLevelIndex + -- ^ the level that the identifier is being used at -> LIdOccP GhcRn + -- ^ the identifier that is being checked -> TcM (HsExpr GhcRn) -checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use_lvl use_lvl_idx name_var +checkCrossLevelLifting dflags reason top_lvl_flg is_local allow_lifting bind_lvl use_lvl name_var -- 1. If name is in-scope, at the correct level. | use_lvl_idx `Set.member` bind_lvl = return (HsVar noExtField name_var) -- 2. Name is imported with -XImplicitStagePersistence @@ -996,11 +1004,12 @@ checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use , xopt LangExt.ImplicitStagePersistence dflags = return (HsVar noExtField name_var) -- 3. Name is top-level, with -XImplicitStagePersistence, and needs -- to be persisted into the future. - | isTopLevel top_lvl + | isTopLevel top_lvl_flg , is_local , any (use_lvl_idx >=) (Set.toList bind_lvl) , xopt LangExt.ImplicitStagePersistence dflags = when (isExternalName name) (keepAlive name) >> return (HsVar noExtField name_var) -- 4. Name is in a bracket, and lifting is allowed + -- We need to increment at most once because nested brackets are not allowed | Brack _ pending <- use_lvl , any (\bind_idx -> use_lvl_idx == incThLevelIndex bind_idx) (Set.toList bind_lvl) , allow_lifting @@ -1020,10 +1029,11 @@ checkCrossLevelLifting dflags reason top_lvl is_local allow_lifting bind_lvl use | otherwise = addErrTc (TcRnBadlyLevelled reason bind_lvl use_lvl_idx Nothing ErrorWithoutFlag ) >> return (HsVar noExtField name_var) where name = getName name_var + use_lvl_idx = thLevelIndex use_lvl -checkCrossLevelLiftingTy :: DynFlags -> TopLevelFlag -> Set.Set ThLevelIndex -> ThLevel -> ThLevelIndex -> Name -> TcM () -checkCrossLevelLiftingTy dflags top_lvl bind_lvl _use_lvl use_lvl_idx name - | isTopLevel top_lvl +checkCrossLevelLiftingTy :: DynFlags -> TopLevelFlag -> Set.Set ThLevelIndex -> ThLevel -> Name -> TcM () +checkCrossLevelLiftingTy dflags top_lvl_flg bind_lvl use_lvl name + | isTopLevel top_lvl_flg , xopt LangExt.ImplicitStagePersistence dflags = return () @@ -1038,6 +1048,8 @@ checkCrossLevelLiftingTy dflags top_lvl bind_lvl _use_lvl use_lvl_idx name | otherwise = return () + where + use_lvl_idx = thLevelIndex use_lvl {- Note [Keeping things alive for Template Haskell] ===================================== compiler/GHC/Tc/Solver/Monad.hs ===================================== @@ -1683,17 +1683,15 @@ which is defined at the top-level and therefore fails with an error that we have the stage restriction. ``` -Main.hs:12:14: error: - • GHC stage restriction: - instance for ‘Show - (T ())’ is used in a top-level splice, quasi-quote, or annotation, - and must be imported, not defined locally +Main.hs:10:14: error: [GHC-28914] + • Level error: instance for ‘Show (T ())’ is bound at level 0 + but used at level -1 • In the expression: foo [|| T () ||] - In the Template Haskell splice $$(foo [|| T () ||]) + In the typed Template Haskell splice: $$(foo [|| T () ||]) In the expression: $$(foo [|| T () ||]) | -12 | let x = $$(foo [|| T () ||]) - | +10 | let x = $$(foo [|| T () ||]) + | ^^^ ``` Solving a `Typeable (T t1 ...tn)` constraint generates code that relies on ===================================== compiler/GHC/Tc/Utils/Env.hs ===================================== @@ -8,6 +8,7 @@ -- in module Language.Haskell.Syntax.Extension {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE MultiWayIf #-} module GHC.Tc.Utils.Env( TyThing(..), TcTyThing(..), TcId, @@ -1213,6 +1214,20 @@ pprBinders bndrs = pprWithCommas ppr bndrs notFound :: Name -> TcM TyThing notFound name = do { lcl_env <- getLclEnv + ; lvls <- getCurrentAndBindLevel name + ; if -- See Note [Out of scope might be a staging error] + | isUnboundName name -> failM -- If the name really isn't in scope + -- don't report it again (#11941) + -- the + -- the 'Nothing' case of 'getCurrentAndBindLevel' + -- currently means 'isUnboundName' but to avoid + -- introducing bugs after a refactoring of that + -- function, we check this completely independently + -- before scrutinizing lvls + | Just (_top_lvl_flag, bind_lvls, lvl@Splice {}) <- lvls + -> failWithTc (TcRnBadlyLevelled (LevelCheckSplice name Nothing) bind_lvls (thLevelIndex lvl) Nothing ErrorWithoutFlag) + | otherwise -> pure () + ; if isTermVarOrFieldNameSpace (nameNameSpace name) then -- This code path is only reachable with RequiredTypeArguments enabled @@ -1243,14 +1258,23 @@ wrongThingErr expected thing name = {- Note [Out of scope might be a staging error] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider - x = 3 - data T = MkT $(foo x) + type T = Int + foo = $(1 :: T) + +GHC currently leaves the user some liberty when it comes to using +types in a manner that is theoretically not well-staged. +E.g. if `T` here were to be a value, we would reject the program with +a staging error. Since it is a type though, we allow it for backwards +compatibility reasons. + +However, in this case, we're just in the process of renaming a splice +when trying to type check an expression involving a type, that hasn't +even been added to the (type checking) environment yet. That is, why +it is out of scope. -where 'foo' is imported from somewhere. +The reason why we cannot recognise this issue earlier is, that if we +are not actually type checking the splice, i.e. if we're only using the +name of the type (e.g. ''T), the program should be accepted. -This is really a staging error, because we can't run code involving 'x'. -But in fact the type checker processes types first, so 'x' won't even be -in the type envt when we look for it in $(foo x). So inside splices we -report something missing from the type env as a staging error. -See #5752 and #5795. +We stop and report a staging error. -} ===================================== hadrian/src/Flavour.hs ===================================== @@ -166,6 +166,7 @@ enableDebugInfo :: Flavour -> Flavour enableDebugInfo = addArgs $ notStage0 ? mconcat [ builder (Ghc CompileHs) ? pure ["-g3"] , builder (Ghc CompileCWithGhc) ? pure ["-optc-g3"] + , builder (Ghc CompileCppWithGhc) ? pure ["-optcxx-g3"] , builder (Cc CompileC) ? arg "-g3" , builder (Cabal Setup) ? arg "--disable-library-stripping" , builder (Cabal Setup) ? arg "--disable-executable-stripping" ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -351,7 +351,7 @@ rtsPackageArgs = package rts ? do , Debug `wayUnit` way ? pure [ "-DDEBUG" , "-fno-omit-frame-pointer" , "-g3" - , "-O0" ] + , "-Og" ] -- Set the namespace for the rts fs functions , arg $ "-DFS_NAMESPACE=rts" ===================================== rts/linker/InitFini.c ===================================== @@ -75,7 +75,7 @@ static void sortInitFiniList(struct InitFiniList **slist, enum SortOrder order) while (*last != NULL && (*last)->next != NULL) { struct InitFiniList *s0 = *last; struct InitFiniList *s1 = s0->next; - bool flip; + bool flip = false; switch (order) { case INCREASING: flip = s0->priority > s1->priority; break; case DECREASING: flip = s0->priority < s1->priority; break; ===================================== rts/sm/Sanity.c ===================================== @@ -692,7 +692,7 @@ checkCompactObjects(bdescr *bd) ASSERT((W_)str == (W_)block + sizeof(StgCompactNFDataBlock)); StgWord totalW = 0; - StgCompactNFDataBlock *last; + StgCompactNFDataBlock *last = block; for ( ; block ; block = block->next) { last = block; ASSERT(block->owner == str); ===================================== testsuite/driver/testlib.py ===================================== @@ -1971,7 +1971,7 @@ async def do_compile(name: TestName, # of whether we expected the compilation to fail or not (successful # compilations may generate warnings). - expected_stderr_file = find_expected_file(name, 'stderr') + expected_stderr_file = find_expected_file(name, 'stderr', way) actual_stderr_file = add_suffix(name, 'comp.stderr') diff_file_name = in_testdir(add_suffix(name, 'comp.diff')) @@ -2012,7 +2012,7 @@ async def compile_cmp_asm(name: TestName, # of whether we expected the compilation to fail or not (successful # compilations may generate warnings). - expected_asm_file = find_expected_file(name, 'asm') + expected_asm_file = find_expected_file(name, 'asm', way) actual_asm_file = add_suffix(name, 's') if not await compare_outputs(way, 'asm', @@ -2036,7 +2036,7 @@ async def compile_grep_asm(name: TestName, if badResult(result): return result - expected_pat_file = find_expected_file(name, 'asm') + expected_pat_file = find_expected_file(name, 'asm', way) actual_asm_file = add_suffix(name, 's') if not grep_output(join_normalisers(normalise_errmsg), @@ -2058,7 +2058,7 @@ async def compile_grep_core(name: TestName, if badResult(result): return result - expected_pat_file = find_expected_file(name, 'substr-simpl') + expected_pat_file = find_expected_file(name, 'substr-simpl', way) actual_core_file = add_suffix(name, 'dump-simpl') if not grep_output(join_normalisers(normalise_errmsg), @@ -2097,7 +2097,7 @@ async def compile_and_run__(name: TestName, return result if compile_stderr: - expected_stderr_file = find_expected_file(name, 'ghc.stderr') + expected_stderr_file = find_expected_file(name, 'ghc.stderr', way) actual_stderr_file = add_suffix(name, 'comp.stderr') diff_file_name = in_testdir(add_suffix(name, 'comp.diff')) @@ -2556,7 +2556,7 @@ def get_compiler_flags() -> List[str]: async def stdout_ok(name: TestName, way: WayName) -> bool: actual_stdout_file = add_suffix(name, 'run.stdout') - expected_stdout_file = find_expected_file(name, 'stdout') + expected_stdout_file = find_expected_file(name, 'stdout', way) extra_norm = join_normalisers(normalise_output, getTestOpts().extra_normaliser) @@ -2583,7 +2583,7 @@ def dump_stdout( name: TestName ) -> None: async def stderr_ok(name: TestName, way: WayName) -> bool: actual_stderr_file = add_suffix(name, 'run.stderr') - expected_stderr_file = find_expected_file(name, 'stderr') + expected_stderr_file = find_expected_file(name, 'stderr', way) return await compare_outputs(way, 'stderr', join_normalisers(normalise_errmsg, getTestOpts().extra_errmsg_normaliser), \ @@ -2688,7 +2688,7 @@ async def check_hp_ok(name: TestName) -> bool: return False async def check_prof_ok(name: TestName, way: WayName) -> bool: - expected_prof_file = find_expected_file(name, 'prof.sample') + expected_prof_file = find_expected_file(name, 'prof.sample', way) expected_prof_path = in_testdir(expected_prof_file) # Check actual prof file only if we have an expected prof file to @@ -3368,18 +3368,19 @@ def in_statsdir(name: Union[Path, str], suffix: str='') -> Path: # Finding the sample output. The filename is of the form # -# <test>.stdout[-ws-<wordsize>][-<platform>|-<os>] +# <test>.stdout[-ws-<wordsize>][-<platform>|-<os>][-<way>] # -def find_expected_file(name: TestName, suff: str) -> Path: +def find_expected_file(name: TestName, suff: str, way: WayName) -> Path: basename = add_suffix(name, suff) # Override the basename if the user has specified one, this will then be # subjected to the same name mangling scheme as normal to allow platform # specific overrides to work. basename = getTestOpts().use_specs.get(suff, basename) - files = [str(basename) + ws + plat + files = [str(basename) + ws + plat + way_ext for plat in ['-' + config.platform, '-' + config.os, ''] - for ws in ['-ws-' + config.wordsize, '']] + for ws in ['-ws-' + config.wordsize, ''] + for way_ext in ['-' + way, '']] for f in files: if in_srcdir(f).exists(): ===================================== testsuite/tests/driver/T20696/T20696.stderr-ext-interp ===================================== @@ -0,0 +1,3 @@ +[1 of 3] Compiling C ( C.hs, C.o ) +[2 of 3] Compiling B ( B.hs, B.o ) +[3 of 3] Compiling A ( A.hs, A.o ) ===================================== testsuite/tests/driver/T20696/all.T ===================================== @@ -1,5 +1,4 @@ test('T20696', [extra_files(['A.hs', 'B.hs', 'C.hs']) - , expect_broken_for(26552, ['ext-interp']) , unless(ghc_dynamic(), skip)], multimod_compile, ['A', '']) test('T20696-static', [extra_files(['A.hs', 'B.hs', 'C.hs']) , when(ghc_dynamic(), skip)], multimod_compile, ['A', '']) ===================================== testsuite/tests/driver/fat-iface/all.T ===================================== @@ -9,12 +9,12 @@ test('fat010', [req_th,extra_files(['THA.hs', 'THB.hs', 'THC.hs']), copy_files], # Check linking works when using -fbyte-code-and-object-code test('fat011', [req_th, extra_files(['FatMain.hs', 'FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatMain', '-fbyte-code-and-object-code -fprefer-byte-code']) # Check that we use interpreter rather than enable dynamic-too if needed for TH -test('fat012', [req_th, expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code']) +test('fat012', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fprefer-byte-code']) # Check that no objects are generated if using -fno-code and -fprefer-byte-code test('fat013', [req_th, req_bco, extra_files(['FatTH.hs', 'FatQuote.hs'])], multimod_compile, ['FatTH', '-fno-code -fprefer-byte-code']) # When using interpreter should not produce objects test('fat014', [req_th, extra_files(['FatTH.hs', 'FatQuote.hs']), extra_run_opts('-fno-code')], ghci_script, ['fat014.script']) -test('fat015', [req_th, expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface']) +test('fat015', [req_th, unless(ghc_dynamic(), skip), extra_files(['FatQuote.hs', 'FatQuote1.hs', 'FatQuote2.hs', 'FatTH1.hs', 'FatTH2.hs', 'FatTHTop.hs'])], multimod_compile, ['FatTHTop', '-fno-code -fwrite-interface']) test('T22807', [req_th, unless(ghc_dynamic(), skip), extra_files(['T22807A.hs', 'T22807B.hs'])] , makefile_test, ['T22807']) test('T22807_ghci', [req_th, unless(ghc_dynamic(), skip), extra_files(['T22807_ghci.hs'])] ===================================== testsuite/tests/driver/fat-iface/fat012.stderr-ext-interp ===================================== @@ -0,0 +1,2 @@ +[1 of 2] Compiling FatQuote ( FatQuote.hs, FatQuote.o ) +[2 of 2] Compiling FatTH ( FatTH.hs, FatTH.o ) ===================================== testsuite/tests/driver/fat-iface/fat015.stderr-ext-interp ===================================== @@ -0,0 +1,6 @@ +[1 of 6] Compiling FatQuote ( FatQuote.hs, FatQuote.o, interpreted ) +[2 of 6] Compiling FatQuote1 ( FatQuote1.hs, interpreted ) +[3 of 6] Compiling FatQuote2 ( FatQuote2.hs, FatQuote2.o ) +[4 of 6] Compiling FatTH1 ( FatTH1.hs, nothing ) +[5 of 6] Compiling FatTH2 ( FatTH2.hs, nothing ) +[6 of 6] Compiling FatTHTop ( FatTHTop.hs, nothing ) ===================================== testsuite/tests/splice-imports/SI07.stderr-ext-interp ===================================== @@ -0,0 +1,3 @@ +[1 of 3] Compiling SI05A ( SI05A.hs, SI05A.o ) +[2 of 3] Compiling SI07A ( SI07A.hs, nothing ) +[3 of 3] Compiling SI07 ( SI07.hs, nothing ) ===================================== testsuite/tests/splice-imports/all.T ===================================== @@ -9,7 +9,7 @@ test('SI03', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI03', '-v0'] test('SI04', [extra_files(["SI01A.hs"])], multimod_compile, ['SI04', '-v0']) test('SI05', [extra_files(["SI01A.hs"])], multimod_compile_fail, ['SI05', '-v0']) test('SI06', [extra_files(["SI01A.hs"])], multimod_compile, ['SI06', '-v0']) -test('SI07', [expect_broken_for(26552, ['ext-interp']), unless(ghc_dynamic(), skip), extra_files(["SI05A.hs"])], multimod_compile, ['SI07', '-fwrite-interface -fno-code']) +test('SI07', [unless(ghc_dynamic(), skip), extra_files(["SI05A.hs"])], multimod_compile, ['SI07', '-fwrite-interface -fno-code']) # Instance tests test('SI08', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile_fail, ['SI08', '-v0']) test('SI09', [extra_files(["ClassA.hs", "InstanceA.hs"])], multimod_compile, ['SI09', '-v0']) ===================================== testsuite/tests/th/T26099.hs ===================================== @@ -0,0 +1,6 @@ +{-# LANGUAGE TemplateHaskell #-} +module M where + +type T = Int + +a = $(3 :: T) ===================================== testsuite/tests/th/T26099.stderr ===================================== @@ -0,0 +1,6 @@ +T26099.hs:6:12: error: [GHC-28914] + • Level error: ‘T’ is bound at level 0 but used at level -1 + • In an expression type signature: T + In the expression: 3 :: T + In the untyped splice: $(3 :: T) + ===================================== testsuite/tests/th/all.T ===================================== @@ -642,3 +642,4 @@ test('QQInQuote', normal, compile, ['']) test('QQTopError', normal, compile_fail, ['-fdiagnostics-show-caret']) test('GadtConSigs_th_pprint1', normal, compile, ['']) test('GadtConSigs_th_dump1', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) +test('T26099', normal, compile_fail, ['']) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/420913f9ff12d6a3e1a0f75ac18debd... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/420913f9ff12d6a3e1a0f75ac18debd... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)