diff options
author | Oleg Grenrus <oleg.grenrus@iki.fi> | 2021-05-26 05:03:52 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-12 12:52:18 -0500 |
commit | 31bf380f3925d72a3369978d28d02aaae31f75ef (patch) | |
tree | 38afd6818f3f4661c7ec2f560bd249b3408e021a /testsuite/tests | |
parent | 93783e6a8765e1410d0a14fd5249a995c6759308 (diff) | |
download | haskell-31bf380f3925d72a3369978d28d02aaae31f75ef.tar.gz |
Use HasCallStack and error in GHC.List and .NonEmpty
In addition to providing stack traces, the scary HasCallStack will
hopefully make people think whether they want to use these functions,
i.e. act as a documentation hint that something weird might happen.
A single metric increased, which doesn't visibly
use any method with `HasCallStack`.
-------------------------
Metric Decrease:
T9630
Metric Decrease:
T19695
T9630
-------------------------
Diffstat (limited to 'testsuite/tests')
11 files changed, 133 insertions, 53 deletions
diff --git a/testsuite/tests/ghci.debugger/scripts/break009.stdout b/testsuite/tests/ghci.debugger/scripts/break009.stdout index ab09ffa7c1..277fd16bac 100644 --- a/testsuite/tests/ghci.debugger/scripts/break009.stdout +++ b/testsuite/tests/ghci.debugger/scripts/break009.stdout @@ -2,3 +2,8 @@ Breakpoint 0 activated at Test6.hs:5:8-11 Stopped in Main.main, Test6.hs:5:8-11 _result :: a = _ *** Exception: Prelude.head: empty list +CallStack (from HasCallStack): + error, called at libraries/base/GHC/List.hs:1590:3 in base:GHC.List + errorEmptyList, called at libraries/base/GHC/List.hs:74:11 in base:GHC.List + badHead, called at libraries/base/GHC/List.hs:70:28 in base:GHC.List + head, called at Test6.hs:1:8 in main:Main diff --git a/testsuite/tests/ghci.debugger/scripts/print027.stdout b/testsuite/tests/ghci.debugger/scripts/print027.stdout index 9426ba8365..c0e9e3712d 100644 --- a/testsuite/tests/ghci.debugger/scripts/print027.stdout +++ b/testsuite/tests/ghci.debugger/scripts/print027.stdout @@ -1,6 +1,6 @@ + = (_t1::Num a => a -> a -> a) print = (_t2::Show a => a -> IO ()) log = (_t3::Floating a => a -> a) -head = (_t4::[a] -> a) -tail = (_t5::[a] -> [a]) +head = (_t4::GHC.Stack.Types.HasCallStack => [a] -> a) +tail = (_t5::GHC.Stack.Types.HasCallStack => [a] -> [a]) fst = (_t6::(a, b) -> a) diff --git a/testsuite/tests/ghci/scripts/T10501.stderr b/testsuite/tests/ghci/scripts/T10501.stderr index 669b72bf45..9d41d0f211 100644 --- a/testsuite/tests/ghci/scripts/T10501.stderr +++ b/testsuite/tests/ghci/scripts/T10501.stderr @@ -1,4 +1,9 @@ *** Exception: Prelude.head: empty list +CallStack (from HasCallStack): + error, called at libraries/base/GHC/List.hs:1590:3 in base:GHC.List + errorEmptyList, called at libraries/base/GHC/List.hs:74:11 in base:GHC.List + badHead, called at libraries/base/GHC/List.hs:70:28 in base:GHC.List + head, called at <interactive>:1:10 in interactive:Ghci1 *** Exception: Prelude.undefined CallStack (from HasCallStack): undefined, called at <interactive>:1:17 in interactive:Ghci1 diff --git a/testsuite/tests/plugins/test-hole-plugin.stderr b/testsuite/tests/plugins/test-hole-plugin.stderr index 109736fa78..9e9b01b726 100644 --- a/testsuite/tests/plugins/test-hole-plugin.stderr +++ b/testsuite/tests/plugins/test-hole-plugin.stderr @@ -19,7 +19,7 @@ test-hole-plugin.hs:13:5: warning: [-Wtyped-holes (in -Wdefault)] i :: [Int] -> Int g :: [Int] -> Int h :: [Int] -> Int - head :: forall a. [a] -> a + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a (Some hole fits suppressed; use -fmax-valid-hole-fits=N or -fno-max-valid-hole-fits) test-hole-plugin.hs:14:5: warning: [-Wtyped-holes (in -Wdefault)] @@ -34,7 +34,7 @@ test-hole-plugin.hs:14:5: warning: [-Wtyped-holes (in -Wdefault)] minimum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a maximum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a length :: forall (t :: * -> *) a. Foldable t => t a -> Int - last :: forall a. [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a (Some hole fits suppressed; use -fmax-valid-hole-fits=N or -fno-max-valid-hole-fits) test-hole-plugin.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)] @@ -44,8 +44,8 @@ test-hole-plugin.hs:15:5: warning: [-Wtyped-holes (in -Wdefault)] • Relevant bindings include g :: [Int] -> Int (bound at test-hole-plugin.hs:15:1) Valid hole fits include - head :: forall a. [a] -> a - last :: forall a. [a] -> a + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a test-hole-plugin.hs:16:5: warning: [-Wtyped-holes (in -Wdefault)] • Found hole: _only_Prelude :: [Int] -> Int diff --git a/testsuite/tests/simplCore/should_compile/T20103.stderr b/testsuite/tests/simplCore/should_compile/T20103.stderr index 251a3e60fa..485d2d4617 100644 --- a/testsuite/tests/simplCore/should_compile/T20103.stderr +++ b/testsuite/tests/simplCore/should_compile/T20103.stderr @@ -1,22 +1,22 @@ ==================== Tidy Core ==================== Result size of Tidy Core - = {terms: 98, types: 59, coercions: 14, joins: 0/0} + = {terms: 136, types: 88, coercions: 25, joins: 0/0} -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} lvl :: Int [GblId, Unf=OtherCon []] -lvl = GHC.Types.I# 12# +lvl = GHC.Types.I# 28# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} lvl1 :: Int [GblId, Unf=OtherCon []] -lvl1 = GHC.Types.I# 7# +lvl1 = GHC.Types.I# 6# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} lvl2 :: Int [GblId, Unf=OtherCon []] -lvl2 = GHC.Types.I# 9# +lvl2 = GHC.Types.I# 24# -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} lvl3 :: GHC.Prim.Addr# @@ -60,18 +60,60 @@ lvl7 = GHC.Stack.Types.SrcLoc lvl6 lvl5 lvl4 lvl1 lvl2 lvl1 lvl -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} lvl8 :: GHC.Prim.Addr# [GblId, Unf=OtherCon []] -lvl8 = "foo"# +lvl8 = "head"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} lvl9 :: [Char] [GblId] lvl9 = GHC.CString.unpackCString# lvl8 +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl10 :: Int +[GblId, Unf=OtherCon []] +lvl10 = GHC.Types.I# 12# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl11 :: Int +[GblId, Unf=OtherCon []] +lvl11 = GHC.Types.I# 7# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl12 :: Int +[GblId, Unf=OtherCon []] +lvl12 = GHC.Types.I# 9# + +-- RHS size: {terms: 8, types: 0, coercions: 0, joins: 0/0} +lvl13 :: SrcLoc +[GblId, Unf=OtherCon []] +lvl13 + = GHC.Stack.Types.SrcLoc lvl6 lvl5 lvl4 lvl11 lvl12 lvl11 lvl10 + +-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} +lvl14 :: GHC.Prim.Addr# +[GblId, Unf=OtherCon []] +lvl14 = "foo"# + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl15 :: [Char] +[GblId] +lvl15 = GHC.CString.unpackCString# lvl14 + +-- RHS size: {terms: 6, types: 5, coercions: 4, joins: 0/0} +lvl16 :: CallStack -> ([Char], SrcLoc) +[GblId, Arity=1, Str=<S>b, Cpr=b, Unf=OtherCon []] +lvl16 + = \ (wild1 :: CallStack) -> + GHC.List.head1 + @([Char], SrcLoc) + ((GHC.Stack.Types.PushCallStack lvl9 lvl7 wild1) + `cast` (Sym (GHC.Classes.N:IP[0] <"callStack">_N <CallStack>_N) + :: CallStack ~R# (?callStack::CallStack))) + Rec { --- RHS size: {terms: 36, types: 29, coercions: 14, joins: 0/0} +-- RHS size: {terms: 44, types: 41, coercions: 21, joins: 0/0} T20103.$wfoo [InlPrag=[2], Occ=LoopBreaker] :: HasCallStack => GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Str=<1L><1L>, Unf=OtherCon []] +[GblId, Arity=2, Str=<SL><1L>, Unf=OtherCon []] T20103.$wfoo = \ ($dIP :: HasCallStack) (ww :: GHC.Prim.Int#) -> case ww of ds { @@ -82,7 +124,7 @@ T20103.$wfoo of wild1 { __DEFAULT -> T20103.$wfoo - ((GHC.Stack.Types.PushCallStack lvl9 lvl7 wild1) + ((GHC.Stack.Types.PushCallStack lvl15 lvl13 wild1) `cast` (Sym (GHC.Classes.N:IP[0] <"callStack">_N <CallStack>_N) :: CallStack ~R# (?callStack::CallStack))) (GHC.Prim.-# ds 1#); @@ -99,7 +141,21 @@ T20103.$wfoo `cast` (GHC.Classes.N:IP[0] <"callStack">_N <CallStack>_N :: (?callStack::CallStack) ~R# CallStack)) of { - [] -> case GHC.List.badHead of wild1 { }; + [] -> + case $dIP + `cast` (GHC.Classes.N:IP[0] <"callStack">_N <CallStack>_N + :: (?callStack::CallStack) ~R# CallStack) + of wild1 { + __DEFAULT -> case lvl16 wild1 of wild2 { }; + GHC.Stack.Types.FreezeCallStack ds1 -> + case GHC.List.head1 + @([Char], SrcLoc) + (wild1 + `cast` (Sym (GHC.Classes.N:IP[0] <"callStack">_N <CallStack>_N) + :: CallStack ~R# (?callStack::CallStack))) + of wild2 { + } + }; : x ds1 -> case x of { (x1, ds2) -> GHC.List.$wlenAcc @Char x1 0# } } } @@ -109,7 +165,7 @@ end Rec } foo [InlPrag=[2]] :: HasCallStack => Int -> Int [GblId, Arity=2, - Str=<1L><1P(1L)>, + Str=<SL><1!P(1L)>, Cpr=1, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, diff --git a/testsuite/tests/th/TH_exn2.stderr b/testsuite/tests/th/TH_exn2.stderr index 582928c08b..9d9205056c 100644 --- a/testsuite/tests/th/TH_exn2.stderr +++ b/testsuite/tests/th/TH_exn2.stderr @@ -2,5 +2,9 @@ TH_exn2.hs:1:1: error: Exception when trying to run compile-time code: Prelude.tail: empty list +CallStack (from HasCallStack): + error, called at libraries/base/GHC/List.hs:1590:3 in base:GHC.List + errorEmptyList, called at libraries/base/GHC/List.hs:114:28 in base:GHC.List + tail, called at TH_exn2.hs:10:17 in main:TH Code: (do ds <- [d| |] return (tail ds)) diff --git a/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr index 61ed517535..62886f3bf7 100644 --- a/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr +++ b/testsuite/tests/typecheck/should_compile/abstract_refinement_hole_fits.stderr @@ -8,8 +8,8 @@ abstract_refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] Valid hole fits include f :: [Integer] -> Integer g :: [Integer] -> Integer - head :: forall a. [a] -> a - last :: forall a. [a] -> a + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a maximum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a minimum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a product :: forall (t :: * -> *) a. (Foldable t, Num a) => t a -> a @@ -86,9 +86,9 @@ abstract_refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] id (_ :: t0 -> [Integer] -> Integer) (_ :: t0) where id :: forall a. a -> a head (_ :: [t0 -> [Integer] -> Integer]) (_ :: t0) - where head :: forall a. [a] -> a + where head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a last (_ :: [t0 -> [Integer] -> Integer]) (_ :: t0) - where last :: forall a. [a] -> a + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a fst (_ :: (t0 -> [Integer] -> Integer, b2)) (_ :: t0) where fst :: forall a b. (a, b) -> a snd (_ :: (a2, t0 -> [Integer] -> Integer)) (_ :: t0) @@ -96,13 +96,15 @@ abstract_refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] id (_ :: [Integer] -> Integer) where id :: forall a. a -> a head (_ :: [[Integer] -> Integer]) - where head :: forall a. [a] -> a + where head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a last (_ :: [[Integer] -> Integer]) - where last :: forall a. [a] -> a + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a asTypeOf (_ :: [Integer] -> Integer) (_ :: [Integer] -> Integer) where asTypeOf :: forall a. a -> a -> a (!!) (_ :: [[Integer] -> Integer]) (_ :: Int) - where (!!) :: forall a. [a] -> Int -> a + where (!!) :: forall a. + GHC.Stack.Types.HasCallStack => + [a] -> Int -> a fst (_ :: ([Integer] -> Integer, b0)) where fst :: forall a b. (a, b) -> a snd (_ :: (a0, [Integer] -> Integer)) @@ -204,9 +206,9 @@ abstract_refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] id (_ :: t0 -> Integer -> [Integer] -> Integer) (_ :: t0) where id :: forall a. a -> a head (_ :: [t0 -> Integer -> [Integer] -> Integer]) (_ :: t0) - where head :: forall a. [a] -> a + where head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a last (_ :: [t0 -> Integer -> [Integer] -> Integer]) (_ :: t0) - where last :: forall a. [a] -> a + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a fst (_ :: (t0 -> Integer -> [Integer] -> Integer, b2)) (_ :: t0) where fst :: forall a b. (a, b) -> a snd (_ :: (a2, t0 -> Integer -> [Integer] -> Integer)) (_ :: t0) @@ -214,14 +216,16 @@ abstract_refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] id (_ :: Integer -> [Integer] -> Integer) where id :: forall a. a -> a head (_ :: [Integer -> [Integer] -> Integer]) - where head :: forall a. [a] -> a + where head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a last (_ :: [Integer -> [Integer] -> Integer]) - where last :: forall a. [a] -> a + where last :: forall a. GHC.Stack.Types.HasCallStack => [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 + where (!!) :: forall a. + GHC.Stack.Types.HasCallStack => + [a] -> Int -> a fst (_ :: (Integer -> [Integer] -> Integer, b0)) where fst :: forall a b. (a, b) -> a snd (_ :: (a0, Integer -> [Integer] -> Integer)) diff --git a/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr index 3cc66588f0..5696a16781 100644 --- a/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr +++ b/testsuite/tests/typecheck/should_compile/constraint_hole_fits.stderr @@ -11,8 +11,8 @@ constraint_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] 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 + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a maximum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a minimum :: forall (t :: * -> *) a. (Foldable t, Ord a) => t a -> a Valid refinement hole fits include @@ -45,10 +45,12 @@ constraint_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] id (_ :: [a] -> a) where id :: forall a. a -> a head (_ :: [[a] -> a]) - where head :: forall a. [a] -> a + where head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a last (_ :: [[a] -> a]) - where last :: forall a. [a] -> a + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a asTypeOf (_ :: [a] -> a) (_ :: [a] -> a) where asTypeOf :: forall a. a -> a -> a (!!) (_ :: [[a] -> a]) (_ :: Int) - where (!!) :: forall a. [a] -> Int -> a + where (!!) :: forall a. + GHC.Stack.Types.HasCallStack => + [a] -> Int -> a diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr index 1e19fa85ba..cde126e969 100644 --- a/testsuite/tests/typecheck/should_compile/holes.stderr +++ b/testsuite/tests/typecheck/should_compile/holes.stderr @@ -95,15 +95,15 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)] 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 + (!!) :: forall a. GHC.Stack.Types.HasCallStack => [a] -> Int -> a break :: forall a. (a -> Bool) -> [a] -> ([a], [a]) - cycle :: forall a. [a] -> [a] + cycle :: forall a. GHC.Stack.Types.HasCallStack => [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] + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a + init :: forall a. GHC.Stack.Types.HasCallStack => [a] -> [a] iterate :: forall a. (a -> a) -> a -> [a] - last :: forall a. [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a repeat :: forall a. a -> [a] replicate :: forall a. Int -> a -> [a] reverse :: forall a. [a] -> [a] @@ -111,7 +111,7 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)] 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] + tail :: forall a. GHC.Stack.Types.HasCallStack => [a] -> [a] take :: forall a. Int -> [a] -> [a] takeWhile :: forall a. (a -> Bool) -> [a] -> [a] subtract :: forall a. Num a => a -> a -> a diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr index 448f89009e..4dec2c57a5 100644 --- a/testsuite/tests/typecheck/should_compile/holes3.stderr +++ b/testsuite/tests/typecheck/should_compile/holes3.stderr @@ -98,15 +98,15 @@ holes3.hs:11:15: error: 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 + (!!) :: forall a. GHC.Stack.Types.HasCallStack => [a] -> Int -> a break :: forall a. (a -> Bool) -> [a] -> ([a], [a]) - cycle :: forall a. [a] -> [a] + cycle :: forall a. GHC.Stack.Types.HasCallStack => [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] + head :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a + init :: forall a. GHC.Stack.Types.HasCallStack => [a] -> [a] iterate :: forall a. (a -> a) -> a -> [a] - last :: forall a. [a] -> a + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a repeat :: forall a. a -> [a] replicate :: forall a. Int -> a -> [a] reverse :: forall a. [a] -> [a] @@ -114,7 +114,7 @@ holes3.hs:11:15: error: 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] + tail :: forall a. GHC.Stack.Types.HasCallStack => [a] -> [a] take :: forall a. Int -> [a] -> [a] takeWhile :: forall a. (a -> Bool) -> [a] -> [a] subtract :: forall a. Num a => a -> a -> a diff --git a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr index 80249908b8..6084e6aa0f 100644 --- a/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr +++ b/testsuite/tests/typecheck/should_compile/refinement_hole_fits.stderr @@ -7,11 +7,11 @@ refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] 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 + head :: forall a. GHC.Stack.Types.HasCallStack => [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 + last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a with last @Integer (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) @@ -95,12 +95,12 @@ refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] (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 + where head :: forall a. GHC.Stack.Types.HasCallStack => [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 + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a with last @([Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) @@ -110,7 +110,9 @@ refinement_hole_fits.hs:4:5: warning: [-Wtyped-holes (in -Wdefault)] (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 + where (!!) :: forall a. + GHC.Stack.Types.HasCallStack => + [a] -> Int -> a with (!!) @([Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) @@ -194,12 +196,12 @@ refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] (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 + where head :: forall a. GHC.Stack.Types.HasCallStack => [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 + where last :: forall a. GHC.Stack.Types.HasCallStack => [a] -> a with last @(Integer -> [Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) @@ -210,7 +212,9 @@ refinement_hole_fits.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)] (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 + where (!!) :: forall a. + GHC.Stack.Types.HasCallStack => + [a] -> Int -> a with (!!) @(Integer -> [Integer] -> Integer) (imported from ‘Prelude’ at refinement_hole_fits.hs:1:8-30 (and originally defined in ‘GHC.List’)) |