diff options
-rw-r--r-- | compiler/GHC/Tc/Errors/Hole.hs | 95 | ||||
-rw-r--r-- | compiler/GHC/Tc/Solver.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Tc/Solver/Monad.hs | 68 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T16875.hs | 13 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T16875.stderr | 12 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/all.T | 6 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/hard_hole_fits.hs | 48 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/hard_hole_fits.stderr | 674 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr | 25 |
10 files changed, 889 insertions, 61 deletions
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs index 4945b973e2..00e948bd10 100644 --- a/compiler/GHC/Tc/Errors/Hole.hs +++ b/compiler/GHC/Tc/Errors/Hole.hs @@ -66,7 +66,7 @@ import Data.List ( partition, sort, sortOn, nubBy ) import Data.Graph ( graphFromEdges, topSort ) -import GHC.Tc.Solver ( simplifyTopWanteds, runTcSDeriveds ) +import GHC.Tc.Solver ( simplifyTopWanteds, runTcSDerivedsEarlyAbort ) import GHC.Tc.Utils.Unify ( tcSubTypeSigma ) import GHC.HsToCore.Docs ( extractDocs ) @@ -391,6 +391,26 @@ cause bewildering error messages. The solution here is simple: if a candidate would cause the type checker to error, it is not a valid hole fit, and thus it is discarded. +Note [Speeding up valid hole-fits] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To fix #16875 we noted that a lot of time was being spent on uneccessary work. + +When we'd call `tcCheckHoleFit hole hole_ty ty`, we would end up by generating +a constraint to show that `hole_ty ~ ty`, including any constraints in `ty`. For +example, if `hole_ty = Int` and `ty = Foldable t => (a -> Bool) -> t a -> Bool`, +we'd have `(a_a1pa[sk:1] -> Bool) -> t_t2jk[sk:1] a_a1pa[sk:1] -> Bool ~# Int` +from the coercion, as well as `Foldable t_t2jk[sk:1]`. By adding a flag to +`TcSEnv` and adding a `runTcSDerivedsEarlyAbort`, we can fail as soon as we hit +an insoluble constraint. Since we don't need the result in the case that it +fails, a boolean `False` (i.e. "it didn't work" from `runTcSDerivedsEarlyAbort`) +is sufficient. + +We also check whether the type of the hole is an immutable type variable (i.e. +a skolem). In that case, the only possible fits are fits of exactly that type, +which can only come from the locals. This speeds things up quite a bit when we +don't know anything about the type of the hole. This also helps with degenerate +fits like (`id (_ :: a)` and `head (_ :: [a])`) when looking for fits of type +`a`, where `a` is a skolem. -} data HoleFitDispConfig = HFDC { showWrap :: Bool @@ -574,7 +594,11 @@ findValidHoleFits tidy_env implics simples h@(Hole { hole_sort = ExprHole _ map IdHFCand lclBinds ++ map GreHFCand lcl globals = map GreHFCand gbl syntax = map NameHFCand builtIns - to_check = locals ++ syntax ++ globals + -- If the hole is a rigid type-variable, then we only check the + -- locals, since only they can match the type (in a meaningful way). + only_locals = any isImmutableTyVar $ getTyVar_maybe hole_ty + to_check = if only_locals then locals + else locals ++ syntax ++ globals ; cands <- foldM (flip ($)) to_check candidatePlugins ; traceTc "numPlugins are:" $ ppr (length candidatePlugins) ; (searchDiscards, subs) <- @@ -876,7 +900,6 @@ tcFilterHoleFits limit typed_hole ht@(hole_ty, _) candidates = ; traceTc "Did it fit?" $ ppr fits ; traceTc "wrap is: " $ ppr wrp ; traceTc "checkingFitOf }" empty - ; z_wrp_tys <- zonkTcTypes (unfoldWrapper wrp) -- We'd like to avoid refinement suggestions like `id _ _` or -- `head _ _`, and only suggest refinements where our all phantom -- variables got unified during the checking. This can be disabled @@ -885,24 +908,26 @@ tcFilterHoleFits limit typed_hole ht@(hole_ty, _) candidates = -- variables, i.e. zonk them to read their final value to check for -- abstract refinements, and to report what the type of the simulated -- holes must be for this to be a match. - ; if fits - then if null ref_vars - then return (Just (z_wrp_tys, [])) - else do { let -- To be concrete matches, matches have to - -- be more than just an invented type variable. - fvSet = fvVarSet fvs - notAbstract :: TcType -> Bool - notAbstract t = case getTyVar_maybe t of - Just tv -> tv `elemVarSet` fvSet - _ -> True - allConcrete = all notAbstract z_wrp_tys - ; z_vars <- zonkTcTyVars ref_vars - ; let z_mtvs = mapMaybe tcGetTyVar_maybe z_vars - ; allFilled <- not <$> anyM isFlexiTyVar z_mtvs - ; allowAbstract <- goptM Opt_AbstractRefHoleFits - ; if allowAbstract || (allFilled && allConcrete ) - then return $ Just (z_wrp_tys, z_vars) - else return Nothing } + ; if fits then do { + -- Zonking is expensive, so we only do it if required. + z_wrp_tys <- zonkTcTypes (unfoldWrapper wrp) + ; if null ref_vars + then return (Just (z_wrp_tys, [])) + else do { let -- To be concrete matches, matches have to + -- be more than just an invented type variable. + fvSet = fvVarSet fvs + notAbstract :: TcType -> Bool + notAbstract t = case getTyVar_maybe t of + Just tv -> tv `elemVarSet` fvSet + _ -> True + allConcrete = all notAbstract z_wrp_tys + ; z_vars <- zonkTcTyVars ref_vars + ; let z_mtvs = mapMaybe tcGetTyVar_maybe z_vars + ; allFilled <- not <$> anyM isFlexiTyVar z_mtvs + ; allowAbstract <- goptM Opt_AbstractRefHoleFits + ; if allowAbstract || (allFilled && allConcrete ) + then return $ Just (z_wrp_tys, z_vars) + else return Nothing }} else return Nothing } where fvs = mkFVs ref_vars `unionFV` hole_fvs `unionFV` tyCoFVsOfType ty hole = typed_hole { th_hole = Nothing } @@ -942,7 +967,8 @@ tcSubsumes ty_a ty_b = fst <$> tcCheckHoleFit dummyHole ty_a ty_b -- constraints on the type of the hole. tcCheckHoleFit :: TypedHole -- ^ The hole to check against -> TcSigmaType - -- ^ The type to check against (possibly modified, e.g. refined) + -- ^ The type of the hole to check against (possibly modified, + -- e.g. refined with additional holes for refinement hole-fits.) -> TcSigmaType -- ^ The type to check whether fits. -> TcM (Bool, HsWrapper) -- ^ Whether it was a match, and the wrapper from hole_ty to ty. @@ -970,22 +996,21 @@ tcCheckHoleFit (TypedHole {..}) hole_ty ty = discardErrs $ -- The relevant constraints may contain HoleDests, so we must -- take care to clone them as well (to avoid #15370). ; cloned_relevants <- mapBagM cloneWanted th_relevant_cts - -- We wrap the WC in the nested implications, see + -- We wrap the WC in the nested implications, for details, see -- Note [Checking hole fits] - ; let outermost_first = reverse th_implics - -- We add the cloned relevants to the wanteds generated by - -- the call to tcSubType_NC, see Note [Relevant constraints] - -- There's no need to clone the wanteds, because they are - -- freshly generated by `tcSubtype_NC`. - w_rel_cts = addSimples wanted cloned_relevants - final_wc = foldr (setWCAndBinds fresh_binds) w_rel_cts outermost_first + ; let wrapInImpls cts = foldl (flip (setWCAndBinds fresh_binds)) cts th_implics + final_wc = wrapInImpls $ addSimples wanted cloned_relevants + -- We add the cloned relevants to the wanteds generated + -- by the call to tcSubType_NC, for details, see + -- Note [Relevant constraints]. There's no need to clone + -- the wanteds, because they are freshly generated by the + -- call to`tcSubtype_NC`. ; traceTc "final_wc is: " $ ppr final_wc - ; rem <- runTcSDeriveds $ simplifyTopWanteds final_wc - -- We don't want any insoluble or simple constraints left, but - -- solved implications are ok (and necessary for e.g. undefined) - ; traceTc "rems was:" $ ppr rem + -- See Note [Speeding up valid-hole fits] + ; (rem, _) <- tryTc $ runTcSDerivedsEarlyAbort $ simplifyTopWanteds final_wc ; traceTc "}" empty - ; return (isSolvedWC rem, wrap) } } + ; return (any isSolvedWC rem, wrap) + } } where setWCAndBinds :: EvBindsVar -- Fresh ev binds var. -> Implication -- The implication to put WC in. diff --git a/compiler/GHC/Tc/Solver.hs b/compiler/GHC/Tc/Solver.hs index 6d9770adbf..276c0b284b 100644 --- a/compiler/GHC/Tc/Solver.hs +++ b/compiler/GHC/Tc/Solver.hs @@ -23,7 +23,11 @@ module GHC.Tc.Solver( -- For Rules we need these solveWanteds, solveWantedsAndDrop, - approximateWC, runTcSDeriveds + approximateWC, runTcSDeriveds, + + -- We need this for valid hole-fits + runTcSDerivedsEarlyAbort + ) where import GHC.Prelude diff --git a/compiler/GHC/Tc/Solver/Monad.hs b/compiler/GHC/Tc/Solver/Monad.hs index b957b0ed0c..7baf9ea186 100644 --- a/compiler/GHC/Tc/Solver/Monad.hs +++ b/compiler/GHC/Tc/Solver/Monad.hs @@ -13,9 +13,8 @@ module GHC.Tc.Solver.Monad ( -- The TcS monad - TcS, runTcS, runTcSDeriveds, runTcSWithEvBinds, runTcSInerts, - failTcS, warnTcS, addErrTcS, wrapTcS, - runTcSEqualities, + TcS, runTcS, runTcSDeriveds, runTcSDerivedsEarlyAbort, runTcSWithEvBinds, + runTcSInerts, failTcS, warnTcS, addErrTcS, wrapTcS, runTcSEqualities, nestTcS, nestImplicTcS, setEvBindsTcS, emitImplicationTcS, emitTvImplicationTcS, @@ -614,10 +613,11 @@ When adding an equality to the inerts: addInertCan :: Ct -> TcS () -- Precondition: item /is/ canonical -- See Note [Adding an equality to the InertCans] -addInertCan ct - = do { traceTcS "addInertCan {" $ +addInertCan ct = + do { traceTcS "addInertCan {" $ text "Trying to insert new inert item:" <+> ppr ct - + ; mkTcS (\TcSEnv{tcs_abort_on_insoluble=abort_flag} -> + when (abort_flag && insolubleEqCt ct) TcM.failM) ; ics <- getInertCans ; ct <- maybeEmitShadow ics ct ; ics <- maybeKickOut ics ct @@ -1198,6 +1198,11 @@ data TcSEnv tcs_inerts :: IORef InertSet, -- Current inert set + -- Whether to throw an exception if we come across an insoluble constraint. + -- Used to fail-fast when checking for hole-fits. See Note [Speeding up + -- valid hole-fits]. + tcs_abort_on_insoluble :: Bool, + -- See Note [WorkList priorities] in GHC.Tc.Solver.InertSet tcs_worklist :: IORef WorkList -- Current worklist } @@ -1313,6 +1318,7 @@ runTcS tcs ; res <- runTcSWithEvBinds ev_binds_var tcs ; ev_binds <- TcM.getTcEvBindsMap ev_binds_var ; return (res, ev_binds) } + -- | This variant of 'runTcS' will keep solving, even when only Deriveds -- are left around. It also doesn't return any evidence, as callers won't -- need it. @@ -1321,6 +1327,14 @@ runTcSDeriveds tcs = do { ev_binds_var <- TcM.newTcEvBinds ; runTcSWithEvBinds ev_binds_var tcs } + +-- | This variant of 'runTcSDeriveds' will immediatley fail upon encountering an +-- insoluble ct. See Note [Speeding up valid-hole fits] +runTcSDerivedsEarlyAbort :: TcS a -> TcM a +runTcSDerivedsEarlyAbort tcs + = do { ev_binds_var <- TcM.newTcEvBinds + ; runTcSWithEvBinds' True True ev_binds_var tcs } + -- | This can deal only with equality constraints. runTcSEqualities :: TcS a -> TcM a runTcSEqualities thing_inside @@ -1332,7 +1346,7 @@ runTcSEqualities thing_inside runTcSInerts :: InertSet -> TcS a -> TcM (a, InertSet) runTcSInerts inerts tcs = do ev_binds_var <- TcM.newTcEvBinds - runTcSWithEvBinds' False ev_binds_var $ do + runTcSWithEvBinds' False False ev_binds_var $ do setTcSInerts inerts a <- tcs new_inerts <- getTcSInerts @@ -1341,27 +1355,29 @@ runTcSInerts inerts tcs = do runTcSWithEvBinds :: EvBindsVar -> TcS a -> TcM a -runTcSWithEvBinds = runTcSWithEvBinds' True +runTcSWithEvBinds = runTcSWithEvBinds' True False runTcSWithEvBinds' :: Bool -- ^ Restore type variable cycles afterwards? -- Don't if you want to reuse the InertSet. -- See also Note [Type variable cycles] -- in GHC.Tc.Solver.Canonical + -> Bool -> EvBindsVar -> TcS a -> TcM a -runTcSWithEvBinds' restore_cycles ev_binds_var tcs +runTcSWithEvBinds' restore_cycles abort_on_insoluble ev_binds_var tcs = do { unified_var <- TcM.newTcRef 0 ; step_count <- TcM.newTcRef 0 ; inert_var <- TcM.newTcRef emptyInert ; wl_var <- TcM.newTcRef emptyWorkList ; unif_lvl_var <- TcM.newTcRef Nothing - ; let env = TcSEnv { tcs_ev_binds = ev_binds_var - , tcs_unified = unified_var - , tcs_unif_lvl = unif_lvl_var - , tcs_count = step_count - , tcs_inerts = inert_var - , tcs_worklist = wl_var } + ; let env = TcSEnv { tcs_ev_binds = ev_binds_var + , tcs_unified = unified_var + , tcs_unif_lvl = unif_lvl_var + , tcs_count = step_count + , tcs_inerts = inert_var + , tcs_abort_on_insoluble = abort_on_insoluble + , tcs_worklist = wl_var } -- Run the computation ; res <- unTcS tcs env @@ -1418,10 +1434,11 @@ nestImplicTcS :: EvBindsVar -> TcLevel -> TcS a -> TcS a nestImplicTcS ref inner_tclvl (TcS thing_inside) - = TcS $ \ TcSEnv { tcs_unified = unified_var - , tcs_inerts = old_inert_var - , tcs_count = count - , tcs_unif_lvl = unif_lvl + = TcS $ \ TcSEnv { tcs_unified = unified_var + , tcs_inerts = old_inert_var + , tcs_count = count + , tcs_unif_lvl = unif_lvl + , tcs_abort_on_insoluble = abort_on_insoluble } -> do { inerts <- TcM.readTcRef old_inert_var ; let nest_inert = inerts { inert_cycle_breakers = [] @@ -1430,12 +1447,13 @@ nestImplicTcS ref inner_tclvl (TcS thing_inside) -- All other InertSet fields are inherited ; new_inert_var <- TcM.newTcRef nest_inert ; new_wl_var <- TcM.newTcRef emptyWorkList - ; let nest_env = TcSEnv { tcs_count = count -- Inherited - , tcs_unif_lvl = unif_lvl -- Inherited - , tcs_ev_binds = ref - , tcs_unified = unified_var - , tcs_inerts = new_inert_var - , tcs_worklist = new_wl_var } + ; let nest_env = TcSEnv { tcs_count = count -- Inherited + , tcs_unif_lvl = unif_lvl -- Inherited + , tcs_ev_binds = ref + , tcs_unified = unified_var + , tcs_inerts = new_inert_var + , tcs_abort_on_insoluble = abort_on_insoluble + , tcs_worklist = new_wl_var } ; res <- TcM.setTcLevel inner_tclvl $ thing_inside nest_env diff --git a/testsuite/tests/typecheck/should_compile/T16875.hs b/testsuite/tests/typecheck/should_compile/T16875.hs new file mode 100644 index 0000000000..0ba3c17d5b --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16875.hs @@ -0,0 +1,13 @@ +module T16875 where + +import Control.Applicative +import Control.Monad +import Data.Kind +import Data.List +import Data.Maybe +import Data.String +import GHC.Exts +import GHC.Types + +a = _ + diff --git a/testsuite/tests/typecheck/should_compile/T16875.stderr b/testsuite/tests/typecheck/should_compile/T16875.stderr new file mode 100644 index 0000000000..af6954792e --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T16875.stderr @@ -0,0 +1,12 @@ + +T16875.hs:12:5: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: p + Where: ‘p’ is a rigid type variable bound by + the inferred type of a :: p + at T16875.hs:12:1-5 + • In an equation for ‘a’: a = _ + • Relevant bindings include a :: p (bound at T16875.hs:12:1) + Valid hole fits include + a :: forall {p}. p + with a + (defined at T16875.hs:12:1) diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index f3be68a470..ca903c6295 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -397,6 +397,12 @@ test('abstract_refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fn test('free_monad_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits']) test('constraint_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits']) test('type_in_type_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits']) +test('hard_hole_fits', # Testing multiple hole-fits with lots in scope for #16875 + compile_timeout_multiplier(0.010), # 1 is 300s, 0.010 is 3s. Without hole-fits it takes 1s + compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -package ghc']) +test('T16875', # Testing one hole-fit with a lot in scope for #16875 + compile_timeout_multiplier(0.0015), #0.45s + compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -package ghc']) test('T15370', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits']) test('T7408', normal, compile, ['']) test('UnboxStrictPrimitiveFields', normal, compile, ['']) diff --git a/testsuite/tests/typecheck/should_compile/hard_hole_fits.hs b/testsuite/tests/typecheck/should_compile/hard_hole_fits.hs new file mode 100644 index 0000000000..e523c4eabe --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/hard_hole_fits.hs @@ -0,0 +1,48 @@ +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE RecordWildCards #-} + +-- typechecking goes really fast if you uncomment this line + +-- {-# OPTIONS_GHC -fmax-valid-hole-fits=0 #-} + +module SlowTypecheck where + +import Language.Haskell.Syntax.Expr +import GHC (GhcPs) + +testMe :: HsExpr GhcPs -> Int +testMe (HsVar a b) = _ +testMe (HsUnboundVar xuv uv) = _ +testMe (HsOverLabel xol m_ip) = _ +testMe (HsIPVar xv hin) = _ +testMe (HsOverLit xole hol) = _ +testMe (HsLit xle hl) = _ +testMe (HsLam xl mg) = _ +testMe (HsLamCase xlc mg) = _ +testMe (HsApp xa gl gl') = _ +testMe (HsAppType xate gl hwcb) = _ +testMe (OpApp xoa gl gl' gl2) = _ +testMe (NegApp xna gl se) = _ +testMe (HsPar xp gl ab ac) = _ +testMe (SectionL xsl gl gl') = _ +testMe (SectionR xsr gl gl') = _ +testMe (ExplicitTuple xet gls box) = _ +testMe (ExplicitSum xes n i gl) = _ +testMe (HsCase xc gl mg) = _ +testMe (HsIf xi m_se gl gl' ) = _ +testMe (HsMultiIf xmi gls) = _ +testMe (HsLet xl gl gl') = _ +testMe (HsDo xd hsc gl) = _ +testMe (ExplicitList xel m_se) = _ +testMe (RecordCon xrc gl hrf) = _ +testMe (RecordUpd xru gl gls) = _ +testMe (ExprWithTySig xewts gl hwcb) = _ +testMe (ArithSeq xas m_se asi) = _ +testMe (HsBracket xb hb) = _ +testMe (HsRnBracketOut xrbo hb prss) = _ +testMe (HsTcBracketOut xtbo hb ptss as) = _ +testMe (HsSpliceE xse hs) = _ +testMe (HsProc xp pat gl) = _ +testMe (HsStatic xs gl) = _ +testMe (XExpr xe) = _ + diff --git a/testsuite/tests/typecheck/should_compile/hard_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/hard_hole_fits.stderr new file mode 100644 index 0000000000..b30f55179b --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/hard_hole_fits.stderr @@ -0,0 +1,674 @@ + +hard_hole_fits.hs:14:22: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsVar a b) = _ + • Relevant bindings include + b :: Language.Haskell.Syntax.Extension.LIdP GhcPs + (bound at hard_hole_fits.hs:14:17) + a :: Language.Haskell.Syntax.Extension.XVar GhcPs + (bound at hard_hole_fits.hs:14:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:15:32: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsUnboundVar xuv uv) = _ + • Relevant bindings include + uv :: GHC.Types.Name.Occurrence.OccName + (bound at hard_hole_fits.hs:15:26) + xuv :: Language.Haskell.Syntax.Extension.XUnboundVar GhcPs + (bound at hard_hole_fits.hs:15:22) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:16:33: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsOverLabel xol m_ip) = _ + • Relevant bindings include + m_ip :: GHC.Data.FastString.FastString + (bound at hard_hole_fits.hs:16:25) + xol :: Language.Haskell.Syntax.Extension.XOverLabel GhcPs + (bound at hard_hole_fits.hs:16:21) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:17:27: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsIPVar xv hin) = _ + • Relevant bindings include + hin :: Language.Haskell.Syntax.Type.HsIPName + (bound at hard_hole_fits.hs:17:20) + xv :: Language.Haskell.Syntax.Extension.XIPVar GhcPs + (bound at hard_hole_fits.hs:17:17) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:18:31: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsOverLit xole hol) = _ + • Relevant bindings include + hol :: Language.Haskell.Syntax.Lit.HsOverLit GhcPs + (bound at hard_hole_fits.hs:18:24) + xole :: Language.Haskell.Syntax.Extension.XOverLitE GhcPs + (bound at hard_hole_fits.hs:18:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:19:25: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsLit xle hl) = _ + • Relevant bindings include + hl :: Language.Haskell.Syntax.Lit.HsLit GhcPs + (bound at hard_hole_fits.hs:19:19) + xle :: Language.Haskell.Syntax.Extension.XLitE GhcPs + (bound at hard_hole_fits.hs:19:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:20:24: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsLam xl mg) = _ + • Relevant bindings include + mg :: MatchGroup GhcPs (LHsExpr GhcPs) + (bound at hard_hole_fits.hs:20:18) + xl :: Language.Haskell.Syntax.Extension.XLam GhcPs + (bound at hard_hole_fits.hs:20:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:21:29: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsLamCase xlc mg) = _ + • Relevant bindings include + mg :: MatchGroup GhcPs (LHsExpr GhcPs) + (bound at hard_hole_fits.hs:21:23) + xlc :: Language.Haskell.Syntax.Extension.XLamCase GhcPs + (bound at hard_hole_fits.hs:21:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:22:28: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsApp xa gl gl') = _ + • Relevant bindings include + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:22:21) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:22:18) + xa :: Language.Haskell.Syntax.Extension.XApp GhcPs + (bound at hard_hole_fits.hs:22:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:23:35: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsAppType xate gl hwcb) = _ + • Relevant bindings include + hwcb :: Language.Haskell.Syntax.Type.LHsWcType + (Language.Haskell.Syntax.Extension.NoGhcTc GhcPs) + (bound at hard_hole_fits.hs:23:27) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:23:24) + xate :: Language.Haskell.Syntax.Extension.XAppTypeE GhcPs + (bound at hard_hole_fits.hs:23:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:24:33: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (OpApp xoa gl gl' gl2) = _ + • Relevant bindings include + gl2 :: LHsExpr GhcPs (bound at hard_hole_fits.hs:24:26) + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:24:22) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:24:19) + xoa :: Language.Haskell.Syntax.Extension.XOpApp GhcPs + (bound at hard_hole_fits.hs:24:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:25:29: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (NegApp xna gl se) = _ + • Relevant bindings include + se :: SyntaxExpr GhcPs (bound at hard_hole_fits.hs:25:23) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:25:20) + xna :: Language.Haskell.Syntax.Extension.XNegApp GhcPs + (bound at hard_hole_fits.hs:25:16) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:26:30: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsPar xp gl ab ac) = _ + • Relevant bindings include + ac :: Language.Haskell.Syntax.Extension.LHsToken ")" GhcPs + (bound at hard_hole_fits.hs:26:24) + ab :: LHsExpr GhcPs (bound at hard_hole_fits.hs:26:21) + gl :: Language.Haskell.Syntax.Extension.LHsToken "(" GhcPs + (bound at hard_hole_fits.hs:26:18) + xp :: Language.Haskell.Syntax.Extension.XPar GhcPs + (bound at hard_hole_fits.hs:26:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:27:32: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (SectionL xsl gl gl') = _ + • Relevant bindings include + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:27:25) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:27:22) + xsl :: Language.Haskell.Syntax.Extension.XSectionL GhcPs + (bound at hard_hole_fits.hs:27:18) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:28:32: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (SectionR xsr gl gl') = _ + • Relevant bindings include + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:28:25) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:28:22) + xsr :: Language.Haskell.Syntax.Extension.XSectionR GhcPs + (bound at hard_hole_fits.hs:28:18) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:29:38: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: + testMe (ExplicitTuple xet gls box) = _ + • Relevant bindings include + box :: GHC.Types.Basic.Boxity (bound at hard_hole_fits.hs:29:31) + gls :: [HsTupArg GhcPs] (bound at hard_hole_fits.hs:29:27) + xet :: Language.Haskell.Syntax.Extension.XExplicitTuple GhcPs + (bound at hard_hole_fits.hs:29:23) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:30:35: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (ExplicitSum xes n i gl) = _ + • Relevant bindings include + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:30:29) + i :: GHC.Types.Basic.Arity (bound at hard_hole_fits.hs:30:27) + n :: GHC.Types.Basic.ConTag (bound at hard_hole_fits.hs:30:25) + xes :: Language.Haskell.Syntax.Extension.XExplicitSum GhcPs + (bound at hard_hole_fits.hs:30:21) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + n :: GHC.Types.Basic.ConTag (bound at hard_hole_fits.hs:30:25) + i :: GHC.Types.Basic.Arity (bound at hard_hole_fits.hs:30:27) + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:31:28: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsCase xc gl mg) = _ + • Relevant bindings include + mg :: MatchGroup GhcPs (LHsExpr GhcPs) + (bound at hard_hole_fits.hs:31:22) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:31:19) + xc :: Language.Haskell.Syntax.Extension.XCase GhcPs + (bound at hard_hole_fits.hs:31:16) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:32:33: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsIf xi m_se gl gl') = _ + • Relevant bindings include + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:32:25) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:32:22) + m_se :: LHsExpr GhcPs (bound at hard_hole_fits.hs:32:17) + xi :: Language.Haskell.Syntax.Extension.XIf GhcPs + (bound at hard_hole_fits.hs:32:14) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:33:30: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsMultiIf xmi gls) = _ + • Relevant bindings include + gls :: [LGRHS GhcPs (LHsExpr GhcPs)] + (bound at hard_hole_fits.hs:33:23) + xmi :: Language.Haskell.Syntax.Extension.XMultiIf GhcPs + (bound at hard_hole_fits.hs:33:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:34:28: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsLet xl gl gl') = _ + • Relevant bindings include + gl' :: LHsExpr GhcPs (bound at hard_hole_fits.hs:34:21) + gl :: Language.Haskell.Syntax.Binds.HsLocalBinds GhcPs + (bound at hard_hole_fits.hs:34:18) + xl :: Language.Haskell.Syntax.Extension.XLet GhcPs + (bound at hard_hole_fits.hs:34:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:35:27: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsDo xd hsc gl) = _ + • Relevant bindings include + gl :: Language.Haskell.Syntax.Extension.XRec + GhcPs [ExprLStmt GhcPs] + (bound at hard_hole_fits.hs:35:21) + hsc :: HsDoFlavour (bound at hard_hole_fits.hs:35:17) + xd :: Language.Haskell.Syntax.Extension.XDo GhcPs + (bound at hard_hole_fits.hs:35:14) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:36:34: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (ExplicitList xel m_se) = _ + • Relevant bindings include + m_se :: [LHsExpr GhcPs] (bound at hard_hole_fits.hs:36:26) + xel :: Language.Haskell.Syntax.Extension.XExplicitList GhcPs + (bound at hard_hole_fits.hs:36:22) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:37:33: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (RecordCon xrc gl hrf) = _ + • Relevant bindings include + hrf :: HsRecordBinds GhcPs (bound at hard_hole_fits.hs:37:26) + gl :: Language.Haskell.Syntax.Extension.XRec + GhcPs (Language.Haskell.Syntax.Pat.ConLikeP GhcPs) + (bound at hard_hole_fits.hs:37:23) + xrc :: Language.Haskell.Syntax.Extension.XRecordCon GhcPs + (bound at hard_hole_fits.hs:37:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:38:33: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (RecordUpd xru gl gls) = _ + • Relevant bindings include + gls :: Either + [Language.Haskell.Syntax.Pat.LHsRecUpdField GhcPs] + [LHsRecUpdProj GhcPs] + (bound at hard_hole_fits.hs:38:26) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:38:23) + xru :: Language.Haskell.Syntax.Extension.XRecordUpd GhcPs + (bound at hard_hole_fits.hs:38:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:39:40: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: + testMe (ExprWithTySig xewts gl hwcb) = _ + • Relevant bindings include + hwcb :: Language.Haskell.Syntax.Type.LHsSigWcType + (Language.Haskell.Syntax.Extension.NoGhcTc GhcPs) + (bound at hard_hole_fits.hs:39:32) + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:39:29) + xewts :: Language.Haskell.Syntax.Extension.XExprWithTySig GhcPs + (bound at hard_hole_fits.hs:39:23) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:40:34: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (ArithSeq xas m_se asi) = _ + • Relevant bindings include + asi :: ArithSeqInfo GhcPs (bound at hard_hole_fits.hs:40:27) + m_se :: Maybe (SyntaxExpr GhcPs) (bound at hard_hole_fits.hs:40:22) + xas :: Language.Haskell.Syntax.Extension.XArithSeq GhcPs + (bound at hard_hole_fits.hs:40:18) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:41:28: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsBracket xb hb) = _ + • Relevant bindings include + hb :: HsBracket GhcPs (bound at hard_hole_fits.hs:41:22) + xb :: Language.Haskell.Syntax.Extension.XBracket GhcPs + (bound at hard_hole_fits.hs:41:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:42:40: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: + testMe (HsRnBracketOut xrbo hb prss) = _ + • Relevant bindings include + prss :: [PendingRnSplice' GhcPs] (bound at hard_hole_fits.hs:42:32) + hb :: HsBracket (HsBracketRn GhcPs) + (bound at hard_hole_fits.hs:42:29) + xrbo :: Language.Haskell.Syntax.Extension.XRnBracketOut GhcPs + (bound at hard_hole_fits.hs:42:24) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:43:43: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: + testMe (HsTcBracketOut xtbo hb ptss as) = _ + • Relevant bindings include + as :: [PendingTcSplice' GhcPs] (bound at hard_hole_fits.hs:43:37) + ptss :: HsBracket (HsBracketRn GhcPs) + (bound at hard_hole_fits.hs:43:32) + hb :: Maybe GHC.Tc.Types.Evidence.QuoteWrapper + (bound at hard_hole_fits.hs:43:29) + xtbo :: Language.Haskell.Syntax.Extension.XTcBracketOut GhcPs + (bound at hard_hole_fits.hs:43:24) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:44:29: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsSpliceE xse hs) = _ + • Relevant bindings include + hs :: HsSplice GhcPs (bound at hard_hole_fits.hs:44:23) + xse :: Language.Haskell.Syntax.Extension.XSpliceE GhcPs + (bound at hard_hole_fits.hs:44:19) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:45:29: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsProc xp pat gl) = _ + • Relevant bindings include + gl :: LHsCmdTop GhcPs (bound at hard_hole_fits.hs:45:23) + pat :: Language.Haskell.Syntax.Pat.LPat GhcPs + (bound at hard_hole_fits.hs:45:19) + xp :: Language.Haskell.Syntax.Extension.XProc GhcPs + (bound at hard_hole_fits.hs:45:16) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:46:27: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (HsStatic xs gl) = _ + • Relevant bindings include + gl :: LHsExpr GhcPs (bound at hard_hole_fits.hs:46:21) + xs :: Language.Haskell.Syntax.Extension.XStatic GhcPs + (bound at hard_hole_fits.hs:46:18) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + +hard_hole_fits.hs:47:1: warning: [-Woverlapping-patterns (in -Wdefault)] + Pattern match is redundant + In an equation for ‘testMe’: testMe (XExpr xe) = ... + +hard_hole_fits.hs:47:21: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: Int + • In an equation for ‘testMe’: testMe (XExpr xe) = _ + • Relevant bindings include + xe :: Language.Haskell.Syntax.Extension.XXExpr GhcPs + (bound at hard_hole_fits.hs:47:15) + testMe :: HsExpr GhcPs -> Int (bound at hard_hole_fits.hs:14:1) + Valid hole fits include + maxBound :: forall a. Bounded a => a + with maxBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) + minBound :: forall a. Bounded a => a + with minBound @Int + (imported from ‘Prelude’ at hard_hole_fits.hs:8:8-20 + (and originally defined in ‘GHC.Enum’)) diff --git a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs index 345a6c8f8e..20fac107d7 100644 --- a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs +++ b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs @@ -5,3 +5,6 @@ f = _ g :: [Integer] -> Integer g = _ 0 + +j :: a -> a +j a = _ diff --git a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr index 5941b587bf..80249908b8 100644 --- a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr +++ b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr @@ -85,6 +85,10 @@ refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] with ($!) @GHC.Types.LiftedRep @[Integer] @Integer (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.Base’)) + j (_ :: [Integer] -> Integer) + where j :: forall a. a -> a + with j @([Integer] -> Integer) + (bound at refinement_hole_fits.hs:10:1) id (_ :: [Integer] -> Integer) where id :: forall a. a -> a with id @([Integer] -> Integer) @@ -180,6 +184,10 @@ refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] with ($!) @GHC.Types.LiftedRep @Integer @([Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.Base’)) + j (_ :: Integer -> [Integer] -> Integer) + where j :: forall a. a -> a + with j @(Integer -> [Integer] -> Integer) + (bound at refinement_hole_fits.hs:10:1) id (_ :: Integer -> [Integer] -> Integer) where id :: forall a. a -> a with id @(Integer -> [Integer] -> Integer) @@ -206,3 +214,20 @@ refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] with (!!) @(Integer -> [Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) + +refinement_hole_fits.hs:10:7: warning: [-Wtyped-holes (in -Wdefault)] + • Found hole: _ :: a + Where: ‘a’ is a rigid type variable bound by + the type signature for: + j :: forall a. a -> a + at refinement_hole_fits.hs:9:1-11 + • In an equation for ‘j’: j a = _ + • Relevant bindings include + a :: a (bound at refinement_hole_fits.hs:10:3) + j :: a -> a (bound at refinement_hole_fits.hs:10:1) + Valid hole fits include + a :: a (bound at refinement_hole_fits.hs:10:3) + Valid refinement hole fits include + j (_ :: a) + where j :: a -> a + (bound at refinement_hole_fits.hs:10:1) |