summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/gadt/T12468.stderr8
-rw-r--r--testsuite/tests/ghci/scripts/T10248.stderr4
-rw-r--r--testsuite/tests/ghci/scripts/T10249.stderr3
-rw-r--r--testsuite/tests/ghci/scripts/T8353.stderr45
-rw-r--r--testsuite/tests/module/mod71.stderr5
-rw-r--r--testsuite/tests/partial-sigs/should_compile/T12531.stderr5
-rw-r--r--testsuite/tests/th/T10267.stderr58
-rw-r--r--testsuite/tests/th/all.T2
-rw-r--r--testsuite/tests/typecheck/should_compile/T13050.stderr225
-rw-r--r--testsuite/tests/typecheck/should_compile/T14273.stderr27
-rw-r--r--testsuite/tests/typecheck/should_compile/T14590.stderr304
-rw-r--r--testsuite/tests/typecheck/should_compile/T9497a.stderr9
-rw-r--r--testsuite/tests/typecheck/should_compile/ValidHoleFits.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/ValidSubs.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.hs (renamed from testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.hs)0
-rw-r--r--testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr277
-rw-r--r--testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr410
-rw-r--r--testsuite/tests/typecheck/should_compile/all.T31
-rw-r--r--testsuite/tests/typecheck/should_compile/constraint_hole_fits.hs4
-rw-r--r--testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr65
-rw-r--r--testsuite/tests/typecheck/should_compile/free_monad_hole_fits.hs25
-rw-r--r--testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr81
-rw-r--r--testsuite/tests/typecheck/should_compile/hole_constraints.stderr44
-rw-r--r--testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr9
-rw-r--r--testsuite/tests/typecheck/should_compile/holes.stderr574
-rw-r--r--testsuite/tests/typecheck/should_compile/holes2.stderr24
-rw-r--r--testsuite/tests/typecheck/should_compile/holes3.stderr574
-rwxr-xr-xtestsuite/tests/typecheck/should_compile/local_hole_fits.hs11
-rw-r--r--testsuite/tests/typecheck/should_compile/local_hole_fits.stderr28
-rw-r--r--testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs (renamed from testsuite/tests/typecheck/should_compile/refinement_substitutions.hs)0
-rw-r--r--testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr236
-rw-r--r--testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr330
-rwxr-xr-xtestsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.hs5
-rw-r--r--testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr39
-rw-r--r--testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs88
-rw-r--r--testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.stderr78
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_hole_fits.hs (renamed from testsuite/tests/typecheck/should_compile/valid_substitutions.hs)4
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr255
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.hs (renamed from testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.hs)0
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.stderr11
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions.stderr258
-rw-r--r--testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr16
-rw-r--r--testsuite/tests/typecheck/should_fail/T12177.stderr8
-rw-r--r--testsuite/tests/typecheck/should_fail/T14884.stderr17
-rw-r--r--testsuite/tests/typecheck/should_fail/T9497d.stderr9
-rw-r--r--testsuite/tests/typecheck/should_run/T9497a-run.stderr9
-rw-r--r--testsuite/tests/typecheck/should_run/T9497b-run.stderr9
-rw-r--r--testsuite/tests/typecheck/should_run/T9497c-run.stderr9
48 files changed, 1931 insertions, 2310 deletions
diff --git a/testsuite/tests/gadt/T12468.stderr b/testsuite/tests/gadt/T12468.stderr
index 3f540931ec..402a93d82d 100644
--- a/testsuite/tests/gadt/T12468.stderr
+++ b/testsuite/tests/gadt/T12468.stderr
@@ -4,13 +4,13 @@ T12468.hs:9:7: error:
• In the expression: _
In an equation for ‘f’: f I = _
• Relevant bindings include f :: T a -> a (bound at T12468.hs:9:1)
- Valid substitutions include
+ Constraints include a ~ Int (from T12468.hs:9:3)
+ Valid hole fits include
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at T12468.hs:3:8-13
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at T12468.hs:3:8-13
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T12468.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
index d6428c5cbd..b9cf45a8f6 100644
--- a/testsuite/tests/ghci/scripts/T10248.stderr
+++ b/testsuite/tests/ghci/scripts/T10248.stderr
@@ -9,6 +9,4 @@
In an equation for ‘it’: it = Just <$> _
• Relevant bindings include
it :: f (Maybe a) (bound at <interactive>:2:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ (and originally defined in ‘GHC.Err’))
+ Constraints include Functor f (from <interactive>:2:1-10)
diff --git a/testsuite/tests/ghci/scripts/T10249.stderr b/testsuite/tests/ghci/scripts/T10249.stderr
index d495994e95..c8215663a5 100644
--- a/testsuite/tests/ghci/scripts/T10249.stderr
+++ b/testsuite/tests/ghci/scripts/T10249.stderr
@@ -7,6 +7,3 @@
• In the expression: _
In an equation for ‘it’: it = _
• Relevant bindings include it :: t (bound at <interactive>:1:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/ghci/scripts/T8353.stderr b/testsuite/tests/ghci/scripts/T8353.stderr
index 4cac123c96..a84b0b7e83 100644
--- a/testsuite/tests/ghci/scripts/T8353.stderr
+++ b/testsuite/tests/ghci/scripts/T8353.stderr
@@ -9,18 +9,17 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. 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’
@@ -32,18 +31,17 @@ Defer03.hs:7:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. 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’
@@ -55,18 +53,17 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. 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’
@@ -78,18 +75,17 @@ Defer03.hs:7:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. 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’
@@ -101,15 +97,14 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
a :: Int (defined at Defer03.hs:4:1)
- f :: Int (defined at Defer03.hs:7:1)
maxBound :: forall a. Bounded a => a
+ with maxBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
+ with minBound @Int
(imported from ‘Prelude’ at Defer03.hs:1:8-11
(and originally defined in ‘GHC.Enum’))
- undefined :: forall a. 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/module/mod71.stderr b/testsuite/tests/module/mod71.stderr
index 52d0ae3e86..d877e397a0 100644
--- a/testsuite/tests/module/mod71.stderr
+++ b/testsuite/tests/module/mod71.stderr
@@ -10,7 +10,4 @@ mod71.hs:4:9: error:
• Relevant bindings include
x :: t1 -> t -> t2 (bound at mod71.hs:4:3)
f :: (t1 -> t -> t2) -> t2 (bound at mod71.hs:4:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at mod71.hs:3:8
- (and originally defined in ‘GHC.Err’))
+ Constraints include Num t (from mod71.hs:4:1-11)
diff --git a/testsuite/tests/partial-sigs/should_compile/T12531.stderr b/testsuite/tests/partial-sigs/should_compile/T12531.stderr
index 20c44ecb12..a17062d2f0 100644
--- a/testsuite/tests/partial-sigs/should_compile/T12531.stderr
+++ b/testsuite/tests/partial-sigs/should_compile/T12531.stderr
@@ -7,7 +7,4 @@ T12531.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
x :: Int# (bound at T12531.hs:6:3)
f :: Int# -> Int (bound at T12531.hs:6:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T12531.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include x :: Int# (bound at T12531.hs:6:3)
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr
index 6ebda88797..0f8e2215bc 100644
--- a/testsuite/tests/th/T10267.stderr
+++ b/testsuite/tests/th/T10267.stderr
@@ -10,10 +10,7 @@ T10267.hs:8:1: error:
• Relevant bindings include
x :: a (bound at T10267.hs:8:1)
j :: a -> a (bound at T10267.hs:8:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T10267.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include x :: a (bound at T10267.hs:8:1)
T10267.hs:8:1: error:
• Found hole: _foo :: a -> a
@@ -25,18 +22,24 @@ T10267.hs:8:1: error:
• In the expression: _foo
In an equation for ‘i’: i = _foo
• Relevant bindings include i :: a -> a (bound at T10267.hs:8:1)
- Valid substitutions include
- 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)
+ Valid hole fits include
+ i :: a -> a (bound at T10267.hs:8:1)
+ j :: forall a. a -> a
+ with j @a
+ (bound at T10267.hs:8:1)
+ k :: forall a. a -> a
+ with k @a
+ (defined at T10267.hs:14:3)
+ l :: forall a. a -> a
+ with l @a
+ (defined at T10267.hs:23:3)
+ foo :: forall a. a -> a
+ with foo @a
+ (defined at T10267.hs:33:1)
id :: forall a. a -> a
+ with id @a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T10267.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
T10267.hs:14:3: error:
• Found hole: _foo :: a -> a
@@ -48,18 +51,24 @@ T10267.hs:14:3: error:
• In the expression: _foo
In an equation for ‘k’: k = _foo
• Relevant bindings include k :: a -> a (bound at T10267.hs:14:3)
- Valid substitutions include
- 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)
+ Valid hole fits include
+ k :: a -> a (bound at T10267.hs:14:3)
+ j :: forall a. a -> a
+ with j @a
+ (bound at T10267.hs:8:1)
+ i :: forall a. a -> a
+ with i @a
+ (bound at T10267.hs:8:1)
+ l :: forall a. a -> a
+ with l @a
+ (defined at T10267.hs:23:3)
+ foo :: forall a. a -> a
+ with foo @a
+ (defined at T10267.hs:33:1)
id :: forall a. a -> a
+ with id @a
(imported from ‘Prelude’ at T10267.hs:3:8-13
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T10267.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
T10267.hs:23:3: error:
• Found hole: _ :: a
@@ -72,7 +81,4 @@ T10267.hs:23:3: error:
• Relevant bindings include
x :: a (bound at T10267.hs:23:3)
l :: a -> a (bound at T10267.hs:23:3)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T10267.hs:3:8-13
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include x :: a (bound at T10267.hs:23:3)
diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T
index e103184283..e998bd0027 100644
--- a/testsuite/tests/th/all.T
+++ b/testsuite/tests/th/all.T
@@ -305,7 +305,7 @@ test('TH_Lift', normal, compile, ['-v0'])
test('T10047', only_ways(['ghci']), ghci_script, ['T10047.script'])
test('T10019', only_ways(['ghci']), ghci_script, ['T10019.script'])
test('T10267', [], multimod_compile_fail,
- ['T10267', '-fno-max-valid-substitutions -dsuppress-uniques -v0 ' + config.ghc_th_way_flags])
+ ['T10267', '-fno-max-valid-hole-fits -dsuppress-uniques -v0 ' + config.ghc_th_way_flags])
test('T10279', normal, compile_fail, ['-v0'])
test('T10306', normal, compile, ['-v0'])
test('T10596', normal, compile, ['-v0'])
diff --git a/testsuite/tests/typecheck/should_compile/T13050.stderr b/testsuite/tests/typecheck/should_compile/T13050.stderr
index bb0b9effef..407b256d81 100644
--- a/testsuite/tests/typecheck/should_compile/T13050.stderr
+++ b/testsuite/tests/typecheck/should_compile/T13050.stderr
@@ -8,67 +8,82 @@ T13050.hs:4:9: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T13050.hs:4:5)
x :: Int (bound at T13050.hs:4:3)
f :: Int -> Int -> Int (bound at T13050.hs:4:1)
- Valid substitutions include
- 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)
+ Valid hole fits include
+ f :: Int -> Int -> Int (bound at T13050.hs:4:1)
+ g :: Int -> Int -> Int (bound at T13050.hs:5:1)
+ q :: Int -> Int -> Int (bound at T13050.hs:6:1)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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,67 +94,82 @@ T13050.hs:5:11: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T13050.hs:5:5)
x :: Int (bound at T13050.hs:5:3)
g :: Int -> Int -> Int (bound at T13050.hs:5:1)
- Valid substitutions include
+ Valid hole fits include
+ g :: Int -> Int -> Int (bound at T13050.hs:5:1)
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)
+ q :: Int -> Int -> Int (bound at T13050.hs:6:1)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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
@@ -151,64 +181,79 @@ T13050.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T13050.hs:6:5)
x :: Int (bound at T13050.hs:6:3)
q :: Int -> Int -> Int (bound at T13050.hs:6:1)
- Valid substitutions include
+ Valid hole fits include
+ q :: Int -> Int -> Int (bound at T13050.hs:6:1)
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)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T13050.hs:1:8-17
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T13050.hs:1:8-17
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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 9d320c7709..f307c77ded 100644
--- a/testsuite/tests/typecheck/should_compile/T14273.stderr
+++ b/testsuite/tests/typecheck/should_compile/T14273.stderr
@@ -28,8 +28,19 @@ T14273.hs:7:32: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
a :: a (bound at T14273.hs:7:17)
pleaseShow :: Bool -> a -> Maybe String (bound at T14273.hs:6:1)
- Valid substitutions include
- k :: String (defined at T14273.hs:10:1)
+ Constraints include Show a (from T14273.hs:5:1-49)
+ Valid hole fits include
+ a :: a (bound at T14273.hs:7:17)
+ k :: String (bound at T14273.hs:10:1)
+ otherwise :: Bool
+ (imported from ‘Prelude’ at T14273.hs:1:8-40
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
+ (imported from ‘Prelude’ at T14273.hs:1:8-40
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (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’))
@@ -40,17 +51,9 @@ T14273.hs:7:32: warning: [-Wtyped-holes (in -Wdefault)]
(imported from ‘Prelude’ at T14273.hs:1:8-40
(and originally defined in ‘GHC.Types’))
pi :: forall a. Floating a => a
+ with pi @Double
(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’))
- False :: Bool
- (imported from ‘Prelude’ at T14273.hs:1:8-40
- (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’
@@ -77,4 +80,4 @@ T14273.hs:13:16: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
xs :: [a] (bound at T14273.hs:13:5)
foo :: [a] -> String (bound at T14273.hs:13:1)
- Valid substitutions include k :: String (defined at T14273.hs:10:1)
+ Valid hole fits include k :: String (defined at T14273.hs:10:1)
diff --git a/testsuite/tests/typecheck/should_compile/T14590.stderr b/testsuite/tests/typecheck/should_compile/T14590.stderr
index 0c6e23affe..2e0f784e02 100644
--- a/testsuite/tests/typecheck/should_compile/T14590.stderr
+++ b/testsuite/tests/typecheck/should_compile/T14590.stderr
@@ -8,68 +8,83 @@ T14590.hs:4:13: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T14590.hs:4:6)
x :: Int (bound at T14590.hs:4:4)
f1 :: Int -> Int -> Int (bound at T14590.hs:4:1)
- Valid substitutions include
- f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
- 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)
+ Valid hole fits include
+ f1 :: Int -> Int -> Int (bound at T14590.hs:4:1)
+ f2 :: Int -> Int -> Int (bound at T14590.hs:5:1)
+ f3 :: Int -> Int -> Int (bound at T14590.hs:6:1)
+ f4 :: Int -> Int -> Int (bound at T14590.hs:7:1)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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
@@ -81,68 +96,83 @@ T14590.hs:5:13: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T14590.hs:5:6)
x :: Int (bound at T14590.hs:5:4)
f2 :: Int -> Int -> Int (bound at T14590.hs:5:1)
- Valid substitutions include
+ Valid hole fits include
+ f2 :: Int -> Int -> Int (bound at T14590.hs:5:1)
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
- 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)
+ f3 :: Int -> Int -> Int (bound at T14590.hs:6:1)
+ f4 :: Int -> Int -> Int (bound at T14590.hs:7:1)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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
@@ -153,68 +183,83 @@ T14590.hs:6:11: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T14590.hs:6:6)
x :: Int (bound at T14590.hs:6:4)
f3 :: Int -> Int -> Int (bound at T14590.hs:6:1)
- Valid substitutions include
+ Valid hole fits include
+ f3 :: Int -> Int -> Int (bound at T14590.hs:6:1)
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
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)
+ f4 :: Int -> Int -> Int (bound at T14590.hs:7:1)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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
@@ -226,65 +271,80 @@ T14590.hs:7:11: warning: [-Wtyped-holes (in -Wdefault)]
y :: Int (bound at T14590.hs:7:6)
x :: Int (bound at T14590.hs:7:4)
f4 :: Int -> Int -> Int (bound at T14590.hs:7:1)
- Valid substitutions include
+ Valid hole fits include
+ f4 :: Int -> Int -> Int (bound at T14590.hs:7:1)
f1 :: Int -> Int -> Int (defined at T14590.hs:4:1)
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)
+ seq :: forall a b. a -> b -> b
+ with seq @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Prim’))
+ (-) :: forall a. Num a => a -> a -> a
+ with (-) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ const :: forall a b. a -> b -> a
+ with const @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Base’))
+ subtract :: forall a. Num a => a -> a -> a
+ with subtract @Int
+ (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
+ with (^) @Int @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Real’))
gcd :: forall a. Integral a => a -> a -> a
+ with gcd @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
lcm :: forall a. Integral a => a -> a -> a
+ with lcm @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
+ (*) :: forall a. Num a => a -> a -> a
+ with (*) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
+ (+) :: forall a. Num a => a -> a -> a
+ with (+) @Int
+ (imported from ‘Prelude’ at T14590.hs:1:8-13
+ (and originally defined in ‘GHC.Num’))
div :: forall a. Integral a => a -> a -> a
+ with div @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
mod :: forall a. Integral a => a -> a -> a
+ with mod @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
+ with quot @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
rem :: forall a. Integral a => a -> a -> a
+ with rem @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Real’))
max :: forall a. Ord a => a -> a -> a
+ with max @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Classes’))
min :: forall a. Ord a => a -> a -> a
+ with min @Int
(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’))
return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Int) @Int
(imported from ‘Prelude’ at T14590.hs:1:8-13
(and originally defined in ‘GHC.Base’))
pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) Int) @Int
(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. 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 b095e5a3f1..d24849df79 100644
--- a/testsuite/tests/typecheck/should_compile/T9497a.stderr
+++ b/testsuite/tests/typecheck/should_compile/T9497a.stderr
@@ -5,14 +5,13 @@ T9497a.hs:2:8: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _main
In an equation for ‘main’: main = _main
• Relevant bindings include main :: IO () (bound at T9497a.hs:2:1)
- Valid substitutions include
- main :: IO () (defined at T9497a.hs:2:1)
+ Valid hole fits include
+ main :: IO () (bound at T9497a.hs:2:1)
readLn :: forall a. Read a => IO a
+ with readLn @()
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘System.IO’))
mempty :: forall a. Monoid a => a
+ with mempty @(IO ())
(imported from ‘Prelude’ at T9497a.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T9497a.hs:1:1
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/ValidHoleFits.hs b/testsuite/tests/typecheck/should_compile/ValidHoleFits.hs
new file mode 100644
index 0000000000..c996d109fa
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/ValidHoleFits.hs
@@ -0,0 +1,4 @@
+module ValidHoleFits where
+
+
+data Moo = Moo Integer
diff --git a/testsuite/tests/typecheck/should_compile/ValidSubs.hs b/testsuite/tests/typecheck/should_compile/ValidSubs.hs
deleted file mode 100644
index 050b317d9d..0000000000
--- a/testsuite/tests/typecheck/should_compile/ValidSubs.hs
+++ /dev/null
@@ -1,4 +0,0 @@
-module ValidSubs where
-
-
-data Moo = Moo Integer
diff --git a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.hs b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.hs
index 4949632308..4949632308 100644
--- a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.hs
+++ b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.hs
diff --git a/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr
new file mode 100644
index 0000000000..3c2a30563a
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr
@@ -0,0 +1,277 @@
+
+abstract_refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: [Integer] -> Integer
+ • In the expression: _
+ In an equation for ‘f’: f = _
+ • Relevant bindings include
+ f :: [Integer] -> Integer
+ (bound at abstract_refinement_hole_fits.hs:4:1)
+ Valid hole fits include
+ f :: [Integer] -> Integer
+ g :: [Integer] -> Integer
+ head :: forall a. [a] -> a
+ last :: forall a. [a] -> a
+ maximum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ minimum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ product :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Num a => t a -> a
+ sum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Num a => t a -> a
+ Valid refinement hole fits include
+ foldl1 (_ :: Integer -> Integer -> Integer)
+ where foldl1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ foldr1 (_ :: Integer -> Integer -> Integer)
+ where foldr1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ foldl (_ :: Integer -> Integer -> Integer) (_ :: Integer)
+ where foldl :: forall (t :: * -> *).
+ Foldable t =>
+ forall b a. (b -> a -> b) -> b -> t a -> b
+ foldr (_ :: Integer -> Integer -> Integer) (_ :: Integer)
+ where foldr :: forall (t :: * -> *).
+ Foldable t =>
+ forall a b. (a -> b -> b) -> b -> t a -> b
+ const (_ :: Integer)
+ where const :: forall a b. a -> b -> a
+ ($) (_ :: [Integer] -> Integer)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ fail (_ :: String)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ return (_ :: Integer)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure (_ :: Integer)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ ($!) (_ :: [Integer] -> Integer)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+ curry (_ :: (a2, [Integer]) -> Integer) (_ :: a2)
+ where curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (.) (_ :: b1 -> Integer) (_ :: [Integer] -> b1)
+ where (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ flip (_ :: [Integer] -> b7 -> Integer) (_ :: b7)
+ where flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ (>>=) (_ :: [Integer] -> a11) (_ :: a11 -> [Integer] -> Integer)
+ where (>>=) :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (>>) (_ :: [Integer] -> a10) (_ :: [Integer] -> Integer)
+ where (>>) :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
+ fmap (_ :: a12 -> Integer) (_ :: [Integer] -> a12)
+ where fmap :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (<*>) (_ :: [Integer] -> a8 -> Integer) (_ :: [Integer] -> a8)
+ where (<*>) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (*>) (_ :: [Integer] -> a7) (_ :: [Integer] -> Integer)
+ where (*>) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
+ (<$>) (_ :: a1 -> Integer) (_ :: [Integer] -> a1)
+ where (<$>) :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (=<<) (_ :: a9 -> [Integer] -> Integer) (_ :: [Integer] -> a9)
+ where (=<<) :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ (<*) (_ :: [Integer] -> Integer) (_ :: [Integer] -> b5)
+ where (<*) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (<$) (_ :: Integer) (_ :: [Integer] -> b4)
+ where (<$) :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ id (_ :: t0 -> [Integer] -> Integer) (_ :: t0)
+ where id :: forall a. a -> a
+ head (_ :: [t0 -> [Integer] -> Integer]) (_ :: t0)
+ where head :: forall a. [a] -> a
+ last (_ :: [t0 -> [Integer] -> Integer]) (_ :: t0)
+ where last :: forall a. [a] -> a
+ fst (_ :: (t0 -> [Integer] -> Integer, b2)) (_ :: t0)
+ where fst :: forall a b. (a, b) -> a
+ snd (_ :: (a3, t0 -> [Integer] -> Integer)) (_ :: t0)
+ where snd :: forall a b. (a, b) -> b
+ id (_ :: [Integer] -> Integer)
+ where id :: forall a. a -> a
+ head (_ :: [[Integer] -> Integer])
+ where head :: forall a. [a] -> a
+ last (_ :: [[Integer] -> Integer])
+ where last :: forall a. [a] -> a
+ asTypeOf (_ :: [Integer] -> Integer) (_ :: [Integer] -> Integer)
+ where asTypeOf :: forall a. a -> a -> a
+ (!!) (_ :: [[Integer] -> Integer]) (_ :: Int)
+ where (!!) :: forall a. [a] -> Int -> a
+ fst (_ :: ([Integer] -> Integer, b0))
+ where fst :: forall a b. (a, b) -> a
+ snd (_ :: (a0, [Integer] -> Integer))
+ where snd :: forall a b. (a, b) -> b
+ seq (_ :: a13) (_ :: [Integer] -> Integer)
+ where seq :: forall a b. a -> b -> b
+ const (_ :: [Integer] -> Integer) (_ :: b6)
+ where const :: forall a b. a -> b -> a
+ ($) (_ :: a5 -> [Integer] -> Integer) (_ :: a5)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ fail (_ :: String) (_ :: t0)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ return (_ :: [Integer] -> Integer) (_ :: t0)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure (_ :: [Integer] -> Integer) (_ :: t0)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ uncurry (_ :: a4 -> b3 -> [Integer] -> Integer) (_ :: (a4, b3))
+ where uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ ($!) (_ :: a6 -> [Integer] -> Integer) (_ :: a6)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+
+abstract_refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Integer -> [Integer] -> Integer
+ • In the expression: _
+ In the expression: _ 0
+ In an equation for ‘g’: g = _ 0
+ • Relevant bindings include
+ g :: [Integer] -> Integer
+ (bound at abstract_refinement_hole_fits.hs:7:1)
+ Valid hole fits include
+ const :: forall a b. a -> b -> a
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ Valid refinement hole fits include
+ foldl (_ :: Integer -> Integer -> Integer)
+ where foldl :: forall (t :: * -> *).
+ Foldable t =>
+ forall b a. (b -> a -> b) -> b -> t a -> b
+ foldr (_ :: Integer -> Integer -> Integer)
+ where foldr :: forall (t :: * -> *).
+ Foldable t =>
+ forall a b. (a -> b -> b) -> b -> t a -> b
+ curry (_ :: (Integer, [Integer]) -> Integer)
+ where curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ flip (_ :: [Integer] -> Integer -> Integer)
+ where flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ const (_ :: [Integer] -> Integer)
+ where const :: forall a b. a -> b -> a
+ ($) (_ :: Integer -> [Integer] -> Integer)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ fail (_ :: String)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ return (_ :: [Integer] -> Integer)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure (_ :: [Integer] -> Integer)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ ($!) (_ :: Integer -> [Integer] -> Integer)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+ curry (_ :: (a2, Integer) -> [Integer] -> Integer) (_ :: a2)
+ where curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ (.) (_ :: b1 -> [Integer] -> Integer) (_ :: Integer -> b1)
+ where (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ flip (_ :: Integer -> b7 -> [Integer] -> Integer) (_ :: b7)
+ where flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ (>>=) (_ :: Integer -> a11)
+ (_ :: a11 -> Integer -> [Integer] -> Integer)
+ where (>>=) :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> (a -> m b) -> m b
+ (>>) (_ :: Integer -> a10) (_ :: Integer -> [Integer] -> Integer)
+ where (>>) :: forall (m :: * -> *).
+ Monad m =>
+ forall a b. m a -> m b -> m b
+ fmap (_ :: a12 -> [Integer] -> Integer) (_ :: Integer -> a12)
+ where fmap :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (<*>) (_ :: Integer -> a8 -> [Integer] -> Integer)
+ (_ :: Integer -> a8)
+ where (<*>) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (*>) (_ :: Integer -> a7) (_ :: Integer -> [Integer] -> Integer)
+ where (*>) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f b
+ (<$>) (_ :: a1 -> [Integer] -> Integer) (_ :: Integer -> a1)
+ where (<$>) :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (=<<) (_ :: a9 -> Integer -> [Integer] -> Integer)
+ (_ :: Integer -> a9)
+ where (=<<) :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ (<*) (_ :: Integer -> [Integer] -> Integer) (_ :: Integer -> b5)
+ where (<*) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f a -> f b -> f a
+ (<$) (_ :: [Integer] -> Integer) (_ :: Integer -> b4)
+ where (<$) :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. a -> f b -> f a
+ id (_ :: t0 -> Integer -> [Integer] -> Integer) (_ :: t0)
+ where id :: forall a. a -> a
+ head (_ :: [t0 -> Integer -> [Integer] -> Integer]) (_ :: t0)
+ where head :: forall a. [a] -> a
+ last (_ :: [t0 -> Integer -> [Integer] -> Integer]) (_ :: t0)
+ where last :: forall a. [a] -> a
+ fst (_ :: (t0 -> Integer -> [Integer] -> Integer, b2)) (_ :: t0)
+ where fst :: forall a b. (a, b) -> a
+ snd (_ :: (a3, t0 -> Integer -> [Integer] -> Integer)) (_ :: t0)
+ where snd :: forall a b. (a, b) -> b
+ id (_ :: Integer -> [Integer] -> Integer)
+ where id :: forall a. a -> a
+ head (_ :: [Integer -> [Integer] -> Integer])
+ where head :: forall a. [a] -> a
+ last (_ :: [Integer -> [Integer] -> Integer])
+ where last :: forall a. [a] -> a
+ asTypeOf (_ :: Integer -> [Integer] -> Integer)
+ (_ :: Integer -> [Integer] -> Integer)
+ where asTypeOf :: forall a. a -> a -> a
+ (!!) (_ :: [Integer -> [Integer] -> Integer]) (_ :: Int)
+ where (!!) :: forall a. [a] -> Int -> a
+ fst (_ :: (Integer -> [Integer] -> Integer, b0))
+ where fst :: forall a b. (a, b) -> a
+ snd (_ :: (a0, Integer -> [Integer] -> Integer))
+ where snd :: forall a b. (a, b) -> b
+ seq (_ :: a13) (_ :: Integer -> [Integer] -> Integer)
+ where seq :: forall a b. a -> b -> b
+ const (_ :: Integer -> [Integer] -> Integer) (_ :: b6)
+ where const :: forall a b. a -> b -> a
+ ($) (_ :: a5 -> Integer -> [Integer] -> Integer) (_ :: a5)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ fail (_ :: String) (_ :: t0)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ return (_ :: Integer -> [Integer] -> Integer) (_ :: t0)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure (_ :: Integer -> [Integer] -> Integer) (_ :: t0)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ uncurry (_ :: a4 -> b3 -> Integer -> [Integer] -> Integer)
+ (_ :: (a4, b3))
+ where uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
+ ($!) (_ :: a6 -> Integer -> [Integer] -> Integer) (_ :: a6)
+ where ($!) :: forall a b. (a -> b) -> a -> b
diff --git a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr b/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr
deleted file mode 100644
index 21398bb3fb..0000000000
--- a/testsuite/tests/typecheck/should_compile/abstract_refinement_substitutions.stderr
+++ /dev/null
@@ -1,410 +0,0 @@
-
-abstract_refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: [Integer] -> Integer
- • In the expression: _
- In an equation for ‘f’: f = _
- • Relevant bindings include
- f :: [Integer] -> Integer
- (bound at abstract_refinement_substitutions.hs:4:1)
- Valid substitutions include
- f :: [Integer] -> Integer
- (defined at abstract_refinement_substitutions.hs:4:1)
- g :: [Integer] -> Integer
- (defined at abstract_refinement_substitutions.hs:7:1)
- product :: forall (t :: * -> *).
- Foldable t =>
- forall a. Num a => t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- sum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Num a => t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- maximum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Ord a => t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- minimum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Ord a => t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- head :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- last :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- Valid refinement substitutions include
- (<$) _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. a -> f b -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<*) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- foldr _ _ :: forall (t :: * -> *).
- Foldable t =>
- forall a b. (a -> b -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- foldl1 _ :: forall (t :: * -> *).
- Foldable t =>
- forall a. (a -> a -> a) -> t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- foldr1 _ :: forall (t :: * -> *).
- Foldable t =>
- forall a. (a -> a -> a) -> t a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- foldl _ _ :: forall (t :: * -> *).
- Foldable t =>
- forall b a. (b -> a -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- last _ _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- head _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- head _ _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- last _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- (!!) _ _ :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- undefined _ :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- error _ _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- id _ :: forall a. a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- const _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- asTypeOf _ _ :: forall a. a -> a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- const _ _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (=<<) _ _ :: forall (m :: * -> *) a b.
- Monad m =>
- (a -> m b) -> m a -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- return _ _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- pure _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a. a -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fmap _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<$>) _ _ :: forall (f :: * -> *) a b.
- Functor f =>
- (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Functor’))
- (>>) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> m b -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (>>=) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> (a -> m b) -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fail _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a. String -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- ($) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- id _ _ :: forall a. a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- snd _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- snd _ _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- fst _ _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- seq _ _ :: forall a b. a -> b -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Prim’))
- undefined _ _ :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
-
-abstract_refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Integer -> [Integer] -> Integer
- • In the expression: _
- In the expression: _ 0
- In an equation for ‘g’: g = _ 0
- • Relevant bindings include
- g :: [Integer] -> Integer
- (bound at abstract_refinement_substitutions.hs:7:1)
- Valid substitutions include
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- return :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- Valid refinement substitutions include
- (<$) _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. a -> f b -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<*) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- foldr _ :: forall (t :: * -> *).
- Foldable t =>
- forall a b. (a -> b -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- foldl _ :: forall (t :: * -> *).
- Foldable t =>
- forall b a. (b -> a -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Foldable’))
- last _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- head _ _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- head _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- last _ _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- (!!) _ _ :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.List’))
- undefined _ _ :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- id _ _ :: forall a. a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- flip _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- const _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- asTypeOf _ _ :: forall a. a -> a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- const _ _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (=<<) _ _ :: forall (m :: * -> *) a b.
- Monad m =>
- (a -> m b) -> m a -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- curry _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- return _ _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- pure _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a. a -> f a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fmap _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (<$>) _ _ :: forall (f :: * -> *) a b.
- Functor f =>
- (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Functor’))
- (>>) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> m b -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- (>>=) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> (a -> m b) -> m b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fail _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a. String -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- error _ _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
- ($) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- id _ :: forall a. a -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Base’))
- snd _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- snd _ _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- fst _ _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘Data.Tuple’))
- seq _ _ :: forall a b. a -> b -> b
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Prim’))
- undefined _ :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at abstract_refinement_substitutions.hs:1:8-38
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 7ed58f5918..d130a69950 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -383,16 +383,21 @@ test('T7050', normal, compile, ['-O'])
test('T7312', normal, compile, [''])
test('T7384', normal, compile, [''])
test('T7451', normal, compile, [''])
-test('holes', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
-test('holes2', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
-test('holes3', normal, compile_fail, ['-fno-max-valid-substitutions'])
-test('hole_constraints', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
-test('hole_constraints_nested', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
-test('valid_substitutions', [extra_files(['ValidSubs.hs'])],
- multimod_compile, ['valid_substitutions','-fdefer-type-errors -fno-max-valid-substitutions'])
-test('valid_substitutions_interactions', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
-test('refinement_substitutions', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions -fno-max-refinement-substitutions -frefinement-level-substitutions=2'])
-test('abstract_refinement_substitutions', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions -fno-max-refinement-substitutions -frefinement-level-substitutions=2 -fabstract-refinement-substitutions'])
+test('holes', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('holes2', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('holes3', normal, compile_fail, ['-fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('hole_constraints', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('hole_constraints_nested', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -funclutter-valid-hole-fits'])
+test('valid_hole_fits', [extra_files(['ValidHoleFits.hs'])],
+ multimod_compile, ['valid_hole_fits','-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('local_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('subsumption_sort_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fsort-by-subsumption-hole-fits'])
+test('valid_hole_fits_interactions', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
+test('refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2'])
+test('abstract_refinement_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -fabstract-refinement-hole-fits -funclutter-valid-hole-fits'])
+test('free_monad_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits'])
+test('constraint_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits -fno-max-refinement-hole-fits -frefinement-level-hole-fits=2 -funclutter-valid-hole-fits'])
+test('type_in_type_hole_fits', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
test('T7408', normal, compile, [''])
test('UnboxStrictPrimitiveFields', normal, compile, [''])
test('T7541', normal, compile, [''])
@@ -539,7 +544,7 @@ test('T12911', normal, compile, [''])
test('T12925', normal, compile, [''])
test('T12919', normal, compile, [''])
test('T12936', normal, compile, [''])
-test('T13050', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
+test('T13050', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
test('T13083', normal, compile, [''])
test('T11723', normal, compile, [''])
test('T12987', normal, compile, [''])
@@ -591,13 +596,13 @@ test('T14434', [], run_command, ['$MAKE -s --no-print-directory T14434'])
test('MissingExportList01', normal, compile, [''])
test('MissingExportList02', normal, compile, [''])
test('T14488', normal, compile, [''])
-test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
+test('T14590', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
# We omit the hpc/profasm ways because this test checks the
# desugarer's output and these ways add some
# annotations/ticks that prevent it from giving the exact
# output we expect (T13032.stderr).
test('T13032', omit_ways(['hpc', 'profasm']), compile, [''])
-test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-substitutions'])
+test('T14273', normal, compile, ['-fdefer-type-errors -fno-max-valid-hole-fits'])
test('T14732', normal, compile, [''])
test('T14774', [], run_command, ['$MAKE -s --no-print-directory T14774'])
test('T14763', normal, compile, [''])
diff --git a/testsuite/tests/typecheck/should_compile/constraint_hole_fits.hs b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.hs
new file mode 100644
index 0000000000..0cc46f4075
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.hs
@@ -0,0 +1,4 @@
+module ConstraintSubstitutions where
+
+g :: Ord a => [a] -> a
+g = _
diff --git a/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr
new file mode 100644
index 0000000000..bd23319b80
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr
@@ -0,0 +1,65 @@
+
+constraint_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: [a] -> a
+ Where: ‘a’ is a rigid type variable bound by
+ the type signature for:
+ g :: forall a. Ord a => [a] -> a
+ at constraint_hole_fits.hs:3:1-22
+ • In the expression: _
+ In an equation for ‘g’: g = _
+ • Relevant bindings include
+ g :: [a] -> a (bound at constraint_hole_fits.hs:4:1)
+ Constraints include Ord a (from constraint_hole_fits.hs:3:1-22)
+ Valid hole fits include
+ g :: [a] -> a
+ head :: forall a. [a] -> a
+ last :: forall a. [a] -> a
+ maximum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ minimum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ Valid refinement hole fits include
+ foldl1 (_ :: a -> a -> a)
+ where foldl1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ foldr1 (_ :: a -> a -> a)
+ where foldr1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ foldl (_ :: a -> a -> a) (_ :: a)
+ where foldl :: forall (t :: * -> *).
+ Foldable t =>
+ forall b a. (b -> a -> b) -> b -> t a -> b
+ foldr (_ :: a -> a -> a) (_ :: a)
+ where foldr :: forall (t :: * -> *).
+ Foldable t =>
+ forall a b. (a -> b -> b) -> b -> t a -> b
+ const (_ :: a)
+ where const :: forall a b. a -> b -> a
+ ($) (_ :: [a] -> a)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ fail (_ :: String)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ return (_ :: a)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ pure (_ :: a)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ ($!) (_ :: [a] -> a)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+ id (_ :: [a] -> a)
+ where id :: forall a. a -> a
+ head (_ :: [[a] -> a])
+ where head :: forall a. [a] -> a
+ last (_ :: [[a] -> a])
+ where last :: forall a. [a] -> a
+ asTypeOf (_ :: [a] -> a) (_ :: [a] -> a)
+ where asTypeOf :: forall a. a -> a -> a
+ (!!) (_ :: [[a] -> a]) (_ :: Int)
+ where (!!) :: forall a. [a] -> Int -> a
diff --git a/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.hs b/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.hs
new file mode 100644
index 0000000000..0fa5b77128
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.hs
@@ -0,0 +1,25 @@
+{-# OPTIONS_GHC -frefinement-level-hole-fits=2 #-}
+{-# LANGUAGE MonoLocalBinds #-}
+module TG where
+import Prelude ( Monad, Applicative, Functor
+ , fmap, (<*>), pure, (>>=)
+ , (=<<), ($), (<$>) )
+
+data Free f a = Pure a | Free (f (Free f a))
+
+instance Functor f => Functor (Free f) where
+ fmap f = go where
+ go (Pure a) = Pure (f a)
+ -- Should suggest (fmap)
+ go (Free fa) = Free (_a go fa)
+
+instance Functor f => Applicative (Free f) where
+ pure = Pure
+ Pure a <*> Pure b = Pure (a b)
+ Pure a <*> Free mb = Free (fmap a <$> mb)
+ Free ma <*> b = Free ((<*> b) <$> ma)
+
+instance Applicative f => Monad (Free f) where
+ Pure a >>= f = f a
+ -- Should suggest ((=<< (_ :: a -> Free f b))
+ Free f >>= g = Free (fmap _a f)
diff --git a/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr
new file mode 100644
index 0000000000..f7acf41928
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/free_monad_hole_fits.stderr
@@ -0,0 +1,81 @@
+
+free_monad_hole_fits.hs:14:28: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole:
+ _a :: (Free f a -> Free f b) -> f (Free f a) -> f (Free f b)
+ Where: ‘a’, ‘b’ are rigid type variables bound by
+ the type signature for:
+ fmap :: forall a b. (a -> b) -> Free f a -> Free f b
+ at free_monad_hole_fits.hs:11:5-8
+ ‘f’ is a rigid type variable bound by
+ the instance declaration
+ at free_monad_hole_fits.hs:10:10-38
+ Or perhaps ‘_a’ is mis-spelled, or not in scope
+ • In the expression: _a
+ In the first argument of ‘Free’, namely ‘(_a go fa)’
+ In the expression: Free (_a go fa)
+ • Relevant bindings include
+ fa :: f (Free f a) (bound at free_monad_hole_fits.hs:14:16)
+ go :: Free f a -> Free f b (bound at free_monad_hole_fits.hs:12:7)
+ f :: a -> b (bound at free_monad_hole_fits.hs:11:10)
+ fmap :: (a -> b) -> Free f a -> Free f b
+ (bound at free_monad_hole_fits.hs:11:5)
+ Constraints include
+ Functor f (from free_monad_hole_fits.hs:10:10-38)
+ Valid hole fits include
+ fmap :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (<$>) :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ Valid refinement hole fits include
+ ($) (_ :: (Free f a -> Free f b) -> f (Free f a) -> f (Free f b))
+ where ($) :: forall a b. (a -> b) -> a -> b
+ pure (_ :: f (Free f a) -> f (Free f b))
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+
+free_monad_hole_fits.hs:25:31: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _a :: Free f a -> Free f b
+ Where: ‘a’, ‘b’ are rigid type variables bound by
+ the type signature for:
+ (>>=) :: forall a b. Free f a -> (a -> Free f b) -> Free f b
+ at free_monad_hole_fits.hs:23:12-14
+ ‘f’ is a rigid type variable bound by
+ the instance declaration
+ at free_monad_hole_fits.hs:22:10-40
+ Or perhaps ‘_a’ is mis-spelled, or not in scope
+ • In the first argument of ‘fmap’, namely ‘_a’
+ In the first argument of ‘Free’, namely ‘(fmap _a f)’
+ In the expression: Free (fmap _a f)
+ • Relevant bindings include
+ g :: a -> Free f b (bound at free_monad_hole_fits.hs:25:16)
+ f :: f (Free f a) (bound at free_monad_hole_fits.hs:25:10)
+ (>>=) :: Free f a -> (a -> Free f b) -> Free f b
+ (bound at free_monad_hole_fits.hs:23:12)
+ Constraints include
+ Applicative f (from free_monad_hole_fits.hs:22:10-40)
+ Valid refinement hole fits include
+ fmap (_ :: a -> b)
+ where fmap :: forall (f :: * -> *).
+ Functor f =>
+ forall a b. (a -> b) -> f a -> f b
+ (<*>) (_ :: Free f (a -> b))
+ where (<*>) :: forall (f :: * -> *).
+ Applicative f =>
+ forall a b. f (a -> b) -> f a -> f b
+ (<$>) (_ :: a -> b)
+ where (<$>) :: forall (f :: * -> *) a b.
+ Functor f =>
+ (a -> b) -> f a -> f b
+ (=<<) (_ :: a -> Free f b)
+ where (=<<) :: forall (m :: * -> *) a b.
+ Monad m =>
+ (a -> m b) -> m a -> m b
+ ($) (_ :: Free f a -> Free f b)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ pure (_ :: Free f b)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
diff --git a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
index 53f32cf8c9..82cc6262bd 100644
--- a/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
+++ b/testsuite/tests/typecheck/should_compile/hole_constraints.stderr
@@ -10,11 +10,7 @@ hole_constraints.hs:8:6: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
f1 :: a (bound at hole_constraints.hs:8:1)
Constraints include Eq a (from hole_constraints.hs:7:1-15)
- Valid substitutions include
- f1 :: forall a. Eq a => a (defined at hole_constraints.hs:8:1)
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include f1 :: a
hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: a
@@ -29,13 +25,9 @@ hole_constraints.hs:12:6: warning: [-Wtyped-holes (in -Wdefault)]
Constraints include
Show a (from hole_constraints.hs:11:1-25)
Eq a (from hole_constraints.hs:11:1-25)
- Valid substitutions include
- 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. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include
+ f2 :: a
+ f1 :: forall a. Eq a => a
hole_constraints.hs:16:35: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: [a]
@@ -48,15 +40,10 @@ hole_constraints.hs:16:35: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
f3 :: [a] (bound at hole_constraints.hs:16:30)
Constraints include Eq a (from hole_constraints.hs:16:10-22)
- Valid substitutions include
- 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)
+ Valid hole fits include
+ f3 :: [a]
+ f1 :: forall a. Eq a => a
mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Err’))
hole_constraints.hs:20:19: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: a
@@ -70,10 +57,7 @@ hole_constraints.hs:20:19: warning: [-Wtyped-holes (in -Wdefault)]
x :: a (bound at hole_constraints.hs:20:15)
castWith :: (a :~: b) -> a -> b (bound at hole_constraints.hs:20:1)
Constraints include b ~ a (from hole_constraints.hs:20:10-13)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include x :: a
hole_constraints.hs:27:32: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: String
@@ -85,14 +69,8 @@ hole_constraints.hs:27:32: warning: [-Wtyped-holes (in -Wdefault)]
a :: AnyShow (bound at hole_constraints.hs:27:5)
foo :: AnyShow -> String (bound at hole_constraints.hs:27:1)
Constraints include Show a (from hole_constraints.hs:27:19-27)
- Valid substitutions include
+ Valid hole fits include
+ f3 :: forall a. C a => a
+ f1 :: forall a. Eq a => a
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
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints.hs:3:8-22
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr b/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
index 0a721c301f..46c0c22a34 100644
--- a/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
+++ b/testsuite/tests/typecheck/should_compile/hole_constraints_nested.stderr
@@ -13,13 +13,6 @@ hole_constraints_nested.hs:12:16: warning: [-Wtyped-holes (in -Wdefault)]
Eq a (from hole_constraints_nested.hs:12:7-11)
Ord a (from hole_constraints_nested.hs:12:7-11)
b ~ a (from hole_constraints_nested.hs:11:5-8)
- Valid substitutions include
+ Valid hole fits include
maxBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at hole_constraints_nested.hs:3:8-28
- (and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at hole_constraints_nested.hs:3:8-28
- (and originally defined in ‘GHC.Enum’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at hole_constraints_nested.hs:3:8-28
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr
index def250d49d..1df5b49dbb 100644
--- a/testsuite/tests/typecheck/should_compile/holes.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes.stderr
@@ -7,11 +7,7 @@ holes.hs:3:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: t (bound at holes.hs:3:1)
- Valid substitutions include
- f :: forall t. t (defined at holes.hs:3:1)
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include f :: forall t. t
holes.hs:6:7: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: Char
@@ -20,17 +16,10 @@ holes.hs:6:7: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
x :: Int (bound at holes.hs:6:3)
g :: Int -> Char (bound at holes.hs:6:1)
- Valid substitutions include
- f :: forall t. t (defined at holes.hs:3:1)
+ Valid hole fits include
+ f :: forall t. t
maxBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Enum’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
holes.hs:8:5: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: [Char]
@@ -38,15 +27,10 @@ holes.hs:8:5: warning: [-Wtyped-holes (in -Wdefault)]
In the expression: _ ++ "a"
In an equation for ‘h’: h = _ ++ "a"
• Relevant bindings include h :: [Char] (bound at holes.hs:8:1)
- Valid substitutions include
- h :: [Char] (defined at holes.hs:8:1)
- f :: forall t. t (defined at holes.hs:3:1)
+ Valid hole fits include
+ h :: [Char]
+ f :: forall t. t
mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
• Found hole: _ :: b0
@@ -57,449 +41,155 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)]
• Relevant bindings include
y :: [a] (bound at holes.hs:11:3)
z :: [a] -> [a] (bound at holes.hs:11:1)
- Valid substitutions include
- 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’))
+ Valid hole fits include
+ y :: [a]
+ z :: [a] -> [a]
+ g :: Int -> Char
+ h :: [Char]
+ f :: forall t. t
+ otherwise :: Bool
+ False :: Bool
+ True :: Bool
+ lines :: String -> [String]
+ unlines :: [String] -> String
+ unwords :: [String] -> String
+ words :: String -> [String]
+ userError :: String -> IOError
+ lex :: ReadS String
+ showChar :: Char -> ShowS
+ showParen :: Bool -> ShowS -> ShowS
+ showString :: String -> ShowS
+ appendFile :: FilePath -> String -> IO ()
+ getChar :: IO Char
+ getContents :: IO String
+ getLine :: IO String
+ interact :: (String -> String) -> IO ()
+ putChar :: Char -> IO ()
+ putStr :: String -> IO ()
+ putStrLn :: String -> IO ()
+ readFile :: FilePath -> IO String
+ writeFile :: FilePath -> String -> IO ()
+ (&&) :: Bool -> Bool -> Bool
+ not :: Bool -> Bool
+ (||) :: Bool -> Bool -> Bool
EQ :: Ordering
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Types’))
LT :: 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’))
- 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.Real’))
- divMod :: forall a. Integral a => a -> a -> (a, a)
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Real’))
- significand :: forall a. RealFloat a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘GHC.Float’))
- isDenormalized :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘GHC.Float’))
- isInfinite :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘GHC.Float’))
- isNegativeZero :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Float’))
- floatRadix :: forall a. RealFloat a => a -> Integer
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Float’))
- floatDigits :: forall a. RealFloat a => a -> Int
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.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.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.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.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’))
+ (++) :: forall a. [a] -> [a] -> [a]
+ filter :: forall a. (a -> Bool) -> [a] -> [a]
+ fromInteger :: forall a. Num a => Integer -> a
+ (-) :: forall a. Num a => a -> a -> a
+ fromRational :: forall a. Fractional a => Rational -> a
+ negate :: forall a. Num a => a -> a
+ fromIntegral :: forall a b. (Integral a, Num b) => a -> b
+ toInteger :: forall a. Integral a => a -> Integer
+ toRational :: forall a. Real a => a -> Rational
+ Nothing :: forall a. Maybe a
+ Just :: forall a. a -> Maybe a
+ asTypeOf :: forall a. a -> a -> a
+ id :: forall a. a -> a
+ until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
+ ioError :: forall a. IOError -> IO a
+ (!!) :: forall a. [a] -> Int -> a
+ break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ cycle :: forall a. [a] -> [a]
+ drop :: forall a. Int -> [a] -> [a]
+ dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ head :: forall a. [a] -> a
+ init :: forall a. [a] -> [a]
+ iterate :: forall a. (a -> a) -> a -> [a]
+ last :: forall a. [a] -> a
+ repeat :: forall a. a -> [a]
+ replicate :: forall a. Int -> a -> [a]
+ reverse :: forall a. [a] -> [a]
+ scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ splitAt :: forall a. Int -> [a] -> ([a], [a])
+ tail :: forall a. [a] -> [a]
+ take :: forall a. Int -> [a] -> [a]
+ takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ subtract :: forall a. Num a => a -> a -> a
+ readParen :: forall a. Bool -> ReadS a -> ReadS a
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ even :: forall a. Integral a => a -> Bool
+ gcd :: forall a. Integral a => a -> a -> a
+ lcm :: forall a. Integral a => a -> a -> a
+ odd :: forall a. Integral a => a -> Bool
+ (**) :: forall a. Floating a => a -> a -> a
acos :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
acosh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
asin :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
asinh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
atan :: forall a. Floating 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’))
cos :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
cosh :: forall a. Floating a => a -> 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’))
log :: forall a. Floating 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
+ pi :: forall a. Floating a => a
sin :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
sinh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
sqrt :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
tan :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
tanh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Float’))
- recip :: forall a. Fractional a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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’))
- logBase :: forall a. Floating a => 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
+ decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
+ encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
+ exponent :: forall a. RealFloat a => a -> Int
+ floatDigits :: forall a. RealFloat a => a -> Int
+ floatRadix :: forall a. RealFloat a => a -> Integer
+ floatRange :: forall a. RealFloat a => a -> (Int, Int)
+ isDenormalized :: forall a. RealFloat a => a -> Bool
+ isIEEE :: forall a. RealFloat a => a -> Bool
+ isInfinite :: forall a. RealFloat a => a -> Bool
+ isNaN :: forall a. RealFloat a => a -> Bool
+ isNegativeZero :: forall a. RealFloat a => a -> Bool
+ scaleFloat :: forall a. RealFloat a => Int -> a -> a
+ significand :: forall a. RealFloat a => a -> a
+ (*) :: forall a. Num a => a -> a -> a
+ (+) :: forall a. Num a => a -> a -> a
+ abs :: forall a. Num a => a -> a
+ signum :: forall a. Num a => a -> a
(/) :: forall a. Fractional a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- not :: Bool -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
- (&&) :: Bool -> Bool -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
- (||) :: Bool -> Bool -> Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Classes’))
- readFile :: FilePath -> IO String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putStr :: String -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putStrLn :: String -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- putChar :: Char -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- interact :: (String -> String) -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getContents :: IO String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getLine :: IO String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- getChar :: IO Char
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- appendFile :: FilePath -> String -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- writeFile :: FilePath -> String -> IO ()
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘System.IO’))
- showString :: String -> ShowS
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Show’))
- showParen :: Bool -> ShowS -> ShowS
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Show’))
- showChar :: Char -> ShowS
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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’))
- lcm :: forall a. Integral a => 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
div :: 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)
mod :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
+ quotRem :: 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’))
- odd :: forall a. Integral a => a -> Bool
- (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
- (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
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Real’))
- readParen :: forall a. Bool -> ReadS a -> ReadS a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Read’))
- lex :: ReadS String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.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.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.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.List’))
- unzip :: 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])
- (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]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.List’))
- scanr1 :: forall a. (a -> 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]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.List’))
- iterate :: forall a. (a -> a) -> a -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.List’))
- take :: forall a. Int -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.List’))
- init :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- reverse :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- tail :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘GHC.List’))
- span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- (!!) :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- userError :: String -> IOError
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘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 ‘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 ‘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 ‘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.12.0.0:Data.OldList’))
- unwords :: [String] -> String
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘base-4.12.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.12.0.0:Data.OldList’))
- words :: String -> [String]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘base-4.12.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. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall a. [Char] -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
- maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘Data.Either’))
- Just :: forall a. a -> Maybe a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Base’))
- toRational :: forall a. Real a => a -> Rational
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Real’))
- negate :: forall a. Num a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Num’))
- signum :: forall a. Num a => a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Real’))
+ seq :: forall a b. a -> b -> b
+ zip :: forall a b. [a] -> [b] -> [(a, b)]
+ fst :: forall a b. (a, b) -> a
+ snd :: forall a b. (a, b) -> b
+ map :: forall a b. (a -> b) -> [a] -> [b]
realToFrac :: forall a b. (Real a, Fractional b) => a -> b
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.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.Real’))
+ maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
+ const :: forall a b. a -> b -> a
+ scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
+ scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
+ unzip :: forall a b. [(a, b)] -> ([a], [b])
+ (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
+ ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
+ floor :: forall a. RealFrac a => forall b. Integral b => a -> b
+ properFraction :: forall a.
+ RealFrac a =>
+ forall b. Integral b => a -> (b, a)
+ round :: forall a. RealFrac a => forall b. Integral b => a -> b
+ truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
+ Right :: forall a b. b -> Either a b
+ Left :: forall a b. a -> Either a b
($) :: forall a b. (a -> b) -> a -> b
- (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
+ curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
($!) :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Base’))
- map :: forall a b. (a -> b) -> [a] -> [b]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- otherwise :: Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Base’))
- False :: Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Types’))
- True :: Bool
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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 ‘Data.Tuple’))
- fst :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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’))
- filter :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.List’))
- (++) :: forall a. [a] -> [a] -> [a]
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (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’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes.hs:1:8-12
- (and originally defined in ‘GHC.Err’))
+ (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
+ zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
+ zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
+ zipWith3 :: forall a b c d.
+ (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
diff --git a/testsuite/tests/typecheck/should_compile/holes2.stderr b/testsuite/tests/typecheck/should_compile/holes2.stderr
index 7e14eeac69..6421709f85 100644
--- a/testsuite/tests/typecheck/should_compile/holes2.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes2.stderr
@@ -21,26 +21,12 @@ holes2.hs:3:10: warning: [-Wtyped-holes (in -Wdefault)]
In the expression: show _
In an equation for ‘f’: f = show _
• Relevant bindings include f :: String (bound at holes2.hs:3:1)
- Valid substitutions include
- f :: String (defined at holes2.hs:3:1)
+ Valid hole fits include
+ f :: String
+ otherwise :: Bool
+ False :: Bool
+ 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’))
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’))
- False :: Bool
- (imported from ‘Prelude’ at holes2.hs:1:8-13
- (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 08a20da52c..be14099d30 100644
--- a/testsuite/tests/typecheck/should_compile/holes3.stderr
+++ b/testsuite/tests/typecheck/should_compile/holes3.stderr
@@ -7,11 +7,7 @@ holes3.hs:3:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: t (bound at holes3.hs:3:1)
- Valid substitutions include
- f :: forall t. t (defined at holes3.hs:3:1)
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
+ Valid hole fits include f :: forall t. t
holes3.hs:6:7: error:
• Found hole: _gr :: Char
@@ -21,17 +17,10 @@ holes3.hs:6:7: error:
• Relevant bindings include
x :: Int (bound at holes3.hs:6:3)
g :: Int -> Char (bound at holes3.hs:6:1)
- Valid substitutions include
- f :: forall t. t (defined at holes3.hs:3:1)
+ Valid hole fits include
+ f :: forall t. t
maxBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Enum’))
minBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Enum’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
holes3.hs:8:5: error:
• Found hole: _aa :: [Char]
@@ -40,15 +29,10 @@ holes3.hs:8:5: error:
In the expression: _aa ++ "a"
In an equation for ‘h’: h = _aa ++ "a"
• Relevant bindings include h :: [Char] (bound at holes3.hs:8:1)
- Valid substitutions include
- h :: [Char] (defined at holes3.hs:8:1)
- f :: forall t. t (defined at holes3.hs:3:1)
+ Valid hole fits include
+ h :: [Char]
+ f :: forall t. t
mempty :: forall a. Monoid a => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
holes3.hs:11:15: error:
• Found hole: _x :: b0
@@ -60,449 +44,155 @@ holes3.hs:11:15: error:
• Relevant bindings include
y :: [a] (bound at holes3.hs:11:3)
z :: [a] -> [a] (bound at holes3.hs:11:1)
- Valid substitutions include
- 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’))
+ Valid hole fits include
+ y :: [a]
+ z :: [a] -> [a]
+ g :: Int -> Char
+ h :: [Char]
+ f :: forall t. t
+ otherwise :: Bool
+ False :: Bool
+ True :: Bool
+ lines :: String -> [String]
+ unlines :: [String] -> String
+ unwords :: [String] -> String
+ words :: String -> [String]
+ userError :: String -> IOError
+ lex :: ReadS String
+ showChar :: Char -> ShowS
+ showParen :: Bool -> ShowS -> ShowS
+ showString :: String -> ShowS
+ appendFile :: FilePath -> String -> IO ()
+ getChar :: IO Char
+ getContents :: IO String
+ getLine :: IO String
+ interact :: (String -> String) -> IO ()
+ putChar :: Char -> IO ()
+ putStr :: String -> IO ()
+ putStrLn :: String -> IO ()
+ readFile :: FilePath -> IO String
+ writeFile :: FilePath -> String -> IO ()
+ (&&) :: Bool -> Bool -> Bool
+ not :: Bool -> Bool
+ (||) :: Bool -> Bool -> Bool
EQ :: Ordering
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
LT :: 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’))
- 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.Real’))
- divMod :: forall a. Integral a => a -> a -> (a, a)
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Real’))
- significand :: forall a. RealFloat a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘GHC.Float’))
- isDenormalized :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘GHC.Float’))
- isInfinite :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘GHC.Float’))
- isNegativeZero :: forall a. RealFloat a => a -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Float’))
- floatRadix :: forall a. RealFloat a => a -> Integer
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Float’))
- floatDigits :: forall a. RealFloat a => a -> Int
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.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.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.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.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’))
+ (++) :: forall a. [a] -> [a] -> [a]
+ filter :: forall a. (a -> Bool) -> [a] -> [a]
+ fromInteger :: forall a. Num a => Integer -> a
+ (-) :: forall a. Num a => a -> a -> a
+ fromRational :: forall a. Fractional a => Rational -> a
+ negate :: forall a. Num a => a -> a
+ fromIntegral :: forall a b. (Integral a, Num b) => a -> b
+ toInteger :: forall a. Integral a => a -> Integer
+ toRational :: forall a. Real a => a -> Rational
+ Nothing :: forall a. Maybe a
+ Just :: forall a. a -> Maybe a
+ asTypeOf :: forall a. a -> a -> a
+ id :: forall a. a -> a
+ until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
+ ioError :: forall a. IOError -> IO a
+ (!!) :: forall a. [a] -> Int -> a
+ break :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ cycle :: forall a. [a] -> [a]
+ drop :: forall a. Int -> [a] -> [a]
+ dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ head :: forall a. [a] -> a
+ init :: forall a. [a] -> [a]
+ iterate :: forall a. (a -> a) -> a -> [a]
+ last :: forall a. [a] -> a
+ repeat :: forall a. a -> [a]
+ replicate :: forall a. Int -> a -> [a]
+ reverse :: forall a. [a] -> [a]
+ scanl1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ scanr1 :: forall a. (a -> a -> a) -> [a] -> [a]
+ span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
+ splitAt :: forall a. Int -> [a] -> ([a], [a])
+ tail :: forall a. [a] -> [a]
+ take :: forall a. Int -> [a] -> [a]
+ takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
+ subtract :: forall a. Num a => a -> a -> a
+ readParen :: forall a. Bool -> ReadS a -> ReadS a
+ (^) :: forall a b. (Num a, Integral b) => a -> b -> a
+ even :: forall a. Integral a => a -> Bool
+ gcd :: forall a. Integral a => a -> a -> a
+ lcm :: forall a. Integral a => a -> a -> a
+ odd :: forall a. Integral a => a -> Bool
+ (**) :: forall a. Floating a => a -> a -> a
acos :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
acosh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
asin :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
asinh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
atan :: forall a. Floating 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’))
cos :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
cosh :: forall a. Floating a => a -> 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’))
log :: forall a. Floating 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
+ pi :: forall a. Floating a => a
sin :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
sinh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
sqrt :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
tan :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
tanh :: forall a. Floating a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Float’))
- recip :: forall a. Fractional a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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’))
- logBase :: forall a. Floating a => 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
+ decodeFloat :: forall a. RealFloat a => a -> (Integer, Int)
+ encodeFloat :: forall a. RealFloat a => Integer -> Int -> a
+ exponent :: forall a. RealFloat a => a -> Int
+ floatDigits :: forall a. RealFloat a => a -> Int
+ floatRadix :: forall a. RealFloat a => a -> Integer
+ floatRange :: forall a. RealFloat a => a -> (Int, Int)
+ isDenormalized :: forall a. RealFloat a => a -> Bool
+ isIEEE :: forall a. RealFloat a => a -> Bool
+ isInfinite :: forall a. RealFloat a => a -> Bool
+ isNaN :: forall a. RealFloat a => a -> Bool
+ isNegativeZero :: forall a. RealFloat a => a -> Bool
+ scaleFloat :: forall a. RealFloat a => Int -> a -> a
+ significand :: forall a. RealFloat a => a -> a
+ (*) :: forall a. Num a => a -> a -> a
+ (+) :: forall a. Num a => a -> a -> a
+ abs :: forall a. Num a => a -> a
+ signum :: forall a. Num a => a -> a
(/) :: forall a. Fractional a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- not :: Bool -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
- (&&) :: Bool -> Bool -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
- (||) :: Bool -> Bool -> Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Classes’))
- readFile :: FilePath -> IO String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putStr :: String -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putStrLn :: String -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- putChar :: Char -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- interact :: (String -> String) -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getContents :: IO String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getLine :: IO String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- getChar :: IO Char
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- appendFile :: FilePath -> String -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- writeFile :: FilePath -> String -> IO ()
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘System.IO’))
- showString :: String -> ShowS
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Show’))
- showParen :: Bool -> ShowS -> ShowS
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Show’))
- showChar :: Char -> ShowS
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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’))
- lcm :: forall a. Integral a => 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
div :: 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)
mod :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
quot :: forall a. Integral a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
+ quotRem :: 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’))
- odd :: forall a. Integral a => a -> Bool
- (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
- (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
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Real’))
- readParen :: forall a. Bool -> ReadS a -> ReadS a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Read’))
- lex :: ReadS String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.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.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.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.List’))
- unzip :: 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])
- (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]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.List’))
- scanr1 :: forall a. (a -> 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]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.List’))
- iterate :: forall a. (a -> a) -> a -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.List’))
- take :: forall a. Int -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.List’))
- init :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- reverse :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- tail :: forall a. [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘GHC.List’))
- span :: forall a. (a -> Bool) -> [a] -> ([a], [a])
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- (!!) :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- userError :: String -> IOError
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘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 ‘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 ‘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 ‘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.12.0.0:Data.OldList’))
- unwords :: [String] -> String
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘base-4.12.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.12.0.0:Data.OldList’))
- words :: String -> [String]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘base-4.12.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. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall a. [Char] -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
- maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘Data.Either’))
- Just :: forall a. a -> Maybe a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Base’))
- toRational :: forall a. Real a => a -> Rational
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Real’))
- negate :: forall a. Num a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Num’))
- signum :: forall a. Num a => a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Real’))
+ seq :: forall a b. a -> b -> b
+ zip :: forall a b. [a] -> [b] -> [(a, b)]
+ fst :: forall a b. (a, b) -> a
+ snd :: forall a b. (a, b) -> b
+ map :: forall a b. (a -> b) -> [a] -> [b]
realToFrac :: forall a b. (Real a, Fractional b) => a -> b
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Num’))
- subtract :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Num’))
- (+) :: forall a. Num a => a -> a -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.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.Real’))
+ maybe :: forall b a. b -> (a -> b) -> Maybe a -> b
+ const :: forall a b. a -> b -> a
+ scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
+ scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
+ unzip :: forall a b. [(a, b)] -> ([a], [b])
+ (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
+ ceiling :: forall a. RealFrac a => forall b. Integral b => a -> b
+ floor :: forall a. RealFrac a => forall b. Integral b => a -> b
+ properFraction :: forall a.
+ RealFrac a =>
+ forall b. Integral b => a -> (b, a)
+ round :: forall a. RealFrac a => forall b. Integral b => a -> b
+ truncate :: forall a. RealFrac a => forall b. Integral b => a -> b
+ Right :: forall a b. b -> Either a b
+ Left :: forall a b. a -> Either a b
($) :: forall a b. (a -> b) -> a -> b
- (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
+ curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ uncurry :: forall a b c. (a -> b -> c) -> (a, b) -> c
($!) :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Base’))
- map :: forall a b. (a -> b) -> [a] -> [b]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- otherwise :: Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Base’))
- False :: Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Types’))
- True :: Bool
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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 ‘Data.Tuple’))
- fst :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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’))
- filter :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- takeWhile :: forall a. (a -> Bool) -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.List’))
- (++) :: forall a. [a] -> [a] -> [a]
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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.Base’))
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (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’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at holes3.hs:1:8-13
- (and originally defined in ‘GHC.Err’))
+ (.) :: forall b c a. (b -> c) -> (a -> b) -> a -> c
+ flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ unzip3 :: forall a b c. [(a, b, c)] -> ([a], [b], [c])
+ zip3 :: forall a b c. [a] -> [b] -> [c] -> [(a, b, c)]
+ zipWith :: forall a b c. (a -> b -> c) -> [a] -> [b] -> [c]
+ zipWith3 :: forall a b c d.
+ (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d]
diff --git a/testsuite/tests/typecheck/should_compile/local_hole_fits.hs b/testsuite/tests/typecheck/should_compile/local_hole_fits.hs
new file mode 100755
index 0000000000..8e257ffe61
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/local_hole_fits.hs
@@ -0,0 +1,11 @@
+import Prelude (Show, String, error, IO(), show, Ordering(EQ))
+
+head :: [a] -> a
+head (x:xs) = _
+head _ = error "Empty list!"
+
+mshow :: Show a => a -> a
+mshow a = _
+
+main :: IO ()
+main = error "no main"
diff --git a/testsuite/tests/typecheck/should_compile/local_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/local_hole_fits.stderr
new file mode 100644
index 0000000000..5485d05bef
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/local_hole_fits.stderr
@@ -0,0 +1,28 @@
+
+local_hole_fits.hs:4:15: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: a
+ Where: ‘a’ is a rigid type variable bound by
+ the type signature for:
+ head :: forall a. [a] -> a
+ at local_hole_fits.hs:3:1-16
+ • In the expression: _
+ In an equation for ‘head’: head (x : xs) = _
+ • Relevant bindings include
+ xs :: [a] (bound at local_hole_fits.hs:4:9)
+ x :: a (bound at local_hole_fits.hs:4:7)
+ head :: [a] -> a (bound at local_hole_fits.hs:4:1)
+ Valid hole fits include x :: a (bound at local_hole_fits.hs:4:7)
+
+local_hole_fits.hs:8:11: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: a
+ Where: ‘a’ is a rigid type variable bound by
+ the type signature for:
+ mshow :: forall a. Show a => a -> a
+ at local_hole_fits.hs:7:1-25
+ • In the expression: _
+ In an equation for ‘mshow’: mshow a = _
+ • Relevant bindings include
+ a :: a (bound at local_hole_fits.hs:8:7)
+ mshow :: a -> a (bound at local_hole_fits.hs:8:1)
+ Constraints include Show a (from local_hole_fits.hs:7:1-25)
+ Valid hole fits include a :: a (bound at local_hole_fits.hs:8:7)
diff --git a/testsuite/tests/typecheck/should_compile/refinement_substitutions.hs b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs
index 345a6c8f8e..345a6c8f8e 100644
--- a/testsuite/tests/typecheck/should_compile/refinement_substitutions.hs
+++ b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.hs
diff --git a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr
new file mode 100644
index 0000000000..96e93bfd0f
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr
@@ -0,0 +1,236 @@
+
+refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: [Integer] -> Integer
+ • In the expression: _
+ In an equation for ‘f’: f = _
+ • Relevant bindings include
+ f :: [Integer] -> Integer (bound at refinement_hole_fits.hs:4:1)
+ Valid hole fits include
+ f :: [Integer] -> Integer (bound at refinement_hole_fits.hs:4:1)
+ g :: [Integer] -> Integer (bound at refinement_hole_fits.hs:7:1)
+ head :: forall a. [a] -> a
+ with head @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ last :: forall a. [a] -> a
+ with last @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ maximum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ with maximum @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ minimum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Ord a => t a -> a
+ with minimum @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ product :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Num a => t a -> a
+ with product @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ sum :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. Num a => t a -> a
+ with sum @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ Valid refinement hole fits include
+ foldl1 (_ :: Integer -> Integer -> Integer)
+ where foldl1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ with foldl1 @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ foldr1 (_ :: Integer -> Integer -> Integer)
+ where foldr1 :: forall (t :: * -> *).
+ Foldable t =>
+ forall a. (a -> a -> a) -> t a -> a
+ with foldr1 @[] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ foldl (_ :: Integer -> Integer -> Integer) (_ :: Integer)
+ where foldl :: forall (t :: * -> *).
+ Foldable t =>
+ forall b a. (b -> a -> b) -> b -> t a -> b
+ with foldl @[] @Integer @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ foldr (_ :: Integer -> Integer -> Integer) (_ :: Integer)
+ where foldr :: forall (t :: * -> *).
+ Foldable t =>
+ forall a b. (a -> b -> b) -> b -> t a -> b
+ with foldr @[] @Integer @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ const (_ :: Integer)
+ where const :: forall a b. a -> b -> a
+ with const @Integer @[Integer]
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($) (_ :: [Integer] -> Integer)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ with ($) @'GHC.Types.LiftedRep @[Integer] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fail (_ :: String)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ with fail @((->) [Integer]) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ return (_ :: Integer)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) [Integer]) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure (_ :: Integer)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ with pure @((->) [Integer]) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($!) (_ :: [Integer] -> Integer)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+ with ($!) @'GHC.Types.LiftedRep @[Integer] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ id (_ :: [Integer] -> Integer)
+ where id :: forall a. a -> a
+ with id @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ head (_ :: [[Integer] -> Integer])
+ where head :: forall a. [a] -> a
+ with head @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ last (_ :: [[Integer] -> Integer])
+ where last :: forall a. [a] -> a
+ with last @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ asTypeOf (_ :: [Integer] -> Integer) (_ :: [Integer] -> Integer)
+ where asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (!!) (_ :: [[Integer] -> Integer]) (_ :: Int)
+ where (!!) :: forall a. [a] -> Int -> a
+ with (!!) @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+
+refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Integer -> [Integer] -> Integer
+ • In the expression: _
+ In the expression: _ 0
+ In an equation for ‘g’: g = _ 0
+ • Relevant bindings include
+ g :: [Integer] -> Integer (bound at refinement_hole_fits.hs:7:1)
+ Valid hole fits include
+ const :: forall a b. a -> b -> a
+ with const @Integer @[Integer]
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) [Integer]) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @((->) [Integer]) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ Valid refinement hole fits include
+ foldl (_ :: Integer -> Integer -> Integer)
+ where foldl :: forall (t :: * -> *).
+ Foldable t =>
+ forall b a. (b -> a -> b) -> b -> t a -> b
+ with foldl @[] @Integer @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ foldr (_ :: Integer -> Integer -> Integer)
+ where foldr :: forall (t :: * -> *).
+ Foldable t =>
+ forall a b. (a -> b -> b) -> b -> t a -> b
+ with foldr @[] @Integer @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Foldable’))
+ curry (_ :: (Integer, [Integer]) -> Integer)
+ where curry :: forall a b c. ((a, b) -> c) -> a -> b -> c
+ with curry @Integer @[Integer] @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘Data.Tuple’))
+ flip (_ :: [Integer] -> Integer -> Integer)
+ where flip :: forall a b c. (a -> b -> c) -> b -> a -> c
+ with flip @[Integer] @Integer @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ const (_ :: [Integer] -> Integer)
+ where const :: forall a b. a -> b -> a
+ with const @([Integer] -> Integer) @Integer
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($) (_ :: Integer -> [Integer] -> Integer)
+ where ($) :: forall a b. (a -> b) -> a -> b
+ with ($) @'GHC.Types.LiftedRep @Integer @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ fail (_ :: String)
+ where fail :: forall (m :: * -> *).
+ Monad m =>
+ forall a. String -> m a
+ with fail @((->) Integer) @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ return (_ :: [Integer] -> Integer)
+ where return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @((->) Integer) @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ pure (_ :: [Integer] -> Integer)
+ where pure :: forall (f :: * -> *).
+ Applicative f =>
+ forall a. a -> f a
+ with pure @((->) Integer) @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ ($!) (_ :: Integer -> [Integer] -> Integer)
+ where ($!) :: forall a b. (a -> b) -> a -> b
+ with ($!) @'GHC.Types.LiftedRep @Integer @([Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ id (_ :: Integer -> [Integer] -> Integer)
+ where id :: forall a. a -> a
+ with id @(Integer -> [Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ head (_ :: [Integer -> [Integer] -> Integer])
+ where head :: forall a. [a] -> a
+ with head @(Integer -> [Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ last (_ :: [Integer -> [Integer] -> Integer])
+ where last :: forall a. [a] -> a
+ with last @(Integer -> [Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
+ asTypeOf (_ :: Integer -> [Integer] -> Integer)
+ (_ :: Integer -> [Integer] -> Integer)
+ where asTypeOf :: forall a. a -> a -> a
+ with asTypeOf @(Integer -> [Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.Base’))
+ (!!) (_ :: [Integer -> [Integer] -> Integer]) (_ :: Int)
+ where (!!) :: forall a. [a] -> Int -> a
+ with (!!) @(Integer -> [Integer] -> Integer)
+ (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30
+ (and originally defined in ‘GHC.List’))
diff --git a/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr b/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr
deleted file mode 100644
index 0b3795894e..0000000000
--- a/testsuite/tests/typecheck/should_compile/refinement_substitutions.stderr
+++ /dev/null
@@ -1,330 +0,0 @@
-
-refinement_substitutions.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: [Integer] -> Integer
- • In the expression: _
- In an equation for ‘f’: f = _
- • Relevant bindings include
- f :: [Integer] -> Integer
- (bound at refinement_substitutions.hs:4:1)
- Valid substitutions include
- f :: [Integer] -> Integer
- (defined at refinement_substitutions.hs:4:1)
- g :: [Integer] -> Integer
- (defined at refinement_substitutions.hs:7:1)
- product :: forall (t :: * -> *).
- Foldable t =>
- forall a. Num a => t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- sum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Num a => t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- maximum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Ord a => t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- minimum :: forall (t :: * -> *).
- Foldable t =>
- forall a. Ord a => t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- head :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- last :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- Valid refinement substitutions include
- (<$) _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. a -> f b -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (<*) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- foldr _ _ :: forall (t :: * -> *).
- Foldable t =>
- forall a b. (a -> b -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- foldl1 _ :: forall (t :: * -> *).
- Foldable t =>
- forall a. (a -> a -> a) -> t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- foldr1 _ :: forall (t :: * -> *).
- Foldable t =>
- forall a. (a -> a -> a) -> t a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- foldl _ _ :: forall (t :: * -> *).
- Foldable t =>
- forall b a. (b -> a -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- head _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- last _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- (!!) _ _ :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- const _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- asTypeOf _ _ :: forall a. a -> a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- const _ _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (=<<) _ _ :: forall (m :: * -> *) a b.
- Monad m =>
- (a -> m b) -> m a -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- (<*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- fmap _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (<$>) _ _ :: forall (f :: * -> *) a b.
- Functor f =>
- (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Functor’))
- (>>) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> m b -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (>>=) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> (a -> m b) -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- ($) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- id _ :: forall a. a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- snd _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- seq _ _ :: forall a b. a -> b -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Prim’))
-
-refinement_substitutions.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Integer -> [Integer] -> Integer
- • In the expression: _
- In the expression: _ 0
- In an equation for ‘g’: g = _ 0
- • Relevant bindings include
- g :: [Integer] -> Integer
- (bound at refinement_substitutions.hs:7:1)
- Valid substitutions include
- const :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- return :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- Valid refinement substitutions include
- (<$) _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. a -> f b -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (<*) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- foldr _ :: forall (t :: * -> *).
- Foldable t =>
- forall a b. (a -> b -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- foldl _ :: forall (t :: * -> *).
- Foldable t =>
- forall b a. (b -> a -> b) -> b -> t a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Foldable’))
- head _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- last _ :: forall a. [a] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- (!!) _ _ :: forall a. [a] -> Int -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.List’))
- flip _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- flip _ _ :: forall a b c. (a -> b -> c) -> b -> a -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- const _ _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- asTypeOf _ _ :: forall a. a -> a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- const _ :: forall a b. a -> b -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (=<<) _ _ :: forall (m :: * -> *) a b.
- Monad m =>
- (a -> m b) -> m a -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (.) _ _ :: forall b c a. (b -> c) -> (a -> b) -> a -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($!) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- uncurry _ _ :: forall a b c. (a -> b -> c) -> (a, b) -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- curry _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- curry _ _ :: forall a b c. ((a, b) -> c) -> a -> b -> c
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- (<*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- return _ :: forall (m :: * -> *). Monad m => forall a. a -> m a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- pure _ :: forall (f :: * -> *). Applicative f => forall a. a -> f a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- fmap _ _ :: forall (f :: * -> *).
- Functor f =>
- forall a b. (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (<$>) _ _ :: forall (f :: * -> *) a b.
- Functor f =>
- (a -> b) -> f a -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Functor’))
- (>>) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> m b -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (*>) _ _ :: forall (f :: * -> *).
- Applicative f =>
- forall a b. f a -> f b -> f b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- (>>=) _ _ :: forall (m :: * -> *).
- Monad m =>
- forall a b. m a -> (a -> m b) -> m b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- fail _ :: forall (m :: * -> *). Monad m => forall a. String -> m a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- error _ :: forall a. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace _ :: forall a. [Char] -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Err’))
- ($) _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- ($!) _ _ :: forall a b. (a -> b) -> a -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- id _ :: forall a. a -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Base’))
- snd _ :: forall a b. (a, b) -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- fst _ :: forall a b. (a, b) -> a
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘Data.Tuple’))
- seq _ _ :: forall a b. a -> b -> b
- (imported from ‘Prelude’ at refinement_substitutions.hs:1:8-30
- (and originally defined in ‘GHC.Prim’))
diff --git a/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.hs b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.hs
new file mode 100755
index 0000000000..bda1b3de82
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.hs
@@ -0,0 +1,5 @@
+f :: [String]
+f = _ "hello, world"
+
+main :: IO ()
+main = return ()
diff --git a/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
new file mode 100644
index 0000000000..bd2387f003
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/subsumption_sort_hole_fits.stderr
@@ -0,0 +1,39 @@
+
+subsumption_sort_hole_fits.hs:2:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • 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 subsumption_sort_hole_fits.hs:2:1)
+ Valid hole fits include
+ lines :: String -> [String]
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘base-4.12.0.0:Data.OldList’))
+ words :: String -> [String]
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘base-4.12.0.0:Data.OldList’))
+ read :: forall a. Read a => String -> a
+ with read @[String]
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘Text.Read’))
+ repeat :: forall a. a -> [a]
+ with repeat @String
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘GHC.List’))
+ mempty :: forall a. Monoid a => a
+ with mempty @([Char] -> [String])
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @[] @String
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @[] @String
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘GHC.Base’))
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ with fail @[] @String
+ (imported from ‘Prelude’ at subsumption_sort_hole_fits.hs:1:1
+ (and originally defined in ‘GHC.Base’))
diff --git a/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
new file mode 100644
index 0000000000..92d20daa56
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.hs
@@ -0,0 +1,88 @@
+{-# LANGUAGE TypeInType, TypeOperators, TypeFamilies,
+ UndecidableInstances, ConstraintKinds #-}
+module TypeInTypeSubstitutions where
+
+import GHC.TypeLits
+import Data.Type.Bool
+import Data.Type.Equality
+import Data.List (sort)
+
+
+-- We define a very simplistic O notation, with sufficient expressiveness
+-- to capture the complexity of a few simple sorting algorithms
+data AsympPoly = NLogN Nat Nat
+
+-- Synonyms for common terms
+type N = NLogN 1 0
+type LogN = NLogN 0 1
+type One = NLogN 0 0
+
+-- Just to be able to write it nicely
+type O (a :: AsympPoly) = a
+
+type family (^.) (n :: AsympPoly) (m :: Nat) :: AsympPoly where
+ (NLogN a b) ^. n = (NLogN (a * n) (b * n))
+
+type family (*.) (n :: AsympPoly) (m :: AsympPoly) :: AsympPoly where
+ (NLogN a b) *. (NLogN c d) = NLogN (a+c) (b+d)
+
+type family OCmp (n :: AsympPoly) (m :: AsympPoly) :: Ordering where
+ OCmp (NLogN a b) (NLogN c d) = If (CmpNat a c == EQ)
+ (CmpNat b d)
+ (CmpNat a c)
+
+type family OGEq (n :: AsympPoly) (m :: AsympPoly) :: Bool where
+ OGEq n m = Not (OCmp n m == 'LT)
+
+type (>=.) n m = OGEq n m ~ True
+
+infix 4 >=.
+infixl 7 *., ^.
+
+
+
+-- Stable sorts must be stable, but unstable can be, but don't need to.
+type IsStable s = (s || True) ~ True
+-- We encode in the return type of the sorting function its average complexity,
+-- memory use and stability.
+newtype Sorted (cpu :: AsympPoly) -- The minimum operational complexity
+ -- this algorithm satisfies.
+ (mem :: AsympPoly) -- The minimum space complexity this
+ -- algorithm satisfies.
+ (stable :: Bool) -- Whether the sort is stable or not.
+ a -- What was being sorted.
+ = Sorted {sortedBy :: [a]}
+
+-- Merge sort is O(N*Log(N)) on average in complexity, so that's the
+-- minimum complexity we promise to satisfy. Same goes with memory, which is
+-- O(N), and as we all know, mergesort is a stable sorting algoritm.
+mergeSort :: (Ord a, n >=. O(N*.LogN), m >=. O(N), IsStable s) =>
+ [a] -> Sorted n m s a
+mergeSort = Sorted . sort
+
+insertionSort :: (Ord a, n >=. O(N^.2), m >=. O(One), IsStable s) =>
+ [a] -> Sorted n m s a
+insertionSort = Sorted . sort
+
+-- Note that we don't actually check the complexity (as evidenced by them all
+-- being implemented with sort, a smooth applicative merge sort). With more
+-- dependent types however, some of these properties might be verifiable.
+quickSort :: (Ord a, n >=. O(N*.LogN), m >=. O(N)) => [a] -> Sorted n m False a
+quickSort = Sorted . sort
+
+heapSort :: (Ord a, n >=. O(N*.LogN), m >=. O(One)) => [a] -> Sorted n m False a
+heapSort = Sorted . sort
+
+-- Here we say that sorted can use at most operational complexity O(N^2), space
+-- complexity of at most (O(N)) and that it should be stable.
+mySortA :: Sorted (O(N^.2)) (O(N)) True Integer
+mySortA = _a [3,1,2]
+
+mySortB :: Sorted (O(N*.LogN)) (O(N)) False Integer
+mySortB = _b [3,1,2]
+
+mySortC :: Sorted (O(N*.LogN)) (O(One)) False Integer
+mySortC = _c [3,1,2]
+
+main :: IO ()
+main = print (sortedBy mySortA)
diff --git a/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.stderr
new file mode 100644
index 0000000000..ec1b0dd4f1
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/type_in_type_hole_fits.stderr
@@ -0,0 +1,78 @@
+
+type_in_type_hole_fits.hs:79:11: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole:
+ _a :: [Integer] -> Sorted (O ('NLogN 2 0)) (O N) 'True Integer
+ Or perhaps ‘_a’ is mis-spelled, or not in scope
+ • In the expression: _a
+ In the expression: _a [3, 1, 2]
+ In an equation for ‘mySortA’: mySortA = _a [3, 1, 2]
+ • Relevant bindings include
+ mySortA :: Sorted (O (N ^. 2)) (O N) 'True Integer
+ (bound at type_in_type_hole_fits.hs:79:1)
+ Valid hole fits include
+ mergeSort :: forall a (n :: AsympPoly) (m :: AsympPoly) (s :: Bool).
+ (Ord a, n >=. O (N *. LogN), m >=. O N, IsStable s) =>
+ [a] -> Sorted n m s a
+ with mergeSort @Integer @(O ('NLogN 2 0)) @(O N) @'True
+ (defined at type_in_type_hole_fits.hs:61:1)
+ insertionSort :: forall a (n :: AsympPoly) (m :: AsympPoly) (s :: Bool).
+ (Ord a, n >=. O (N ^. 2), m >=. O One, IsStable s) =>
+ [a] -> Sorted n m s a
+ with insertionSort @Integer @(O ('NLogN 2 0)) @(O N) @'True
+ (defined at type_in_type_hole_fits.hs:65:1)
+ Sorted :: forall (cpu :: AsympPoly) (mem :: AsympPoly) (stable :: Bool) a.
+ [a] -> Sorted cpu mem stable a
+ with Sorted @(O ('NLogN 2 0)) @(O N) @'True @Integer
+ (defined at type_in_type_hole_fits.hs:54:18)
+
+type_in_type_hole_fits.hs:82:11: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole:
+ _b :: [Integer] -> Sorted (O ('NLogN 1 1)) (O N) 'False Integer
+ Or perhaps ‘_b’ is mis-spelled, or not in scope
+ • In the expression: _b
+ In the expression: _b [3, 1, 2]
+ In an equation for ‘mySortB’: mySortB = _b [3, 1, 2]
+ • Relevant bindings include
+ mySortB :: Sorted (O (N *. LogN)) (O N) 'False Integer
+ (bound at type_in_type_hole_fits.hs:82:1)
+ Valid hole fits include
+ quickSort :: forall a (n :: AsympPoly) (m :: AsympPoly).
+ (Ord a, n >=. O (N *. LogN), m >=. O N) =>
+ [a] -> Sorted n m 'False a
+ with quickSort @Integer @(O ('NLogN 1 1)) @(O N)
+ (defined at type_in_type_hole_fits.hs:71:1)
+ heapSort :: forall a (n :: AsympPoly) (m :: AsympPoly).
+ (Ord a, n >=. O (N *. LogN), m >=. O One) =>
+ [a] -> Sorted n m 'False a
+ with heapSort @Integer @(O ('NLogN 1 1)) @(O N)
+ (defined at type_in_type_hole_fits.hs:74:1)
+ mergeSort :: forall a (n :: AsympPoly) (m :: AsympPoly) (s :: Bool).
+ (Ord a, n >=. O (N *. LogN), m >=. O N, IsStable s) =>
+ [a] -> Sorted n m s a
+ with mergeSort @Integer @(O ('NLogN 1 1)) @(O N) @'False
+ (defined at type_in_type_hole_fits.hs:61:1)
+ Sorted :: forall (cpu :: AsympPoly) (mem :: AsympPoly) (stable :: Bool) a.
+ [a] -> Sorted cpu mem stable a
+ with Sorted @(O ('NLogN 1 1)) @(O N) @'False @Integer
+ (defined at type_in_type_hole_fits.hs:54:18)
+
+type_in_type_hole_fits.hs:85:11: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole:
+ _c :: [Integer] -> Sorted (O ('NLogN 1 1)) (O One) 'False Integer
+ Or perhaps ‘_c’ is mis-spelled, or not in scope
+ • In the expression: _c
+ In the expression: _c [3, 1, 2]
+ In an equation for ‘mySortC’: mySortC = _c [3, 1, 2]
+ • Relevant bindings include
+ mySortC :: Sorted (O (N *. LogN)) (O One) 'False Integer
+ (bound at type_in_type_hole_fits.hs:85:1)
+ Valid hole fits include
+ heapSort :: forall a (n :: AsympPoly) (m :: AsympPoly).
+ (Ord a, n >=. O (N *. LogN), m >=. O One) =>
+ [a] -> Sorted n m 'False a
+ with heapSort @Integer @(O ('NLogN 1 1)) @(O One)
+ (defined at type_in_type_hole_fits.hs:74:1)
+ Sorted :: forall (cpu :: AsympPoly) (mem :: AsympPoly) (stable :: Bool) a.
+ [a] -> Sorted cpu mem stable a
+ with Sorted @(O ('NLogN 1 1)) @(O One) @'False @Integer
+ (defined at type_in_type_hole_fits.hs:54:18)
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions.hs b/testsuite/tests/typecheck/should_compile/valid_hole_fits.hs
index 646bc0ab57..39939ba692 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions.hs
+++ b/testsuite/tests/typecheck/should_compile/valid_hole_fits.hs
@@ -3,7 +3,7 @@ module Foo where
import Prelude hiding (putStr, putStrLn)
import qualified System.IO (putStr, putStrLn)
import Data.Maybe
-import qualified ValidSubs
+import qualified ValidHoleFits
ps :: String -> IO ()
ps = putStrLn
@@ -20,7 +20,7 @@ c _ = do { x <- a 0
test :: [Maybe a] -> [a]
test = _
-test2 :: Integer -> ValidSubs.Moo
+test2 :: Integer -> ValidHoleFits.Moo
test2 = _
k :: Maybe Integer
diff --git a/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
new file mode 100644
index 0000000000..a87bea1268
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/valid_hole_fits.stderr
@@ -0,0 +1,255 @@
+[1 of 2] Compiling ValidHoleFits ( ValidHoleFits.hs, ValidHoleFits.o )
+[2 of 2] Compiling Foo ( valid_hole_fits.hs, valid_hole_fits.o )
+
+valid_hole_fits.hs:9:6: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
+ • Variable not in scope: putStrLn :: String -> IO ()
+ • Perhaps you meant one of these:
+ ‘System.IO.putStrLn’ (imported from System.IO),
+ ‘System.IO.putStr’ (imported from System.IO)
+ Perhaps you want to remove ‘putStrLn’ from the explicit hiding list
+ in the import of ‘Prelude’ (valid_hole_fits.hs:3:1-40).
+
+valid_hole_fits.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Int -> IO Int
+ • In the expression: _
+ In a stmt of a 'do' block: y <- _ x
+ In the expression:
+ do x <- a 0
+ y <- _ x
+ return y
+ • Relevant bindings include
+ x :: Int (bound at valid_hole_fits.hs:16:12)
+ c :: Int -> IO Int (bound at valid_hole_fits.hs:16:1)
+ Valid hole fits include
+ c :: Int -> IO Int (bound at valid_hole_fits.hs:16:1)
+ a :: Int -> IO Int (bound at valid_hole_fits.hs:12:1)
+ b :: Int -> IO Int (bound at valid_hole_fits.hs:14:1)
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @IO @Int
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @IO @Int
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+
+valid_hole_fits.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: [Maybe a] -> [a]
+ Where: ‘a’ is a rigid type variable bound by
+ the type signature for:
+ test :: forall a. [Maybe a] -> [a]
+ at valid_hole_fits.hs:20:1-24
+ • In the expression: _
+ In an equation for ‘test’: test = _
+ • Relevant bindings include
+ test :: [Maybe a] -> [a] (bound at valid_hole_fits.hs:21:1)
+ Valid hole fits include
+ test :: [Maybe a] -> [a] (bound at valid_hole_fits.hs:21:1)
+ catMaybes :: forall a. [Maybe a] -> [a]
+ with catMaybes @a
+ (imported from ‘Data.Maybe’ at valid_hole_fits.hs:5:1-17)
+ mempty :: forall a. Monoid a => a
+ with mempty @([Maybe a] -> [a])
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+
+valid_hole_fits.hs:24:9: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Integer -> ValidHoleFits.Moo
+ • In the expression: _
+ In an equation for ‘test2’: test2 = _
+ • Relevant bindings include
+ test2 :: Integer -> ValidHoleFits.Moo
+ (bound at valid_hole_fits.hs:24:1)
+ Valid hole fits include
+ test2 :: Integer -> ValidHoleFits.Moo
+ (bound at valid_hole_fits.hs:24:1)
+ ValidHoleFits.Moo :: Integer -> ValidHoleFits.Moo
+ (imported qualified from ‘ValidHoleFits’ at valid_hole_fits.hs:6:1-30
+ (and originally defined at ValidHoleFits.hs:4:12-22))
+
+valid_hole_fits.hs:27:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Integer -> Maybe Integer
+ • In the expression: _
+ In the expression: _ 2
+ In an equation for ‘k’: k = _ 2
+ • Relevant bindings include
+ k :: Maybe Integer (bound at valid_hole_fits.hs:27:1)
+ Valid hole fits include
+ Just :: forall a. a -> Maybe a
+ with Just @Integer
+ (imported from ‘Data.Maybe’ at valid_hole_fits.hs:5:1-17
+ (and originally defined in ‘GHC.Base’))
+ return :: forall (m :: * -> *). Monad m => forall a. a -> m a
+ with return @Maybe @Integer
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a
+ with pure @Maybe @Integer
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+
+valid_hole_fits.hs:30:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • Ambiguous type variable ‘a1’ arising from a use of ‘show’
+ prevents the constraint ‘(Show a1)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a1’ should be.
+ These potential instances exist:
+ instance (Show a, Show b) => Show (Either a b)
+ -- Defined in ‘Data.Either’
+ instance Show Ordering -- Defined in ‘GHC.Show’
+ instance Show Integer -- Defined in ‘GHC.Show’
+ ...plus 23 others
+ ...plus 68 instances involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In the expression: show _
+ In an equation for ‘f’: f = show _
+
+valid_hole_fits.hs:30:10: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: a1
+ Where: ‘a1’ is an ambiguous type variable
+ • In the first argument of ‘show’, namely ‘_’
+ In the expression: show _
+ In an equation for ‘f’: f = show _
+ • Relevant bindings include
+ f :: String (bound at valid_hole_fits.hs:30:1)
+ Valid hole fits include
+ f :: String (bound at valid_hole_fits.hs:30:1)
+ k :: Maybe Integer (defined at valid_hole_fits.hs:27:1)
+ h :: String (bound at valid_hole_fits.hs:34:1)
+ otherwise :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ EQ :: Ordering
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ LT :: Ordering
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ GT :: Ordering
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ pi :: forall a. Floating a => a
+ with pi @Double
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Float’))
+
+valid_hole_fits.hs:34:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • Ambiguous type variable ‘a0’ arising from a use of ‘show’
+ prevents the constraint ‘(Show a0)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a0’ should be.
+ These potential instances exist:
+ instance (Show a, Show b) => Show (Either a b)
+ -- Defined in ‘Data.Either’
+ instance Show Ordering -- Defined in ‘GHC.Show’
+ instance Show Integer -- Defined in ‘GHC.Show’
+ ...plus 23 others
+ ...plus 68 instances involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In the expression: show (_ (_ :: Bool))
+ In an equation for ‘h’: h = show (_ (_ :: Bool))
+
+valid_hole_fits.hs:34:11: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Bool -> a0
+ Where: ‘a0’ is an ambiguous type variable
+ • In the expression: _
+ In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
+ In the expression: show (_ (_ :: Bool))
+ • Relevant bindings include
+ h :: String (bound at valid_hole_fits.hs:34:1)
+ Valid hole fits include
+ not :: Bool -> Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Classes’))
+ enumFrom :: forall a. Enum a => a -> [a]
+ with enumFrom @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+ Just :: forall a. a -> Maybe a
+ with Just @Bool
+ (imported from ‘Data.Maybe’ at valid_hole_fits.hs:5:1-17
+ (and originally defined in ‘GHC.Base’))
+ id :: forall a. a -> a
+ with id @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ repeat :: forall a. a -> [a]
+ with repeat @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.List’))
+ fromEnum :: forall a. Enum a => a -> Int
+ with fromEnum @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+ pred :: forall a. Enum a => a -> a
+ with pred @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+ succ :: forall a. Enum a => a -> a
+ with succ @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+ show :: forall a. Show a => a -> String
+ with show @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Show’))
+
+valid_hole_fits.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: Bool
+ • In the first argument of ‘_’, namely ‘(_ :: Bool)’
+ In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
+ In the expression: show (_ (_ :: Bool))
+ • Relevant bindings include
+ h :: String (bound at valid_hole_fits.hs:34:1)
+ Valid hole fits include
+ otherwise :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ False :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ True :: Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Types’))
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Bool
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Enum’))
+
+valid_hole_fits.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: [Char] -> IO ()
+ • In the expression: _
+ In the expression: _ "hello, world"
+ In an equation for ‘main’: main = _ "hello, world"
+ • Relevant bindings include
+ main :: IO () (bound at valid_hole_fits.hs:37:1)
+ Valid hole fits include
+ ps :: String -> IO () (defined at valid_hole_fits.hs:9:1)
+ System.IO.putStr :: String -> IO ()
+ (imported qualified from ‘System.IO’ at valid_hole_fits.hs:4:29-34)
+ System.IO.putStrLn :: String -> IO ()
+ (imported qualified from ‘System.IO’ at valid_hole_fits.hs:4:37-44)
+ readIO :: forall a. Read a => String -> IO a
+ with readIO @()
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘System.IO’))
+ print :: forall a. Show a => a -> IO ()
+ with print @[Char]
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘System.IO’))
+ fail :: forall (m :: * -> *). Monad m => forall a. String -> m a
+ with fail @IO @()
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
+ mempty :: forall a. Monoid a => a
+ with mempty @([Char] -> IO ())
+ (imported from ‘Prelude’ at valid_hole_fits.hs:3:1-40
+ (and originally defined in ‘GHC.Base’))
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.hs b/testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.hs
index a2186e73a3..a2186e73a3 100644
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.hs
+++ b/testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.hs
diff --git a/testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.stderr b/testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.stderr
new file mode 100644
index 0000000000..ac4fdc94c7
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/valid_hole_fits_interactions.stderr
@@ -0,0 +1,11 @@
+
+valid_hole_fits_interactions.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)]
+ • Found hole: _ :: SBool 'True
+ • In the expression: _
+ In an equation for ‘f’: f = _
+ • Relevant bindings include
+ f :: SBool 'True (bound at valid_hole_fits_interactions.hs:15:1)
+ Valid hole fits include
+ f :: SBool 'True (bound at valid_hole_fits_interactions.hs:15:1)
+ STrue :: SBool 'True
+ (defined at valid_hole_fits_interactions.hs:12:3)
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
deleted file mode 100644
index 978110f956..0000000000
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions.stderr
+++ /dev/null
@@ -1,258 +0,0 @@
-[1 of 2] Compiling ValidSubs ( ValidSubs.hs, ValidSubs.o )
-[2 of 2] Compiling Foo ( valid_substitutions.hs, valid_substitutions.o )
-
-valid_substitutions.hs:9:6: warning: [-Wdeferred-out-of-scope-variables (in -Wdefault)]
- • Variable not in scope: putStrLn :: String -> IO ()
- • Perhaps you meant one of these:
- ‘System.IO.putStrLn’ (imported from System.IO),
- ‘System.IO.putStr’ (imported from System.IO)
- Perhaps you want to remove ‘putStrLn’ from the explicit hiding list
- in the import of ‘Prelude’ (valid_substitutions.hs:3:1-40).
-
-valid_substitutions.hs:17:17: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Int -> IO Int
- • In the expression: _
- In a stmt of a 'do' block: y <- _ x
- In the expression:
- do x <- a 0
- y <- _ x
- return y
- • Relevant bindings include
- x :: Int (bound at valid_substitutions.hs:16:12)
- c :: Int -> IO Int (bound at valid_substitutions.hs:16:1)
- Valid substitutions include
- 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)
- 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’))
- 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. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
-
-valid_substitutions.hs:21:8: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: [Maybe a] -> [a]
- Where: ‘a’ is a rigid type variable bound by
- the type signature for:
- test :: forall a. [Maybe a] -> [a]
- at valid_substitutions.hs:20:1-24
- • In the expression: _
- In an equation for ‘test’: test = _
- • Relevant bindings include
- test :: [Maybe a] -> [a] (bound at valid_substitutions.hs:21:1)
- 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’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
-
-valid_substitutions.hs:24:9: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Integer -> ValidSubs.Moo
- • In the expression: _
- In an equation for ‘test2’: test2 = _
- • Relevant bindings include
- test2 :: Integer -> ValidSubs.Moo
- (bound at valid_substitutions.hs:24:1)
- Valid substitutions include
- test2 :: Integer -> ValidSubs.Moo
- (defined at valid_substitutions.hs:24:1)
- ValidSubs.Moo :: Integer -> ValidSubs.Moo
- (imported qualified from ‘ValidSubs’ at valid_substitutions.hs:6:1-26
- (and originally defined at ValidSubs.hs:4:12-22))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
-
-valid_substitutions.hs:27:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Integer -> Maybe Integer
- • In the expression: _
- In the expression: _ 2
- In an equation for ‘k’: k = _ 2
- • Relevant bindings include
- k :: Maybe Integer (bound at valid_substitutions.hs:27: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’))
- 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’))
- 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. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
-
-valid_substitutions.hs:30:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • Ambiguous type variable ‘a1’ arising from a use of ‘show’
- prevents the constraint ‘(Show a1)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a1’ should be.
- These potential instances exist:
- instance (Show a, Show b) => Show (Either a b)
- -- Defined in ‘Data.Either’
- instance Show Ordering -- Defined in ‘GHC.Show’
- instance Show Integer -- Defined in ‘GHC.Show’
- ...plus 23 others
- ...plus 68 instances involving out-of-scope types
- (use -fprint-potential-instances to see them all)
- • In the expression: show _
- In an equation for ‘f’: f = show _
-
-valid_substitutions.hs:30:10: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: a1
- Where: ‘a1’ is an ambiguous type variable
- • In the first argument of ‘show’, namely ‘_’
- In the expression: show _
- In an equation for ‘f’: f = show _
- • Relevant bindings include
- f :: String (bound at valid_substitutions.hs:30:1)
- Valid substitutions include
- 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)
- 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’))
- 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’))
- 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’))
-
-valid_substitutions.hs:34:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • Ambiguous type variable ‘a0’ arising from a use of ‘show’
- prevents the constraint ‘(Show a0)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
- instance (Show a, Show b) => Show (Either a b)
- -- Defined in ‘Data.Either’
- instance Show Ordering -- Defined in ‘GHC.Show’
- instance Show Integer -- Defined in ‘GHC.Show’
- ...plus 23 others
- ...plus 68 instances involving out-of-scope types
- (use -fprint-potential-instances to see them all)
- • In the expression: show (_ (_ :: Bool))
- In an equation for ‘h’: h = show (_ (_ :: Bool))
-
-valid_substitutions.hs:34:11: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Bool -> a0
- Where: ‘a0’ is an ambiguous type variable
- • In the expression: _
- In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
- In the expression: show (_ (_ :: Bool))
- • Relevant bindings include
- h :: String (bound at valid_substitutions.hs:34:1)
- Valid substitutions include
- show :: forall a. Show a => a -> String
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (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’))
- id :: forall a. a -> a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (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’))
-
-valid_substitutions.hs:34:14: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: Bool
- • In the first argument of ‘_’, namely ‘(_ :: Bool)’
- In the first argument of ‘show’, namely ‘(_ (_ :: Bool))’
- In the expression: show (_ (_ :: Bool))
- • 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’))
- maxBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Enum’))
- minBound :: forall a. Bounded a => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Enum’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
-
-valid_substitutions.hs:37:8: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: [Char] -> IO ()
- • In the expression: _
- In the expression: _ "hello, world"
- In an equation for ‘main’: main = _ "hello, world"
- • Relevant bindings include
- main :: IO () (bound at valid_substitutions.hs:37:1)
- Valid substitutions include
- ps :: String -> IO () (defined at valid_substitutions.hs:9:1)
- System.IO.putStr :: String -> IO ()
- (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)
- 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. GHC.Stack.Types.HasCallStack => [Char] -> a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
- errorWithoutStackTrace :: forall a. [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. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions.hs:3:1-40
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr b/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
deleted file mode 100644
index 878309a3cf..0000000000
--- a/testsuite/tests/typecheck/should_compile/valid_substitutions_interactions.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-
-valid_substitutions_interactions.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)]
- • Found hole: _ :: SBool 'True
- • In the expression: _
- In an equation for ‘f’: f = _
- • Relevant bindings include
- f :: SBool 'True
- (bound at valid_substitutions_interactions.hs:15:1)
- Valid substitutions include
- 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. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at valid_substitutions_interactions.hs:5:8-28
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_fail/T12177.stderr b/testsuite/tests/typecheck/should_fail/T12177.stderr
index dee9117d05..0c810f4185 100644
--- a/testsuite/tests/typecheck/should_fail/T12177.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12177.stderr
@@ -10,10 +10,6 @@ T12177.hs:3:19: error:
• Relevant bindings include
x :: p1 (bound at T12177.hs:3:14)
bar :: p -> p1 -> t (bound at T12177.hs:3:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T12177.hs:1:8-10
- (and originally defined in ‘GHC.Err’))
T12177.hs:5:37: error:
• Found hole: _ :: t
@@ -28,7 +24,3 @@ T12177.hs:5:37: error:
x :: p3 (bound at T12177.hs:5:26)
y :: p1 (bound at T12177.hs:5:14)
baz :: p -> p1 -> p2 -> p3 -> p4 -> t (bound at T12177.hs:5:1)
- Valid substitutions include
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T12177.hs:1:8-10
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_fail/T14884.stderr b/testsuite/tests/typecheck/should_fail/T14884.stderr
index 39c3a71a73..11008b316a 100644
--- a/testsuite/tests/typecheck/should_fail/T14884.stderr
+++ b/testsuite/tests/typecheck/should_fail/T14884.stderr
@@ -6,24 +6,29 @@ T14884.hs:4:5: error:
In the expression: _ print "abc"
In an equation for ‘x’: x = _ print "abc"
• Relevant bindings include x :: IO () (bound at T14884.hs:4:1)
- Valid substitutions include
- foldMap :: forall (t :: * -> *).
- Foldable t =>
- forall m a. Monoid m => (a -> m) -> t a -> m
- (imported from ‘Prelude’ at T14884.hs:1:8-13
- (and originally defined in ‘Data.Foldable’))
+ Valid hole fits include
mapM_ :: forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
+ with mapM_ @[] @IO @Char @()
+ (imported from ‘Prelude’ at T14884.hs:1:8-13
+ (and originally defined in ‘Data.Foldable’))
+ foldMap :: forall (t :: * -> *).
+ Foldable t =>
+ forall m a. Monoid m => (a -> m) -> t a -> m
+ with foldMap @[] @(IO ()) @Char
(imported from ‘Prelude’ at T14884.hs:1:8-13
(and originally defined in ‘Data.Foldable’))
($) :: forall a b. (a -> b) -> a -> b
+ with ($) @'GHC.Types.LiftedRep @[Char] @(IO ())
(imported from ‘Prelude’ at T14884.hs:1:8-13
(and originally defined in ‘GHC.Base’))
($!) :: forall a b. (a -> b) -> a -> b
+ with ($!) @'GHC.Types.LiftedRep @[Char] @(IO ())
(imported from ‘Prelude’ at T14884.hs:1:8-13
(and originally defined in ‘GHC.Base’))
id :: forall a. a -> a
+ with id @([Char] -> IO ())
(imported from ‘Prelude’ at T14884.hs:1:8-13
(and originally defined in ‘GHC.Base’))
diff --git a/testsuite/tests/typecheck/should_fail/T9497d.stderr b/testsuite/tests/typecheck/should_fail/T9497d.stderr
index 1ae8ec0e05..fff9e2e6a8 100644
--- a/testsuite/tests/typecheck/should_fail/T9497d.stderr
+++ b/testsuite/tests/typecheck/should_fail/T9497d.stderr
@@ -5,14 +5,13 @@ T9497d.hs:2:8: error:
• In the expression: _main
In an equation for ‘main’: main = _main
• Relevant bindings include main :: IO () (bound at T9497d.hs:2:1)
- Valid substitutions include
- main :: IO () (defined at T9497d.hs:2:1)
+ Valid hole fits include
+ main :: IO () (bound at T9497d.hs:2:1)
readLn :: forall a. Read a => IO a
+ with readLn @()
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘System.IO’))
mempty :: forall a. Monoid a => a
+ with mempty @(IO ())
(imported from ‘Prelude’ at T9497d.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T9497d.hs:1:1
- (and originally defined in ‘GHC.Err’))
diff --git a/testsuite/tests/typecheck/should_run/T9497a-run.stderr b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
index 2f5097e978..6461d98b10 100644
--- a/testsuite/tests/typecheck/should_run/T9497a-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497a-run.stderr
@@ -5,15 +5,14 @@ T9497a-run: T9497a-run.hs:2:8: error:
In an equation for ‘main’: main = _main
• Relevant bindings include
main :: IO () (bound at T9497a-run.hs:2:1)
- Valid substitutions include
- main :: IO () (defined at T9497a-run.hs:2:1)
+ Valid hole fits include
+ main :: IO () (bound at T9497a-run.hs:2:1)
readLn :: forall a. Read a => IO a
+ with readLn @()
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘System.IO’))
mempty :: forall a. Monoid a => a
+ with mempty @(IO ())
(imported from ‘Prelude’ at T9497a-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T9497a-run.hs:1:1
- (and originally defined in ‘GHC.Err’))
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T9497b-run.stderr b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
index e5a1bafce3..a73b71981c 100644
--- a/testsuite/tests/typecheck/should_run/T9497b-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497b-run.stderr
@@ -5,15 +5,14 @@ T9497b-run: T9497b-run.hs:2:8: error:
In an equation for ‘main’: main = _main
• Relevant bindings include
main :: IO () (bound at T9497b-run.hs:2:1)
- Valid substitutions include
- main :: IO () (defined at T9497b-run.hs:2:1)
+ Valid hole fits include
+ main :: IO () (bound at T9497b-run.hs:2:1)
readLn :: forall a. Read a => IO a
+ with readLn @()
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘System.IO’))
mempty :: forall a. Monoid a => a
+ with mempty @(IO ())
(imported from ‘Prelude’ at T9497b-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T9497b-run.hs:1:1
- (and originally defined in ‘GHC.Err’))
(deferred type error)
diff --git a/testsuite/tests/typecheck/should_run/T9497c-run.stderr b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
index 4605857af5..8666900b4e 100644
--- a/testsuite/tests/typecheck/should_run/T9497c-run.stderr
+++ b/testsuite/tests/typecheck/should_run/T9497c-run.stderr
@@ -5,15 +5,14 @@ T9497c-run: T9497c-run.hs:2:8: error:
In an equation for ‘main’: main = _main
• Relevant bindings include
main :: IO () (bound at T9497c-run.hs:2:1)
- Valid substitutions include
- main :: IO () (defined at T9497c-run.hs:2:1)
+ Valid hole fits include
+ main :: IO () (bound at T9497c-run.hs:2:1)
readLn :: forall a. Read a => IO a
+ with readLn @()
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘System.IO’))
mempty :: forall a. Monoid a => a
+ with mempty @(IO ())
(imported from ‘Prelude’ at T9497c-run.hs:1:1
(and originally defined in ‘GHC.Base’))
- undefined :: forall a. GHC.Stack.Types.HasCallStack => a
- (imported from ‘Prelude’ at T9497c-run.hs:1:1
- (and originally defined in ‘GHC.Err’))
(deferred type error)