summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthías Páll Gissurarson <mpg@mpg.is>2018-01-26 13:07:36 -0500
committerBen Gamari <ben@smart-cactus.org>2018-01-26 14:37:28 -0500
commitcbdea95938bf09e8e3e7be31918549224d171873 (patch)
treebb5f9571a118e57edc580dc33c686c5d44f41c4a
parent31c260f3967d2c06063c962a98475058daa45c6d (diff)
downloadhaskell-cbdea95938bf09e8e3e7be31918549224d171873.tar.gz
Sort valid substitutions for typed holes by "relevance"
This is an initial attempt at tackling the issue of how to order the suggestions provided by the valid substitutions checker, by sorting them by creating a graph of how they subsume each other. We'd like to order them in such a manner that the most "relevant" suggestions are displayed first, so that the suggestion that the user might be looking for is displayed before more far-fetched suggestions (and thus also displayed when they'd otherwise be cut-off by the `-fmax-valid-substitutions` limit). The previous ordering was based on the order in which the elements appear in the list of imports, which I believe is less correlated with relevance than this ordering. A drawback of this approach is that, since we now want to sort the elements, we can no longer "bail out early" when we've hit the `-fmax-valid-substitutions` limit. Reviewers: bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4326
-rw-r--r--compiler/main/DynFlags.hs8
-rw-r--r--compiler/typecheck/TcErrors.hs166
-rw-r--r--compiler/typecheck/TcSimplify.hs7
-rw-r--r--compiler/typecheck/TcSimplify.hs-boot4
-rw-r--r--docs/users_guide/glasgow_exts.rst299
-rw-r--r--docs/users_guide/using-optimisation.rst16
-rw-r--r--testsuite/tests/ghci/scripts/T10249.stderr3
-rw-r--r--testsuite/tests/ghci/scripts/T8353.stderr60
-rw-r--r--testsuite/tests/th/T10267.stderr8
-rw-r--r--testsuite/tests/typecheck/should_compile/T13050.stderr174
-rw-r--r--testsuite/tests/typecheck/should_compile/T14273.stderr18
-rw-r--r--testsuite/tests/typecheck/should_compile/T14590.stderr232
-rw-r--r--testsuite/tests/typecheck/should_compile/T9497a.stderr6
-rw-r--r--testsuite/tests/typecheck/should_compile/hole_constraints.stderr4
-rw-r--r--testsuite/tests/typecheck/should_compile/holes.stderr496
-rw-r--r--testsuite/tests/typecheck/should_compile/holes2.stderr18
-rw-r--r--testsuite/tests/typecheck/should_compile/holes3.stderr496
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions.stderr82
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T9497d.stderr6
-rw-r--r--testsuite/tests/typecheck/should_run/T9497a-run.stderr6
-rw-r--r--testsuite/tests/typecheck/should_run/T9497b-run.stderr6
-rw-r--r--testsuite/tests/typecheck/should_run/T9497c-run.stderr6
23 files changed, 1200 insertions, 925 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 05d1ec10bc..e93a133cf6 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -553,6 +553,8 @@ data GeneralFlag
| Opt_PprCaseAsLet
| Opt_PprShowTicks
| Opt_ShowHoleConstraints
+ | Opt_NoShowValidSubstitutions
+ | Opt_NoSortValidSubstitutions
| Opt_ShowLoadedModules
-- Suppress all coercions, them replacing with '...'
@@ -800,8 +802,8 @@ data DynFlags = DynFlags {
maxRelevantBinds :: Maybe Int, -- ^ Maximum number of bindings from the type envt
-- to show in type error messages
- maxValidSubstitutions :: Maybe Int, -- ^ Maximum number of substitutions
- -- to show in type error messages
+ maxValidSubstitutions :: Maybe Int, -- ^ Maximum number of substitutions to
+ -- show in typed hole error messages
maxUncoveredPatterns :: Int, -- ^ Maximum number of unmatched patterns to show
-- in non-exhaustiveness warnings
simplTickFactor :: Int, -- ^ Multiplier for simplifier ticks
@@ -3897,6 +3899,8 @@ fFlagsDeps = [
flagSpec "show-warning-groups" Opt_ShowWarnGroups,
flagSpec "hide-source-paths" Opt_HideSourcePaths,
flagSpec "show-hole-constraints" Opt_ShowHoleConstraints,
+ flagSpec "no-show-valid-substitutions" Opt_NoShowValidSubstitutions,
+ flagSpec "no-sort-valid-substitutions" Opt_NoSortValidSubstitutions,
flagSpec "show-loaded-modules" Opt_ShowLoadedModules,
flagSpec "whole-archive-hs-libs" Opt_WholeArchiveHsLibs
]
diff --git a/compiler/typecheck/TcErrors.hs b/compiler/typecheck/TcErrors.hs
index d895921411..fb27b4ed7c 100644
--- a/compiler/typecheck/TcErrors.hs
+++ b/compiler/typecheck/TcErrors.hs
@@ -50,7 +50,7 @@ import BasicTypes
import ConLike ( ConLike(..))
import Util
import TcEnv (tcLookup)
-import {-# SOURCE #-} TcSimplify ( tcCheckHoleFit )
+import {-# SOURCE #-} TcSimplify ( tcCheckHoleFit, tcSubsumes )
import FastString
import Outputable
import SrcLoc
@@ -61,10 +61,13 @@ import Pair
import qualified GHC.LanguageExtensions as LangExt
import FV ( fvVarList, fvVarSet, unionFV )
-import Control.Monad ( when )
+import Control.Monad ( when, filterM )
import Data.Foldable ( toList )
-import Data.List ( partition, mapAccumL, nub, sortBy, unfoldr, foldl')
+import Data.List ( partition, mapAccumL, nub
+ , sortBy, sort, unfoldr, foldl' )
import qualified Data.Set as Set
+import Data.Graph ( graphFromEdges, topSort )
+import Data.Function ( on )
import Data.Semigroup ( Semigroup )
import qualified Data.Semigroup as Semigroup
@@ -1085,7 +1088,9 @@ mkHoleError tidy_simples ctxt ct@(CHoleCan { cc_hole = hole })
= givenConstraintsMsg ctxt
| otherwise = empty
- ; sub_msg <- validSubstitutions tidy_simples ctxt ct
+ ; no_show_valid_substitutions <- goptM Opt_NoShowValidSubstitutions
+ ; sub_msg <- if no_show_valid_substitutions then return empty
+ else validSubstitutions tidy_simples ctxt ct
; mkErrorMsgFromCt ctxt ct $
important hole_msg `mappend`
relevant_bindings (binds_msg $$ constraints_msg) `mappend`
@@ -1146,22 +1151,52 @@ mkHoleError tidy_simples ctxt ct@(CHoleCan { cc_hole = hole })
mkHoleError _ _ ct = pprPanic "mkHoleError" (ppr ct)
+-- HoleFit is the type we use for a fit in valid substitutions. It contains the
+-- element that was checked and the elements Id.
+data HoleFit = HoleFit { hfEl :: GlobalRdrElt , hfId :: Id }
+
+-- We define an Eq and Ord instance to be able to build a graph.
+instance Eq HoleFit where
+ (==) = (==) `on` hfId
+
+-- We compare HoleFits by their gre_name instead of their Id, since we don't
+-- want our tests to be affected by the non-determinism of `nonDetCmpVar`,
+-- which is used to compare Ids.
+instance Ord HoleFit where
+ compare = compare `on` (gre_name . hfEl)
-- See Note [Valid substitutions include ...]
validSubstitutions :: [Ct] -> ReportErrCtxt -> Ct -> TcM SDoc
validSubstitutions simples (CEC {cec_encl = implics}) ct | isExprHoleCt ct =
do { rdr_env <- getGlobalRdrEnv
- ; dflags <- getDynFlags
- ; traceTc "findingValidSubstitutionsFor {" $ ppr wrapped_hole_ty
- ; (discards, substitutions) <-
- setTcLevel hole_lvl $
- go (maxValidSubstitutions dflags) $
- localsFirst $ globalRdrEnvElts rdr_env
- ; traceTc "}" empty
- ; return $ ppUnless (null substitutions) $
- hang (text "Valid substitutions include")
- 2 (vcat (map ppr_sub substitutions)
- $$ ppWhen discards subsDiscardMsg) }
+ ; maxSubs <- maxValidSubstitutions <$> getDynFlags
+ ; sortSubs <- not <$> goptM Opt_NoSortValidSubstitutions
+ -- If we're not supposed to output any substitutions, we don't want to do
+ -- any work.
+ ; if maxSubs == Just 0
+ then return empty
+ else do { traceTc "findingValidSubstitutionsFor {" $ ppr wrapped_hole_ty
+ ; let limit = if sortSubs then Nothing else maxSubs
+ ; (discards, subs) <-
+ setTcLevel hole_lvl $ go limit $ globalRdrEnvElts rdr_env
+ -- We split the fits into localFits and globalFits and show
+ -- local fit before global fits, since they are probably more
+ -- relevant to the user.
+ ; let (lclFits, gblFits) = partition (gre_lcl . hfEl) subs
+ ; (discards, sortedSubs) <-
+ -- We sort the fits first, to prevent the order of
+ -- suggestions being effected when identifiers are moved
+ -- around in modules. We use (<*>) to expose the
+ -- parallelism, in case it becomes useful later.
+ if sortSubs then possiblyDiscard maxSubs <$>
+ ((++) <$> sortByGraph (sort lclFits)
+ <*> sortByGraph (sort gblFits))
+ else return (discards, lclFits ++ gblFits)
+ ; traceTc "}" empty
+ ; return $ ppUnless (null sortedSubs) $
+ hang (text "Valid substitutions include")
+ 2 (vcat (map ppr_sub sortedSubs)
+ $$ ppWhen discards subsDiscardMsg) } }
where
-- We extract the type of the hole from the constraint.
hole_ty :: TcPredType
@@ -1175,16 +1210,18 @@ validSubstitutions simples (CEC {cec_encl = implics}) ct | isExprHoleCt ct =
wrapped_hole_ty :: TcSigmaType
wrapped_hole_ty = foldl' wrapTypeWithImplication hole_ty implics
- -- We rearrange the elements to make locals appear at the top of the list,
- -- since they're most likely to be relevant to the user
- localsFirst :: [GlobalRdrElt] -> [GlobalRdrElt]
+ -- We rearrange the elements to make locals appear at the top of the list
+ -- since they're most likely to be relevant to the user.
+ localsFirst :: [HoleFit] -> [HoleFit]
localsFirst elts = lcl ++ gbl
- where (lcl, gbl) = partition gre_lcl elts
+ where (lcl, gbl) = partition (gre_lcl . hfEl) elts
+
-- For pretty printing, we look up the name and type of the substitution
-- we found.
- ppr_sub :: (GlobalRdrElt, Id) -> SDoc
- ppr_sub (elt, id) = sep [ idAndTy , nest 2 (parens $ pprNameProvenance elt)]
+ ppr_sub :: HoleFit -> SDoc
+ ppr_sub (HoleFit elt id) = sep [ idAndTy
+ , nest 2 (parens $ pprNameProvenance elt)]
where name = gre_name elt
ty = varType id
idAndTy = (pprPrefixOcc name <+> dcolon <+> pprType ty)
@@ -1242,19 +1279,43 @@ validSubstitutions simples (CEC {cec_encl = implics}) ct | isExprHoleCt ct =
; traceTc "}" empty
; return fits}
- -- Kickoff the checking of the elements. The first argument
- -- is a counter, so that we stop after finding functions up to
- -- the limit the user gives us.
- go :: Maybe Int -> [GlobalRdrElt] -> TcM (Bool, [(GlobalRdrElt, Id)])
+
+ -- Based on the flags, we might possibly discard some or all the
+ -- fits we've found.
+ possiblyDiscard :: Maybe Int -> [HoleFit] -> (Bool, [HoleFit])
+ possiblyDiscard (Just max) fits = (fits `lengthExceeds` max, take max fits)
+ possiblyDiscard Nothing fits = (False, fits)
+
+ -- Based on a suggestion by phadej on #ghc, we can sort the found fits
+ -- by constructing a subsumption graph, and then do a topological sort of
+ -- the graph. This makes the most specific types appear first, which are
+ -- probably those most relevant. This takes a lot of work (but results in
+ -- much more useful output), and can be disabled by
+ -- '-fno-sort-valid-substitutions'.
+ sortByGraph :: [HoleFit] -> TcM [HoleFit]
+ sortByGraph fits = go [] fits
+ where hfType :: HoleFit -> TcSigmaType
+ hfType = varType . hfId
+
+ go :: [(HoleFit, [HoleFit])] -> [HoleFit] -> TcM [HoleFit]
+ go sofar [] = return $ localsFirst topSorted
+ where toV (hf, adjs) = (hf, hfId hf, map hfId adjs)
+ (graph, fromV, _) = graphFromEdges $ map toV sofar
+ topSorted = map ((\(h,_,_) -> h) . fromV) $ topSort graph
+ go sofar (id:ids) =
+ do { adjs <- filterM (tcSubsumes (hfType id) . hfType) fits
+ ; go ((id, adjs):sofar) ids }
+
+ -- Kickoff the checking of the elements.
+ go :: Maybe Int -> [GlobalRdrElt] -> TcM (Bool, [HoleFit])
go = go_ []
- -- We iterate over the elements, checking each one in turn. If
- -- we've already found -fmax-valid-substitutions=n elements, we
- -- look no further.
- go_ :: [(GlobalRdrElt,Id)] -- What we've found so far.
- -> Maybe Int -- How many we're allowed to find, if limited.
- -> [GlobalRdrElt] -- The elements we've yet to check.
- -> TcM (Bool, [(GlobalRdrElt, Id)])
+ -- We iterate over the elements, checking each one in turn for whether it
+ -- fits, and adding it to the results if it does.
+ go_ :: [HoleFit] -- What we've found so far.
+ -> Maybe Int -- How many we're allowed to find, if limited
+ -> [GlobalRdrElt] -- The elements we've yet to check.
+ -> TcM (Bool, [HoleFit])
go_ subs _ [] = return (False, reverse subs)
go_ subs (Just 0) _ = return (True, reverse subs)
go_ subs maxleft (el:elts) =
@@ -1266,7 +1327,7 @@ validSubstitutions simples (CEC {cec_encl = implics}) ct | isExprHoleCt ct =
_ -> discard_it
}
where discard_it = go_ subs maxleft elts
- keep_it id = go_ ((el,id):subs) ((\n -> n - 1) <$> maxleft) elts
+ keep_it id = go_ ((HoleFit el id):subs) ((\n->n-1) <$> maxleft) elts
lookup name =
do { thing <- tcLookup name
; case thing of
@@ -1338,30 +1399,33 @@ The hole in `f` would generate the message:
In an equation for ‘f’: f = _ "hello, world"
• Relevant bindings include f :: [String] (bound at test.hs:6:1)
Valid substitutions include
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ words :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ read :: forall a. Read a => String -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘Text.Read’))
inits :: forall a. [a] -> [[a]]
(imported from ‘Data.List’ at test.hs:3:19-23
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
- return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ repeat :: forall a. a -> [a]
(imported from ‘Prelude’ at test.hs:1:8-11
- (and originally defined in ‘GHC.Base’))
- fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (and originally defined in ‘GHC.List’))
+ mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at test.hs:1:8-11
(and originally defined in ‘GHC.Base’))
- mempty :: forall a. Monoid a => a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
(imported from ‘Prelude’ at test.hs:1:8-11
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at test.hs:1:8-11
(and originally defined in ‘GHC.Base’))
- read :: forall a. Read a => String -> a
- (imported from ‘Prelude’ at test.hs:1:8-11
- (and originally defined in ‘Text.Read’))
- lines :: String -> [String]
- (imported from ‘Prelude’ at test.hs:1:8-11
- (and originally defined in ‘base-4.11.0.0:Data.OldList’))
- words :: String -> [String]
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
(imported from ‘Prelude’ at test.hs:1:8-11
- (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ (and originally defined in ‘GHC.Base’))
error :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => [Char] -> a
(imported from ‘Prelude’ at test.hs:1:8-11
(and originally defined in ‘GHC.Err’))
@@ -1371,9 +1435,7 @@ The hole in `f` would generate the message:
undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
(imported from ‘Prelude’ at test.hs:1:8-11
(and originally defined in ‘GHC.Err’))
- repeat :: forall a. a -> [a]
- (imported from ‘Prelude’ at test.hs:1:8-11
- (and originally defined in ‘GHC.List’))
+
Valid substitutions are found by checking top level identifiers in scope for
whether their type is subsumed by the type of the hole. Additionally, as
@@ -1386,7 +1448,13 @@ variables are all mentioned by the type of the hole. Since checking for
subsumption results in the side effect of type variables being unified by the
simplifier, we need to take care to clone the variables in the hole and relevant
constraints before checking whether an identifier fits into the hole, to avoid
-affecting the hole and later checks.
+affecting the hole and later checks. When outputting, take the fits found for
+the hole and build a subsumption graph, where fit a and fit b are connected if
+a subsumes b. We then sort the graph topologically, and output the suggestions
+in that order. This is done in order to display "more relevant" suggestions
+first where the most specific suggestions (i.e. the ones that are subsumed by
+the other suggestions) appear first. This puts suggestions such as `error` and
+`undefined` last, as seen in the example above.
Note [Constraints include ...]
diff --git a/compiler/typecheck/TcSimplify.hs b/compiler/typecheck/TcSimplify.hs
index e0588ea914..08c781d78c 100644
--- a/compiler/typecheck/TcSimplify.hs
+++ b/compiler/typecheck/TcSimplify.hs
@@ -494,13 +494,14 @@ tcSubsumes = tcCheckHoleFit emptyBag
-- | A tcSubsumes which takes into account relevant constraints, to fix trac
-- #14273. Make sure that the constraints are cloned, since the simplifier may
--- perform unification
+-- perform unification.
tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
tcCheckHoleFit _ hole_ty ty | hole_ty `eqType` ty = return True
tcCheckHoleFit relevantCts hole_ty ty = discardErrs $
- do { (_, wanted, _) <- pushLevelAndCaptureConstraints $
+ do { (_, wanted, _) <- pushLevelAndCaptureConstraints $
tcSubType_NC ExprSigCtxt ty hole_ty
- ; (rem, _) <- runTcS (simpl_top $ addSimples wanted relevantCts)
+ ; rem <- runTcSDeriveds $
+ simpl_top $ addSimples wanted relevantCts
-- We don't want any insoluble or simple constraints left,
-- but solved implications are ok (and neccessary for e.g. undefined)
; return (isEmptyBag (wc_simple rem)
diff --git a/compiler/typecheck/TcSimplify.hs-boot b/compiler/typecheck/TcSimplify.hs-boot
index 979894ce3a..6455a73b6a 100644
--- a/compiler/typecheck/TcSimplify.hs-boot
+++ b/compiler/typecheck/TcSimplify.hs-boot
@@ -4,6 +4,8 @@ import GhcPrelude
import TcRnTypes ( TcM, Cts )
import TcType ( TcSigmaType )
--- This boot file exists solely to make tcCheckHoleFit avaialble in TcErrors
+-- This boot file exists solely to make tcCheckHoleFit and tcSubsumes avaialble
+-- in TcErrors
+tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool
tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 7d79222bfa..514dae8dd6 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -10669,7 +10669,8 @@ written with a leading underscore (e.g., "``_``", "``_foo``",
will generate an error message that describes which type is expected at
the hole's location, information about the origin of any free type
variables, and a list of local bindings that might help fill the hole
-with actual code. Typed holes are always enabled in GHC.
+and bindings in scope that fit the type of the hole that might help fill
+the hole with actual code. Typed holes are always enabled in GHC.
The goal of typed holes is to help with writing Haskell code rather than
to change the type system. Typed holes can be used to obtain extra
@@ -10691,11 +10692,15 @@ will fail with the following error: ::
Found hole `_' with type: a
Where: `a' is a rigid type variable bound by
the type signature for f :: a -> a at hole.hs:1:6
- Relevant bindings include
- f :: a -> a (bound at hole.hs:2:1)
- x :: a (bound at hole.hs:2:3)
In the expression: _
In an equation for `f': f x = _
+ Relevant bindings include
+ x :: a (bound at hole.hs:2:3)
+ f :: a -> a (bound at hole.hs:2:1)
+ Valid substitutions include
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at hole.hs:1:1
+ (and originally defined in ‘GHC.Err’))
Here are some more details:
@@ -10732,13 +10737,36 @@ Here are some more details:
.. code-block:: none
- Foo.hs:5:15: error:
- Found hole: _x :: Bool
- Relevant bindings include
- p :: Bool (bound at Foo.hs:3:6)
- cons :: Bool -> [Bool] (bound at Foo.hs:3:1)
-
- Foo.hs:5:20: error:
+ Foo.hs:3:21: error:
+ Found hole: _x :: Bool
+ Or perhaps ‘_x’ is mis-spelled, or not in scope
+ In the first argument of ‘(:)’, namely ‘_x’
+ In the second argument of ‘(:)’, namely ‘_x : y’
+ In the second argument of ‘(:)’, namely ‘True : _x : y’
+ Relevant bindings include
+ z :: Bool (bound at Foo.hs:3:6)
+ cons :: Bool -> [Bool] (bound at Foo.hs:3:1)
+ Valid substitutions include
+ otherwise :: Bool
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Types’))
+ maxBound :: forall a. Bounded a => a
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at Foo.hs:1:8-10
+ (and originally defined in ‘GHC.Err’))
+
+ Foo.hs:3:26: error:
Variable not in scope: y :: [Bool]
More information is given for explicit holes (i.e. ones that start
@@ -10756,24 +10784,38 @@ Here are some more details:
.. code-block:: none
- unbound.hs:1:8:
- Found hole '_x' with type: a
- Where: `a' is a rigid type variable bound by
- the inferred type of cons :: [a] at unbound.hs:1:1
- Relevant bindings include cons :: [a] (bound at unbound.hs:1:1)
- In the first argument of `(:)', namely `_x'
- In the expression: _x : _x
- In an equation for `cons': cons = _x : _x
-
- unbound.hs:1:13:
- Found hole '_x' with type: [a]
- Arising from: an undeclared identifier `_x' at unbound.hs:1:13-14
- Where: `a' is a rigid type variable bound by
- the inferred type of cons :: [a] at unbound.hs:1:1
- Relevant bindings include cons :: [a] (bound at unbound.hs:1:1)
- In the second argument of `(:)', namely `_x'
- In the expression: _x : _x
- In an equation for `cons': cons = _x : _x
+ unbound.hs:1:8:
+ Found hole '_x' with type: a
+ Where: `a' is a rigid type variable bound by
+ the inferred type of cons :: [a] at unbound.hs:1:1
+ In the first argument of `(:)', namely `_x'
+ In the expression: _x : _x
+ In an equation for `cons': cons = _x : _x
+ Relevant bindings include cons :: [a] (bound at unbound.hs:1:1)
+ Valid substitutions include
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at unbound.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+
+ unbound.hs:1:13:
+ Found hole: _x :: [a]
+ Where: ‘a’ is a rigid type variable bound by
+ the inferred type of cons :: [a]
+ at unbound.hs:3:1-12
+ Or perhaps ‘_x’ is mis-spelled, or not in scope
+ In the second argument of ‘(:)’, namely ‘_x’
+ In the expression: _x : _x
+ In an equation for ‘cons’: cons = _x : _x
+ Relevant bindings include cons :: [a] (bound at unbound.hs:3:1)
+ Valid substitutions include
+ cons :: forall a. [a] (defined at unbound.hs:3:1)
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at unbound.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at unbound.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+
Notice the two different types reported for the two different
occurrences of ``_x``.
@@ -10797,11 +10839,68 @@ Here are some more details:
implementation terms, they are reported by the renamer rather than
the type checker.)
-There's a flag for controlling the amount of context information shown for
-typed holes:
+- The list of valid substitutions is found by checking which bindings in scope
+ would fit into the hole. As an example, compiling the following module with
+ GHC: ::
+
+ import Data.List (inits)
+
+ g :: [String]
+ g = _ "hello, world"
+
+ yields the errors:
+
+
+ .. code-block:: none
+
+ • Found hole: _ :: [Char] -> [String]
+ • In the expression: _
+ In the expression: _ "hello, world"
+ In an equation for ‘f’: f = _ "hello, world"
+ • Relevant bindings include f :: [String] (bound at test.hs:6:1)
+ Valid substitutions include
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ words :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ read :: forall a. Read a => String -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘Text.Read’))
+ inits :: forall a. [a] -> [[a]]
+ (imported from ‘Data.List’ at test.hs:3:19-23
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ repeat :: forall a. a -> [a]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.List’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ error :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+
+There are a few flags for controlling the amount of context information shown
+for typed holes:
.. ghc-flag:: -fshow-hole-constraints
- :shortdesc: Show constraints when reporting typed holes
+ :shortdesc: Show constraints when reporting typed holes.
:type: dynamic
:category: verbosity
@@ -10815,17 +10914,131 @@ typed holes:
.. code-block:: none
- show_constraints.hs:4:7: error:
- • Found hole: _ :: Bool
- • In the expression: _
- In an equation for ‘f’: f x = _
- • Relevant bindings include
- x :: a (bound at show_constraints.hs:4:3)
- f :: a -> Bool (bound at show_constraints.hs:4:1)
- Constraints include
- Eq a (from the type signature for:
- f :: Eq a => a -> Bool
- at show_constraints.hs:3:1-22)
+ show_constraints.hs:4:7: error:
+ • Found hole: _ :: Bool
+ • In the expression: _
+ In an equation for ‘f’: f x = _
+ • Relevant bindings include
+ x :: a (bound at show_constraints.hs:4:3)
+ f :: a -> Bool (bound at show_constraints.hs:4:1)
+ Constraints include Eq a (from show_constraints.hs:3:1-22)
+ Valid substitutions include
+ otherwise :: Bool
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Types’))
+ maxBound :: forall a. Bounded a => a
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at show_constraints.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+
+
+.. ghc-flag:: -fno-show-valid-substitutions
+ :shortdesc: Disables showing a list of valid substitutions for typed holes
+ in type error messages.
+ :type: dynamic
+ :category: verbosity
+
+ :default: off
+
+ This flag can be toggled to turn off the display of valid substitutions
+ entirely.
+
+.. ghc-flag:: -fno-sort-valid-substitutions
+ :shortdesc: Disables the sorting of the list of valid substitutions for typed holes
+ in type error messages.
+ :type: dynamic
+ :category: verbosity
+
+ :default: off
+
+ By default the valid substitutions are sorted by a topological sort on the
+ subsumption graph of the identified substitutions. However, this requires
+ checking relations between the found substitutions, which can be expensive
+ if there are many valid substitutions. Sorting can be toggled off with this
+ flag.
+
+ When sorting is off, the hole in ``g`` in the following as before ::
+
+ import Data.List (inits)
+
+ g :: [String]
+ g = _ "hello, world"
+
+ will yield an error:
+
+ .. code-block:: none
+
+ test.hs:6:5: error:
+ • Found hole: _ :: [Char] -> [String]
+ • In the expression: _
+ In the expression: _ "hello, world"
+ In an equation for ‘g’: g = _ "hello, world"
+ • Relevant bindings include f :: [String] (bound at test.hs:6:1)
+ Valid substitutions include
+ inits :: forall a. [a] -> [[a]]
+ (imported from ‘Data.List’ at test.hs:3:19-23
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Base’))
+ read :: forall a. Read a => String -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘Text.Read’))
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ words :: String -> [String]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ error :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => [Char] -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+ errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+ undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
+ repeat :: forall a. a -> [a]
+ (imported from ‘Prelude’ at test.hs:1:8-11
+ (and originally defined in ‘GHC.List’))
+
+ where the substitutions are ordered by the order they were defined and
+ imported in, with all local bindings before global bindings.
+
+.. ghc-flag:: -fmax-valid-substitutions=⟨n⟩
+ :shortdesc: *default: 6.* Set the maximum number of valid substitutions for
+ typed holes to display in type error messages.
+ :type: dynamic
+ :reverse: -fno-max-valid-substitutions
+ :category: verbosity
+
+ :default: 6
+
+ The list of valid substitutions is limited by displaying up to 6
+ substitutions per hole. The number of substitutions shown can be set by this
+ flag. Turning the limit off with ``-fno-max-valid-substitutions`` displays
+ all the found substitutions.
.. _partial-type-signatures:
diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst
index fc958e011c..3566462eeb 100644
--- a/docs/users_guide/using-optimisation.rst
+++ b/docs/users_guide/using-optimisation.rst
@@ -544,7 +544,7 @@ by saying ``-fno-wombat``.
type error messages.
:type: dynamic
:reverse: -fno-max-relevant-bindings
- :category:
+ :category: verbosity
:default: 6
@@ -556,20 +556,6 @@ by saying ``-fno-wombat``.
they may be numerous), but ``-fno-max-relevant-bindings`` includes
them too.
-.. ghc-flag:: -fmax-valid-substitutions=⟨n⟩
- :shortdesc: *default: 6.* Set the maximum number of valid substitutions for
- typed holes to display in type error messages.
- :type: dynamic
- :reverse: -fno-max-valid-substitutions
- :category:
-
- :default: 6
-
- The type checker sometimes displays a list of valid substitutions
- for typed holes in error messages, but only up to some maximum number,
- set by this flag. Turning it off with
- ``-fno-max-valid-substitutions`` gives an unlimited number.
-
.. ghc-flag:: -fmax-uncovered-patterns=⟨n⟩
:shortdesc: *default: 4.* Set the maximum number of patterns to display in
warnings about non-exhaustive ones.
diff --git a/testsuite/tests/ghci/scripts/T10249.stderr b/testsuite/tests/ghci/scripts/T10249.stderr
index e5eb289fbb..66ce87cd01 100644
--- a/testsuite/tests/ghci/scripts/T10249.stderr
+++ b/testsuite/tests/ghci/scripts/T10249.stderr
@@ -2,7 +2,8 @@
<interactive>:1:1: error:
• Found hole: _ :: t
Where: ‘t’ is a rigid type variable bound by
- the inferred type of it :: t at <interactive>:1:1
+ the inferred type of it :: t
+ at <interactive>:1:1
• In the expression: _
In an equation for ‘it’: it = _
• Relevant bindings include it :: t (bound at <interactive>:1:1)
diff --git a/testsuite/tests/ghci/scripts/T8353.stderr b/testsuite/tests/ghci/scripts/T8353.stderr
index c2df017ee3..15dbdaf47e 100644
--- a/testsuite/tests/ghci/scripts/T8353.stderr
+++ b/testsuite/tests/ghci/scripts/T8353.stderr
@@ -10,19 +10,19 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
- f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at Defer03.hs:1:8-11
- (and originally defined in ‘GHC.Err’))
+ f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
Defer03.hs:4:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -35,19 +35,19 @@ Defer03.hs:7:5: error:
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
- f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at Defer03.hs:1:8-11
- (and originally defined in ‘GHC.Err’))
+ f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
Defer03.hs:4:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -60,19 +60,19 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
- f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at Defer03.hs:1:8-11
- (and originally defined in ‘GHC.Err’))
+ f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
Defer03.hs:4:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -85,19 +85,19 @@ Defer03.hs:7:5: error:
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
- f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at Defer03.hs:1:8-11
- (and originally defined in ‘GHC.Err’))
+ f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
Defer03.hs:4:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -110,16 +110,16 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
Valid substitutions include
- f :: Int (defined at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at Defer03.hs:1:8-11
- (and originally defined in ‘GHC.Err’))
+ f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr
index ca650c3eba..ad163eed66 100644
--- a/testsuite/tests/th/T10267.stderr
+++ b/testsuite/tests/th/T10267.stderr
@@ -28,10 +28,10 @@ T10267.hs:8:1: error:
In an equation for ‘i’: i = _foo
• Relevant bindings include i :: a -> a (bound at T10267.hs:8:1)
Valid substitutions include
- l :: forall a. a -> a (defined at T10267.hs:23:3)
- i :: forall a. a -> a (defined at T10267.hs:8:1)
j :: forall a. a -> a (defined at T10267.hs:8:1)
+ i :: forall a. a -> a (defined at T10267.hs:8:1)
k :: forall a. a -> a (defined at T10267.hs:14:3)
+ l :: forall a. a -> a (defined at T10267.hs:23:3)
foo :: forall a. a -> a (defined at T10267.hs:33:1)
id :: forall a. a -> a
(imported from ‘Prelude’ at T10267.hs:3:8-13
@@ -53,10 +53,10 @@ T10267.hs:14:3: error:
In an equation for ‘k’: k = _foo
• Relevant bindings include k :: a -> a (bound at T10267.hs:14:3)
Valid substitutions include
- l :: forall a. a -> a (defined at T10267.hs:23:3)
- i :: forall a. a -> a (defined at T10267.hs:8:1)
j :: forall a. a -> a (defined at T10267.hs:8:1)
+ i :: forall a. a -> a (defined at T10267.hs:8:1)
k :: forall a. a -> a (defined at T10267.hs:14:3)
+ l :: forall a. a -> a (defined at T10267.hs:23:3)
foo :: forall a. a -> a (defined at T10267.hs:33:1)
id :: forall a. a -> a
(imported from ‘Prelude’ at T10267.hs:3:8-13
diff --git a/testsuite/tests/typecheck/should_compile/T13050.stderr b/testsuite/tests/typecheck/should_compile/T13050.stderr
index dc21803811..c9f7e22391 100644
--- a/testsuite/tests/typecheck/should_compile/T13050.stderr
+++ b/testsuite/tests/typecheck/should_compile/T13050.stderr
@@ -12,36 +12,15 @@ T13050.hs:4:9: warning: [-Wtyped-holes (in -Wdefault)]
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
@@ -51,20 +30,41 @@ T13050.hs:4:9: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Err’))
T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int -> Int -> Int
@@ -79,36 +79,15 @@ T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
@@ -118,20 +97,41 @@ T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Err’))
T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _a :: Int -> Int -> Int
@@ -147,36 +147,15 @@ T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
f :: Int -> Int -> Int (defined at T13050.hs:4:1)
g :: Int -> Int -> Int (defined at T13050.hs:5:1)
q :: Int -> Int -> Int (defined at T13050.hs:6:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
@@ -186,17 +165,38 @@ T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T13050.hs:1:8-17
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/T14273.stderr b/testsuite/tests/typecheck/should_compile/T14273.stderr
index 49df4b15cf..bf1816ed3d 100644
--- a/testsuite/tests/typecheck/should_compile/T14273.stderr
+++ b/testsuite/tests/typecheck/should_compile/T14273.stderr
@@ -30,27 +30,27 @@ T14273.hs:7:32: warning: [-Wtyped-holes (in -Wdefault)]
pleaseShow :: Bool -> a -> Maybe String (bound at T14273.hs:6:1)
Valid substitutions include
k :: String (defined at T14273.hs:10:1)
- False :: Bool
- (imported from ‘Prelude’ at T14273.hs:1:8-40
- (and originally defined in ‘GHC.Types’))
- True :: Bool
+ EQ :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
- EQ :: Ordering
- (imported from ‘Prelude’ at T14273.hs:1:8-40
- (and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
+ pi :: forall a. Floating a => a
+ (imported from ‘Prelude’ at T14273.hs:1:8-40
+ (and originally defined in ‘GHC.Float’))
otherwise :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Base’))
- pi :: forall a. Floating a => a
+ False :: Bool
(imported from ‘Prelude’ at T14273.hs:1:8-40
- (and originally defined in ‘GHC.Float’))
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at T14273.hs:1:8-40
+ (and originally defined in ‘GHC.Types’))
T14273.hs:13:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
diff --git a/testsuite/tests/typecheck/should_compile/T14590.stderr b/testsuite/tests/typecheck/should_compile/T14590.stderr
index ff441993ec..6c5b672140 100644
--- a/testsuite/tests/typecheck/should_compile/T14590.stderr
+++ b/testsuite/tests/typecheck/should_compile/T14590.stderr
@@ -13,36 +13,15 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
@@ -52,20 +31,41 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Err’))
T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _a :: Int -> Int -> Int
@@ -82,36 +82,15 @@ T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
@@ -121,20 +100,41 @@ T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Err’))
T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Int -> Int -> Int
@@ -150,36 +150,15 @@ T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
@@ -189,20 +168,41 @@ T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Err’))
T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _a :: Int -> Int -> Int
@@ -219,36 +219,15 @@ T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
f2 :: Int -> Int -> Int (defined at T14590.hs:5:1)
f3 :: Int -> Int -> Int (defined at T14590.hs:6:1)
f4 :: Int -> Int -> Int (defined at T14590.hs:7:1)
- (-) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- asTypeOf :: forall a. a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (*) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ div :: forall a. Integral a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
@@ -258,17 +237,38 @@ T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
- (imported from ‘Prelude’ at T14590.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
max :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/T9497a.stderr b/testsuite/tests/typecheck/should_compile/T9497a.stderr
index 540bdf55ea..70a9310738 100644
--- a/testsuite/tests/typecheck/should_compile/T9497a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9497a.stderr
@@ -7,12 +7,12 @@ T9497a.hs:2:8: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include main :: IO () (bound at T9497a.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497a.hs:2:1)
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at T9497a.hs:1:1
- (and originally defined in ‘GHC.Base’))
readLn :: forall a. Read a => IO a
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at T9497a.hs:1:1
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
index d8ca78d901..5b31e8f5c1 100644
--- a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
+++ b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
@@ -32,9 +32,9 @@ hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
Show a (from hole_constraints.hs:11:1-25)
Eq a (from hole_constraints.hs:11:1-25)
Valid substitutions include
- f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
f2 :: forall a. (Show a, Eq a) => a
(defined at hole_constraints.hs:12:1)
+ f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
@@ -94,9 +94,9 @@ hole_constraints.hs:27:32: warning: [-Wtyped-holes (in -Wdefault)]
foo :: AnyShow -> String (bound at hole_constraints.hs:27:1)
Constraints include Show a (from hole_constraints.hs:27:19-27)
Valid substitutions include
- f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
f2 :: forall a. (Show a, Eq a) => a
(defined at hole_constraints.hs:12:1)
+ f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
f3 :: forall a. C a => a (defined at hole_constraints.hs:15:17)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at hole_constraints.hs:3:8-22
diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr
index 688a2dd8b8..8421e9a46f 100644
--- a/testsuite/tests/typecheck/should_compile/holes.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes.stderr
@@ -43,8 +43,8 @@ holes.hs:8:5: warning: [-Wtyped-holes (in -Wdefault)]
In an equation for ‘h’: h = _ ++ "a"
• Relevant bindings include h :: [Char] (bound at holes.hs:8:1)
Valid substitutions include
- f :: forall t. t (defined at holes.hs:3:1)
h :: [Char] (defined at holes.hs:8:1)
+ f :: forall t. t (defined at holes.hs:3:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Base’))
@@ -64,92 +64,91 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
y :: [a] (bound at holes.hs:11:3)
z :: [a] -> [a] (bound at holes.hs:11:1)
Valid substitutions include
- f :: forall t. t (defined at holes.hs:3:1)
- g :: Int -> Char (defined at holes.hs:6:1)
- h :: [Char] (defined at holes.hs:8:1)
z :: forall a. [a] -> [a] (defined at holes.hs:11:1)
+ h :: [Char] (defined at holes.hs:8:1)
+ g :: Int -> Char (defined at holes.hs:6:1)
+ f :: forall t. t (defined at holes.hs:3:1)
Left :: forall a b. a -> Either a b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘Data.Either’))
Right :: forall a b. b -> Either a b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘Data.Either’))
- False :: Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Types’))
- True :: Bool
+ EQ :: Ordering
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Types’))
- Nothing :: forall a. Maybe a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- Just :: forall a. a -> Maybe a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
LT :: Ordering
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Types’))
- EQ :: Ordering
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Types’))
- (-) :: forall a. Num a => a -> a -> a
+ properFraction :: forall a.
+ RealFrac a =>
+ forall b. Integral b => a -> (b, a)
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ (and originally defined in ‘GHC.Real’))
+ divMod :: forall a. Integral a => a -> a -> (a, a)
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- (++) :: forall a. [a] -> [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ quotRem :: forall a. Integral a => a -> a -> (a, a)
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
+ (and originally defined in ‘GHC.Real’))
+ significand :: forall a. RealFloat a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- either :: forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
+ (and originally defined in ‘GHC.Float’))
+ scaleFloat :: forall a. RealFloat a => Int -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Either’))
- maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
+ (and originally defined in ‘GHC.Float’))
+ isDenormalized :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Maybe’))
- curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (and originally defined in ‘GHC.Float’))
+ isIEEE :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Tuple’))
- fst :: forall a b. (a, b) -> a
+ (and originally defined in ‘GHC.Float’))
+ isInfinite :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Tuple’))
- snd :: forall a b. (a, b) -> b
+ (and originally defined in ‘GHC.Float’))
+ isNaN :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Tuple’))
- uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ (and originally defined in ‘GHC.Float’))
+ isNegativeZero :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘Data.Tuple’))
- ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ (and originally defined in ‘GHC.Float’))
+ floatRange :: forall a. RealFloat a => a -> (Int, Int)
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- ($!) :: forall a b. (a -> b) -> a -> b
+ (and originally defined in ‘GHC.Float’))
+ floatRadix :: forall a. RealFloat a => a -> Integer
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- asTypeOf :: forall a. a -> a -> a
+ (and originally defined in ‘GHC.Float’))
+ exponent :: forall a. RealFloat a => a -> Int
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ (and originally defined in ‘GHC.Float’))
+ floatDigits :: forall a. RealFloat a => a -> Int
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- id :: forall a. a -> a
+ (and originally defined in ‘GHC.Float’))
+ ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- map :: forall a b. (a -> b) -> [a] -> [b]
+ (and originally defined in ‘GHC.Real’))
+ floor :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- otherwise :: Bool
+ (and originally defined in ‘GHC.Real’))
+ round :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- (**) :: forall a. Floating a => a -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.Float’))
+ decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.Float’))
+ atan2 :: forall a. RealFloat a => a -> a -> a
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.Float’))
+ pi :: forall a. Floating a => a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
acos :: forall a. Floating a => a -> a
@@ -167,9 +166,6 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
atan :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- atan2 :: forall a. RealFloat a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
atanh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
@@ -179,218 +175,232 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
cosh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
exp :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- exponent :: forall a. RealFloat a => a -> Int
+ log :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- floatDigits :: forall a. RealFloat a => a -> Int
+ sin :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- floatRadix :: forall a. RealFloat a => a -> Integer
+ sinh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- floatRange :: forall a. RealFloat a => a -> (Int, Int)
+ sqrt :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- isDenormalized :: forall a. RealFloat a => a -> Bool
+ tan :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- isIEEE :: forall a. RealFloat a => a -> Bool
+ tanh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- isInfinite :: forall a. RealFloat a => a -> Bool
+ recip :: forall a. Fractional a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- isNaN :: forall a. RealFloat a => a -> Bool
+ (and originally defined in ‘GHC.Real’))
+ (**) :: forall a. Floating a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- isNegativeZero :: forall a. RealFloat a => a -> Bool
+ logBase :: forall a. Floating a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Float’))
- log :: forall a. Floating a => a -> a
+ (/) :: forall a. Fractional a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- logBase :: forall a. Floating a => a -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ not :: Bool -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- pi :: forall a. Floating a => a
+ (and originally defined in ‘GHC.Classes’))
+ (&&) :: Bool -> Bool -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- scaleFloat :: forall a. RealFloat a => Int -> a -> a
+ (and originally defined in ‘GHC.Classes’))
+ (||) :: Bool -> Bool -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- significand :: forall a. RealFloat a => a -> a
+ (and originally defined in ‘GHC.Classes’))
+ readFile :: FilePath -> IO String
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- sin :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putStr :: String -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- sinh :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putStrLn :: String -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- sqrt :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putChar :: Char -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- tan :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ interact :: (String -> String) -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- tanh :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ getContents :: IO String
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- (*) :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘System.IO’))
+ getLine :: IO String
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘System.IO’))
+ getChar :: IO Char
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- abs :: forall a. Num a => a -> a
+ (and originally defined in ‘System.IO’))
+ appendFile :: FilePath -> String -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- fromInteger :: forall a. Num a => Integer -> a
+ (and originally defined in ‘System.IO’))
+ writeFile :: FilePath -> String -> IO ()
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- negate :: forall a. Num a => a -> a
+ (and originally defined in ‘System.IO’))
+ showString :: String -> ShowS
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- signum :: forall a. Num a => a -> a
+ (and originally defined in ‘GHC.Show’))
+ showParen :: Bool -> ShowS -> ShowS
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘GHC.Show’))
+ showChar :: Char -> ShowS
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Num’))
- (/) :: forall a. Fractional a => a -> a -> a
+ (and originally defined in ‘GHC.Show’))
+ gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
+ div :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
+ mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
+ quot :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- divMod :: forall a. Integral a => a -> a -> (a, a)
+ rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
even :: forall a. Integral a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- floor :: forall a. RealFrac a => forall b. Integral b => a -> b
+ odd :: forall a. Integral a => a -> Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- fromIntegral :: forall a b. (Integral a, Num b) => a -> b
+ (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- fromRational :: forall a. Fractional a => Rational -> a
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Real’))
- gcd :: forall a. Integral a => a -> a -> a
+ readParen :: forall a. Bool -> ReadS a -> ReadS a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- lcm :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.Read’))
+ lex :: ReadS String
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- mod :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.Read’))
+ zipWith3 :: forall a b c d.
+ (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- odd :: forall a. Integral a => a -> Bool
+ (and originally defined in ‘GHC.List’))
+ zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- properFraction :: forall a.
- RealFrac a =>
- forall b. Integral b => a -> (b, a)
+ (and originally defined in ‘GHC.List’))
+ zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- quot :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.List’))
+ unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- quotRem :: forall a. Integral a => a -> a -> (a, a)
+ (and originally defined in ‘GHC.List’))
+ unzip :: forall a b. [(a, b)] -> ([a], [b])
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- realToFrac :: forall a b. (Real a, Fractional b) => a -> b
+ (and originally defined in ‘GHC.List’))
+ splitAt :: forall a. Int -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- recip :: forall a. Fractional a => a -> a
+ (and originally defined in ‘GHC.List’))
+ scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- rem :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.List’))
+ scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- round :: forall a. RealFrac a => forall b. Integral b => a -> b
+ (and originally defined in ‘GHC.List’))
+ scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- toInteger :: forall a. Integral a => a -> Integer
+ (and originally defined in ‘GHC.List’))
+ scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- toRational :: forall a. Real a => a -> Rational
+ (and originally defined in ‘GHC.List’))
+ replicate :: forall a. Int -> a -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
+ (and originally defined in ‘GHC.List’))
+ iterate :: forall a. (a -> a) -> a -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- showChar :: Char -> ShowS
+ (and originally defined in ‘GHC.List’))
+ drop :: forall a. Int -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Show’))
- showParen :: Bool -> ShowS -> ShowS
+ (and originally defined in ‘GHC.List’))
+ take :: forall a. Int -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Show’))
- showString :: String -> ShowS
+ (and originally defined in ‘GHC.List’))
+ cycle :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Show’))
- appendFile :: FilePath -> String -> IO ()
+ (and originally defined in ‘GHC.List’))
+ init :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getChar :: IO Char
+ (and originally defined in ‘GHC.List’))
+ reverse :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getContents :: IO String
+ (and originally defined in ‘GHC.List’))
+ tail :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getLine :: IO String
+ (and originally defined in ‘GHC.List’))
+ break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- interact :: (String -> String) -> IO ()
+ (and originally defined in ‘GHC.List’))
+ span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putChar :: Char -> IO ()
+ (and originally defined in ‘GHC.List’))
+ (!!) :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putStr :: String -> IO ()
+ (and originally defined in ‘GHC.List’))
+ userError :: String -> IOError
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putStrLn :: String -> IO ()
+ (and originally defined in ‘GHC.IO.Exception’))
+ ioError :: forall a. IOError -> IO a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- readFile :: FilePath -> IO String
+ (and originally defined in ‘GHC.IO.Exception’))
+ until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- writeFile :: FilePath -> String -> IO ()
+ (and originally defined in ‘GHC.Base’))
+ flip :: forall a b c. (a -> b -> c) -> b -> a -> c
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- lines :: String -> [String]
+ (and originally defined in ‘GHC.Base’))
+ (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ (and originally defined in ‘GHC.Base’))
+ ($!) :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.Base’))
+ uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘Data.Tuple’))
+ curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘Data.Tuple’))
unlines :: [String] -> String
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
unwords :: [String] -> String
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ head :: forall a. [a] -> a
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.List’))
+ last :: forall a. [a] -> a
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.List’))
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
words :: String -> [String]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ repeat :: forall a. a -> [a]
+ (imported from ‘Prelude’ at holes.hs:1:8-12
+ (and originally defined in ‘GHC.List’))
error :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
[Char] -> a
@@ -399,117 +409,107 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Err’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
- ioError :: forall a. IOError -> IO a
+ (and originally defined in ‘Data.Maybe’))
+ either :: forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.IO.Exception’))
- userError :: String -> IOError
+ (and originally defined in ‘Data.Either’))
+ Just :: forall a. a -> Maybe a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.IO.Exception’))
- (!!) :: forall a. [a] -> Int -> a
+ (and originally defined in ‘GHC.Base’))
+ Nothing :: forall a. Maybe a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ toRational :: forall a. Real a => a -> Rational
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- cycle :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ toInteger :: forall a. Integral a => a -> Integer
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- drop :: forall a. Int -> [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ negate :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ abs :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- head :: forall a. [a] -> a
+ (and originally defined in ‘GHC.Num’))
+ signum :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- init :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ fromRational :: forall a. Fractional a => Rational -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- iterate :: forall a. (a -> a) -> a -> [a]
+ (and originally defined in ‘GHC.Real’))
+ realToFrac :: forall a b. (Real a, Fractional b) => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- last :: forall a. [a] -> a
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- repeat :: forall a. a -> [a]
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- replicate :: forall a. Int -> a -> [a]
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- reverse :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
+ (and originally defined in ‘GHC.Num’))
+ fromInteger :: forall a. Num a => Integer -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ fromIntegral :: forall a b. (Integral a, Num b) => a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
+ (and originally defined in ‘GHC.Real’))
+ ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ (and originally defined in ‘GHC.Base’))
+ id :: forall a. a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ map :: forall a b. (a -> b) -> [a] -> [b]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- splitAt :: forall a. Int -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ otherwise :: Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- tail :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- take :: forall a. Int -> [a] -> [a]
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ (and originally defined in ‘GHC.Types’))
+ snd :: forall a b. (a, b) -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- unzip :: forall a b. [(a, b)] -> ([a], [b])
+ (and originally defined in ‘Data.Tuple’))
+ fst :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
+ (and originally defined in ‘Data.Tuple’))
+ zip :: forall a b. [a] -> [b] -> [(a, b)]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.List’))
- zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
+ filter :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.List’))
- zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
+ dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.List’))
- zipWith3 :: forall a b c d.
- (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.List’))
- lex :: ReadS String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Read’))
- readParen :: forall a. Bool -> ReadS a -> ReadS a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Read’))
- (&&) :: Bool -> Bool -> Bool
+ (++) :: forall a. [a] -> [a] -> [a]
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
- not :: Bool -> Bool
+ (and originally defined in ‘GHC.Base’))
+ asTypeOf :: forall a. a -> a -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
- (||) :: Bool -> Bool -> Bool
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at holes.hs:1:8-12
(and originally defined in ‘GHC.Prim’))
- filter :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- zip :: forall a b. [a] -> [b] -> [(a, b)]
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
(imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
+ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/holes2.stderr b/testsuite/tests/typecheck/should_compile/holes2.stderr
index 4aafdfc876..6999934b8d 100644
--- a/testsuite/tests/typecheck/should_compile/holes2.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes2.stderr
@@ -23,24 +23,24 @@ holes2.hs:3:10: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include f :: String (bound at holes2.hs:3:1)
Valid substitutions include
f :: String (defined at holes2.hs:3:1)
- False :: Bool
- (imported from ‘Prelude’ at holes2.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
- True :: Bool
+ EQ :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
- EQ :: Ordering
- (imported from ‘Prelude’ at holes2.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Types’))
+ pi :: forall a. Floating a => a
+ (imported from ‘Prelude’ at holes2.hs:1:8-13
+ (and originally defined in ‘GHC.Float’))
otherwise :: Bool
(imported from ‘Prelude’ at holes2.hs:1:8-13
(and originally defined in ‘GHC.Base’))
- pi :: forall a. Floating a => a
+ False :: Bool
(imported from ‘Prelude’ at holes2.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at holes2.hs:1:8-13
+ (and originally defined in ‘GHC.Types’))
diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr
index 931c336664..ce1c947216 100644
--- a/testsuite/tests/typecheck/should_compile/holes3.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes3.stderr
@@ -45,8 +45,8 @@ holes3.hs:8:5: error:
In an equation for ‘h’: h = _aa ++ "a"
• Relevant bindings include h :: [Char] (bound at holes3.hs:8:1)
Valid substitutions include
- f :: forall t. t (defined at holes3.hs:3:1)
h :: [Char] (defined at holes3.hs:8:1)
+ f :: forall t. t (defined at holes3.hs:3:1)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Base’))
@@ -67,92 +67,91 @@ holes3.hs:11:15: error:
y :: [a] (bound at holes3.hs:11:3)
z :: [a] -> [a] (bound at holes3.hs:11:1)
Valid substitutions include
- f :: forall t. t (defined at holes3.hs:3:1)
- g :: Int -> Char (defined at holes3.hs:6:1)
- h :: [Char] (defined at holes3.hs:8:1)
z :: forall a. [a] -> [a] (defined at holes3.hs:11:1)
+ h :: [Char] (defined at holes3.hs:8:1)
+ g :: Int -> Char (defined at holes3.hs:6:1)
+ f :: forall t. t (defined at holes3.hs:3:1)
Left :: forall a b. a -> Either a b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘Data.Either’))
Right :: forall a b. b -> Either a b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘Data.Either’))
- False :: Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
- True :: Bool
+ EQ :: Ordering
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Types’))
- Nothing :: forall a. Maybe a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- Just :: forall a. a -> Maybe a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
LT :: Ordering
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Types’))
- EQ :: Ordering
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Types’))
- (-) :: forall a. Num a => a -> a -> a
+ properFraction :: forall a.
+ RealFrac a =>
+ forall b. Integral b => a -> (b, a)
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ (and originally defined in ‘GHC.Real’))
+ divMod :: forall a. Integral a => a -> a -> (a, a)
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (++) :: forall a. [a] -> [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ quotRem :: forall a. Integral a => a -> a -> (a, a)
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- const :: forall a b. a -> b -> a
+ (and originally defined in ‘GHC.Real’))
+ significand :: forall a. RealFloat a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- either :: forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
+ (and originally defined in ‘GHC.Float’))
+ scaleFloat :: forall a. RealFloat a => Int -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Either’))
- maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
+ (and originally defined in ‘GHC.Float’))
+ isDenormalized :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Maybe’))
- curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (and originally defined in ‘GHC.Float’))
+ isIEEE :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Tuple’))
- fst :: forall a b. (a, b) -> a
+ (and originally defined in ‘GHC.Float’))
+ isInfinite :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Tuple’))
- snd :: forall a b. (a, b) -> b
+ (and originally defined in ‘GHC.Float’))
+ isNaN :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Tuple’))
- uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ (and originally defined in ‘GHC.Float’))
+ isNegativeZero :: forall a. RealFloat a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘Data.Tuple’))
- ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
+ (and originally defined in ‘GHC.Float’))
+ floatRange :: forall a. RealFloat a => a -> (Int, Int)
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- ($!) :: forall a b. (a -> b) -> a -> b
+ (and originally defined in ‘GHC.Float’))
+ floatRadix :: forall a. RealFloat a => a -> Integer
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- asTypeOf :: forall a. a -> a -> a
+ (and originally defined in ‘GHC.Float’))
+ exponent :: forall a. RealFloat a => a -> Int
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ (and originally defined in ‘GHC.Float’))
+ floatDigits :: forall a. RealFloat a => a -> Int
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- id :: forall a. a -> a
+ (and originally defined in ‘GHC.Float’))
+ ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- map :: forall a b. (a -> b) -> [a] -> [b]
+ (and originally defined in ‘GHC.Real’))
+ floor :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- otherwise :: Bool
+ (and originally defined in ‘GHC.Real’))
+ round :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- (**) :: forall a. Floating a => a -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.Float’))
+ decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.Float’))
+ atan2 :: forall a. RealFloat a => a -> a -> a
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.Float’))
+ pi :: forall a. Floating a => a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
acos :: forall a. Floating a => a -> a
@@ -170,9 +169,6 @@ holes3.hs:11:15: error:
atan :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- atan2 :: forall a. RealFloat a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
atanh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
@@ -182,218 +178,232 @@ holes3.hs:11:15: error:
cosh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
exp :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- exponent :: forall a. RealFloat a => a -> Int
+ log :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- floatDigits :: forall a. RealFloat a => a -> Int
+ sin :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- floatRadix :: forall a. RealFloat a => a -> Integer
+ sinh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- floatRange :: forall a. RealFloat a => a -> (Int, Int)
+ sqrt :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- isDenormalized :: forall a. RealFloat a => a -> Bool
+ tan :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- isIEEE :: forall a. RealFloat a => a -> Bool
+ tanh :: forall a. Floating a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- isInfinite :: forall a. RealFloat a => a -> Bool
+ recip :: forall a. Fractional a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- isNaN :: forall a. RealFloat a => a -> Bool
+ (and originally defined in ‘GHC.Real’))
+ (**) :: forall a. Floating a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- isNegativeZero :: forall a. RealFloat a => a -> Bool
+ logBase :: forall a. Floating a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Float’))
- log :: forall a. Floating a => a -> a
+ (/) :: forall a. Fractional a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- logBase :: forall a. Floating a => a -> a -> a
+ (and originally defined in ‘GHC.Real’))
+ not :: Bool -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- pi :: forall a. Floating a => a
+ (and originally defined in ‘GHC.Classes’))
+ (&&) :: Bool -> Bool -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- scaleFloat :: forall a. RealFloat a => Int -> a -> a
+ (and originally defined in ‘GHC.Classes’))
+ (||) :: Bool -> Bool -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- significand :: forall a. RealFloat a => a -> a
+ (and originally defined in ‘GHC.Classes’))
+ readFile :: FilePath -> IO String
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- sin :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putStr :: String -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- sinh :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putStrLn :: String -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- sqrt :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ putChar :: Char -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- tan :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ interact :: (String -> String) -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- tanh :: forall a. Floating a => a -> a
+ (and originally defined in ‘System.IO’))
+ getContents :: IO String
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- (*) :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘System.IO’))
+ getLine :: IO String
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (+) :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘System.IO’))
+ getChar :: IO Char
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- abs :: forall a. Num a => a -> a
+ (and originally defined in ‘System.IO’))
+ appendFile :: FilePath -> String -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- fromInteger :: forall a. Num a => Integer -> a
+ (and originally defined in ‘System.IO’))
+ writeFile :: FilePath -> String -> IO ()
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- negate :: forall a. Num a => a -> a
+ (and originally defined in ‘System.IO’))
+ showString :: String -> ShowS
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- signum :: forall a. Num a => a -> a
+ (and originally defined in ‘GHC.Show’))
+ showParen :: Bool -> ShowS -> ShowS
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- subtract :: forall a. Num a => a -> a -> a
+ (and originally defined in ‘GHC.Show’))
+ showChar :: Char -> ShowS
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Num’))
- (/) :: forall a. Fractional a => a -> a -> a
+ (and originally defined in ‘GHC.Show’))
+ gcd :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ lcm :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
+ div :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
+ mod :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- div :: forall a. Integral a => a -> a -> a
+ quot :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- divMod :: forall a. Integral a => a -> a -> (a, a)
+ rem :: forall a. Integral a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
even :: forall a. Integral a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- floor :: forall a. RealFrac a => forall b. Integral b => a -> b
+ odd :: forall a. Integral a => a -> Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- fromIntegral :: forall a b. (Integral a, Num b) => a -> b
+ (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- fromRational :: forall a. Fractional a => Rational -> a
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Real’))
- gcd :: forall a. Integral a => a -> a -> a
+ readParen :: forall a. Bool -> ReadS a -> ReadS a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- lcm :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.Read’))
+ lex :: ReadS String
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- mod :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.Read’))
+ zipWith3 :: forall a b c d.
+ (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- odd :: forall a. Integral a => a -> Bool
+ (and originally defined in ‘GHC.List’))
+ zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- properFraction :: forall a.
- RealFrac a =>
- forall b. Integral b => a -> (b, a)
+ (and originally defined in ‘GHC.List’))
+ zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- quot :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.List’))
+ unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- quotRem :: forall a. Integral a => a -> a -> (a, a)
+ (and originally defined in ‘GHC.List’))
+ unzip :: forall a b. [(a, b)] -> ([a], [b])
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- realToFrac :: forall a b. (Real a, Fractional b) => a -> b
+ (and originally defined in ‘GHC.List’))
+ splitAt :: forall a. Int -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- recip :: forall a. Fractional a => a -> a
+ (and originally defined in ‘GHC.List’))
+ scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- rem :: forall a. Integral a => a -> a -> a
+ (and originally defined in ‘GHC.List’))
+ scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- round :: forall a. RealFrac a => forall b. Integral b => a -> b
+ (and originally defined in ‘GHC.List’))
+ scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- toInteger :: forall a. Integral a => a -> Integer
+ (and originally defined in ‘GHC.List’))
+ scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- toRational :: forall a. Real a => a -> Rational
+ (and originally defined in ‘GHC.List’))
+ replicate :: forall a. Int -> a -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
+ (and originally defined in ‘GHC.List’))
+ iterate :: forall a. (a -> a) -> a -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- showChar :: Char -> ShowS
+ (and originally defined in ‘GHC.List’))
+ drop :: forall a. Int -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Show’))
- showParen :: Bool -> ShowS -> ShowS
+ (and originally defined in ‘GHC.List’))
+ take :: forall a. Int -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Show’))
- showString :: String -> ShowS
+ (and originally defined in ‘GHC.List’))
+ cycle :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Show’))
- appendFile :: FilePath -> String -> IO ()
+ (and originally defined in ‘GHC.List’))
+ init :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getChar :: IO Char
+ (and originally defined in ‘GHC.List’))
+ reverse :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getContents :: IO String
+ (and originally defined in ‘GHC.List’))
+ tail :: forall a. [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getLine :: IO String
+ (and originally defined in ‘GHC.List’))
+ break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- interact :: (String -> String) -> IO ()
+ (and originally defined in ‘GHC.List’))
+ span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putChar :: Char -> IO ()
+ (and originally defined in ‘GHC.List’))
+ (!!) :: forall a. [a] -> Int -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putStr :: String -> IO ()
+ (and originally defined in ‘GHC.List’))
+ userError :: String -> IOError
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putStrLn :: String -> IO ()
+ (and originally defined in ‘GHC.IO.Exception’))
+ ioError :: forall a. IOError -> IO a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- readFile :: FilePath -> IO String
+ (and originally defined in ‘GHC.IO.Exception’))
+ until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- writeFile :: FilePath -> String -> IO ()
+ (and originally defined in ‘GHC.Base’))
+ flip :: forall a b c. (a -> b -> c) -> b -> a -> c
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- lines :: String -> [String]
+ (and originally defined in ‘GHC.Base’))
+ (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ (and originally defined in ‘GHC.Base’))
+ ($!) :: forall a b. (a -> b) -> a -> b
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘Data.Tuple’))
+ curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘Data.Tuple’))
unlines :: [String] -> String
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
unwords :: [String] -> String
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ head :: forall a. [a] -> a
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.List’))
+ last :: forall a. [a] -> a
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.List’))
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘base-4.11.0.0:Data.OldList’))
words :: String -> [String]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘base-4.11.0.0:Data.OldList’))
+ repeat :: forall a. a -> [a]
+ (imported from ‘Prelude’ at holes3.hs:1:8-13
+ (and originally defined in ‘GHC.List’))
error :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
[Char] -> a
@@ -402,117 +412,107 @@ holes3.hs:11:15: error:
errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Err’))
- undefined :: forall (a :: TYPE r).
- GHC.Stack.Types.HasCallStack =>
- a
+ maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
- ioError :: forall a. IOError -> IO a
+ (and originally defined in ‘Data.Maybe’))
+ either :: forall a c b. (a -> c) -> (b -> c) -> Either a b -> c
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.IO.Exception’))
- userError :: String -> IOError
+ (and originally defined in ‘Data.Either’))
+ Just :: forall a. a -> Maybe a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.IO.Exception’))
- (!!) :: forall a. [a] -> Int -> a
+ (and originally defined in ‘GHC.Base’))
+ Nothing :: forall a. Maybe a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ toRational :: forall a. Real a => a -> Rational
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- cycle :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ toInteger :: forall a. Integral a => a -> Integer
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- drop :: forall a. Int -> [a] -> [a]
+ (and originally defined in ‘GHC.Real’))
+ negate :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ abs :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- head :: forall a. [a] -> a
+ (and originally defined in ‘GHC.Num’))
+ signum :: forall a. Num a => a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- init :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ fromRational :: forall a. Fractional a => Rational -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- iterate :: forall a. (a -> a) -> a -> [a]
+ (and originally defined in ‘GHC.Real’))
+ realToFrac :: forall a b. (Real a, Fractional b) => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- last :: forall a. [a] -> a
+ (and originally defined in ‘GHC.Real’))
+ (-) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- repeat :: forall a. a -> [a]
+ (and originally defined in ‘GHC.Num’))
+ subtract :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- replicate :: forall a. Int -> a -> [a]
+ (and originally defined in ‘GHC.Num’))
+ (*) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- reverse :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
+ (and originally defined in ‘GHC.Num’))
+ fromInteger :: forall a. Num a => Integer -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ (and originally defined in ‘GHC.Num’))
+ fromIntegral :: forall a b. (Integral a, Num b) => a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
+ (and originally defined in ‘GHC.Real’))
+ ($) :: forall a (b :: TYPE r). (a -> b) -> a -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ (and originally defined in ‘GHC.Base’))
+ id :: forall a. a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ map :: forall a b. (a -> b) -> [a] -> [b]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- splitAt :: forall a. Int -> [a] -> ([a], [a])
+ (and originally defined in ‘GHC.Base’))
+ otherwise :: Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- tail :: forall a. [a] -> [a]
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- take :: forall a. Int -> [a] -> [a]
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ (and originally defined in ‘GHC.Types’))
+ snd :: forall a b. (a, b) -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- unzip :: forall a b. [(a, b)] -> ([a], [b])
+ (and originally defined in ‘Data.Tuple’))
+ fst :: forall a b. (a, b) -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
+ (and originally defined in ‘Data.Tuple’))
+ zip :: forall a b. [a] -> [b] -> [(a, b)]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.List’))
- zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
+ filter :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.List’))
- zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
+ dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.List’))
- zipWith3 :: forall a b c d.
- (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
+ takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.List’))
- lex :: ReadS String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Read’))
- readParen :: forall a. Bool -> ReadS a -> ReadS a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Read’))
- (&&) :: Bool -> Bool -> Bool
+ (++) :: forall a. [a] -> [a] -> [a]
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
- not :: Bool -> Bool
+ (and originally defined in ‘GHC.Base’))
+ asTypeOf :: forall a. a -> a -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
- (||) :: Bool -> Bool -> Bool
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
+ (and originally defined in ‘GHC.Base’))
seq :: forall a b. a -> b -> b
(imported from ‘Prelude’ at holes3.hs:1:8-13
(and originally defined in ‘GHC.Prim’))
- filter :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- zip :: forall a b. [a] -> [b] -> [(a, b)]
+ undefined :: forall (a :: TYPE r).
+ GHC.Stack.Types.HasCallStack =>
+ a
(imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
+ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
index 1d7c911455..baf4c1ff30 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
+++ b/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
@@ -24,10 +24,10 @@ valid_substitutions.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)]
a :: Int -> IO Int (defined at valid_substitutions.hs:12:1)
b :: Int -> IO Int (defined at valid_substitutions.hs:14:1)
c :: Int -> IO Int (defined at valid_substitutions.hs:16:1)
- pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
@@ -49,6 +49,8 @@ valid_substitutions.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
Valid substitutions include
test :: forall a. [Maybe a] -> [a]
(defined at valid_substitutions.hs:21:1)
+ catMaybes :: forall a. [Maybe a] -> [a]
+ (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17)
mempty :: forall a. Monoid a => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
@@ -57,8 +59,6 @@ valid_substitutions.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
- catMaybes :: forall a. [Maybe a] -> [a]
- (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17)
valid_substitutions.hs:24:9: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Integer -> ValidSubs.Moo
@@ -90,10 +90,10 @@ valid_substitutions.hs:27:5: warning: [-Wtyped-holes (in -Wdefault)]
Just :: forall a. a -> Maybe a
(imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17
(and originally defined in ‘GHC.Base’))
- pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
@@ -126,30 +126,30 @@ valid_substitutions.hs:30:10: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
f :: String (bound at valid_substitutions.hs:30:1)
Valid substitutions include
- h :: String (defined at valid_substitutions.hs:34:1)
f :: String (defined at valid_substitutions.hs:30:1)
+ h :: String (defined at valid_substitutions.hs:34:1)
k :: Maybe Integer (defined at valid_substitutions.hs:27:1)
- False :: Bool
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Types’))
- True :: Bool
+ EQ :: Ordering
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Types’))
LT :: Ordering
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Types’))
- EQ :: Ordering
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Types’))
GT :: Ordering
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Types’))
+ pi :: forall a. Floating a => a
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Float’))
otherwise :: Bool
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Base’))
- pi :: forall a. Floating a => a
+ False :: Bool
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Float’))
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
valid_substitutions.hs:34:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Ambiguous type variable ‘a0’ arising from a use of ‘show’
@@ -175,33 +175,33 @@ valid_substitutions.hs:34:11: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
h :: String (bound at valid_substitutions.hs:34:1)
Valid substitutions include
- Just :: forall a. a -> Maybe a
- (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17
- (and originally defined in ‘GHC.Base’))
- id :: forall a. a -> a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Base’))
- enumFrom :: forall a. Enum a => a -> [a]
+ show :: forall a. Show a => a -> String
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Enum’))
+ (and originally defined in ‘GHC.Show’))
fromEnum :: forall a. Enum a => a -> Int
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Enum’))
+ not :: Bool -> Bool
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Classes’))
pred :: forall a. Enum a => a -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Enum’))
succ :: forall a. Enum a => a -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Enum’))
- show :: forall a. Show a => a -> String
+ id :: forall a. a -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Show’))
+ (and originally defined in ‘GHC.Base’))
+ Just :: forall a. a -> Maybe a
+ (imported from ‘Data.Maybe’ at valid_substitutions.hs:5:1-17
+ (and originally defined in ‘GHC.Base’))
+ enumFrom :: forall a. Enum a => a -> [a]
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
repeat :: forall a. a -> [a]
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.List’))
- not :: Bool -> Bool
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Classes’))
valid_substitutions.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Bool
@@ -211,15 +211,15 @@ valid_substitutions.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
h :: String (bound at valid_substitutions.hs:34:1)
Valid substitutions include
+ otherwise :: Bool
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
False :: Bool
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Types’))
True :: Bool
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Types’))
- otherwise :: Bool
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Base’))
maxBound :: forall a. Bounded a => a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Enum’))
@@ -245,18 +245,12 @@ valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
(imported qualified from ‘System.IO’ at valid_substitutions.hs:4:29-34)
System.IO.putStrLn :: String -> IO ()
(imported qualified from ‘System.IO’ at valid_substitutions.hs:4:37-44)
- fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Base’))
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Base’))
- print :: forall a. Show a => a -> IO ()
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘System.IO’))
readIO :: forall a. Read a => String -> IO a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘System.IO’))
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
error :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
[Char] -> a
@@ -265,6 +259,12 @@ valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a
(imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
(and originally defined in ‘GHC.Err’))
+ print :: forall a. Show a => a -> IO ()
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
index bb50a657f6..2781799f82 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
+++ b/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
@@ -7,10 +7,10 @@ valid_substitutions_interactions.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)
f :: SBool 'True
(bound at valid_substitutions_interactions.hs:15:1)
Valid substitutions include
- STrue :: SBool 'True
- (defined at valid_substitutions_interactions.hs:12:3)
f :: SBool 'True
(defined at valid_substitutions_interactions.hs:15:1)
+ STrue :: SBool 'True
+ (defined at valid_substitutions_interactions.hs:12:3)
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_fail/T9497d.stderr b/testsuite/tests/typecheck/should_fail/T9497d.stderr
index 294e92e505..9e2d04fdb4 100644
--- a/testsuite/tests/typecheck/should_fail/T9497d.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9497d.stderr
@@ -7,12 +7,12 @@ T9497d.hs:2:8: error:
• Relevant bindings include main :: IO () (bound at T9497d.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497d.hs:2:1)
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at T9497d.hs:1:1
- (and originally defined in ‘GHC.Base’))
readLn :: forall a. Read a => IO a
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at T9497d.hs:1:1
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_run/T9497a-run.stderr b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
index 4fc42e5122..bc6efa557f 100644
--- a/testsuite/tests/typecheck/should_run/T9497a-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
@@ -7,12 +7,12 @@ T9497a-run: T9497a-run.hs:2:8: error:
main :: IO () (bound at T9497a-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497a-run.hs:2:1)
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at T9497a-run.hs:1:1
- (and originally defined in ‘GHC.Base’))
readLn :: forall a. Read a => IO a
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at T9497a-run.hs:1:1
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_run/T9497b-run.stderr b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
index 2141035232..658146101e 100644
--- a/testsuite/tests/typecheck/should_run/T9497b-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
@@ -7,12 +7,12 @@ T9497b-run: T9497b-run.hs:2:8: error:
main :: IO () (bound at T9497b-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497b-run.hs:2:1)
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at T9497b-run.hs:1:1
- (and originally defined in ‘GHC.Base’))
readLn :: forall a. Read a => IO a
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at T9497b-run.hs:1:1
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a
diff --git a/testsuite/tests/typecheck/should_run/T9497c-run.stderr b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
index dd2426ec84..fcfde6ec91 100644
--- a/testsuite/tests/typecheck/should_run/T9497c-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
@@ -7,12 +7,12 @@ T9497c-run: T9497c-run.hs:2:8: error:
main :: IO () (bound at T9497c-run.hs:2:1)
Valid substitutions include
main :: IO () (defined at T9497c-run.hs:2:1)
- mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at T9497c-run.hs:1:1
- (and originally defined in ‘GHC.Base’))
readLn :: forall a. Read a => IO a
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘System.IO’))
+ mempty :: forall a. Monoid a => a
+ (imported from ‘Prelude’ at T9497c-run.hs:1:1
+ (and originally defined in ‘GHC.Base’))
undefined :: forall (a :: TYPE r).
GHC.Stack.Types.HasCallStack =>
a