Commit 00e1fc1b authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Modify a couple of error messages slightly

In particular
  In the type signature for:
     f :: Int -> Int
I added the colon

Also reword the "maybe you haven't applied a function to enough arguments?"
suggestion to make grammatical sense.

These tiny changes affect a lot of error messages.
parent f17992a4
......@@ -1252,7 +1252,7 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
= ptext (sLit "No instance for")
<+> pprParendType pred
$$ if type_has_arrow pred
then nest 2 $ ptext (sLit "(maybe you haven't applied enough arguments to a function?)")
then nest 2 $ ptext (sLit "(maybe you haven't applied a function to enough arguments?)")
else empty
| otherwise
......
......@@ -1932,35 +1932,21 @@ instance Outputable SkolemInfo where
pprSkolInfo :: SkolemInfo -> SDoc
-- Complete the sentence "is a rigid type variable bound by..."
pprSkolInfo (SigSkol (FunSigCtxt f) ty)
= hang (ptext (sLit "the type signature for"))
2 (pprPrefixOcc f <+> dcolon <+> ppr ty)
pprSkolInfo (SigSkol cx ty) = hang (pprUserTypeCtxt cx <> colon)
2 (ppr ty)
pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for")
<+> pprWithCommas ppr ips
pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls)
pprSkolInfo InstSkol = ptext (sLit "the instance declaration")
pprSkolInfo DataSkol = ptext (sLit "the data type declaration")
pprSkolInfo FamInstSkol = ptext (sLit "the family instance declaration")
pprSkolInfo BracketSkol = ptext (sLit "a Template Haskell bracket")
pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> doubleQuotes (ftext name)
pprSkolInfo ArrowSkol = ptext (sLit "the arrow form")
pprSkolInfo (PatSkol cl mc) = case cl of
RealDataCon dc -> sep [ ptext (sLit "a pattern with constructor")
, nest 2 $ ppr dc <+> dcolon
<+> pprType (dataConUserType dc) <> comma
-- pprType prints forall's regardless of -fprint-explict-foralls
-- which is what we want here, since we might be saying
-- type variable 't' is bound by ...
, ptext (sLit "in") <+> pprMatchContext mc ]
PatSynCon ps -> sep [ ptext (sLit "a pattern with pattern synonym")
, nest 2 $ ppr ps <+> dcolon
<+> pprType (patSynType ps) <> comma
, ptext (sLit "in") <+> pprMatchContext mc ]
pprSkolInfo (InferSkol ids) = sep [ ptext (sLit "the inferred type of")
, vcat [ ppr name <+> dcolon <+> ppr ty
| (name,ty) <- ids ]]
pprSkolInfo (SigSkol ctxt ty) = pprSigSkolInfo ctxt ty
pprSkolInfo (IPSkol ips) = ptext (sLit "the implicit-parameter binding") <> plural ips <+> ptext (sLit "for")
<+> pprWithCommas ppr ips
pprSkolInfo (ClsSkol cls) = ptext (sLit "the class declaration for") <+> quotes (ppr cls)
pprSkolInfo InstSkol = ptext (sLit "the instance declaration")
pprSkolInfo DataSkol = ptext (sLit "a data type declaration")
pprSkolInfo FamInstSkol = ptext (sLit "a family instance declaration")
pprSkolInfo BracketSkol = ptext (sLit "a Template Haskell bracket")
pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> doubleQuotes (ftext name)
pprSkolInfo ArrowSkol = ptext (sLit "an arrow form")
pprSkolInfo (PatSkol cl mc) = sep [ pprPatSkolInfo cl
, ptext (sLit "in") <+> pprMatchContext mc ]
pprSkolInfo (InferSkol ids) = sep [ ptext (sLit "the inferred type of")
, vcat [ ppr name <+> dcolon <+> ppr ty
| (name,ty) <- ids ]]
pprSkolInfo (UnifyForAllSkol tvs ty) = ptext (sLit "the type") <+> ppr (mkForAllTys tvs ty)
-- UnkSkol
......@@ -1968,6 +1954,30 @@ pprSkolInfo (UnifyForAllSkol tvs ty) = ptext (sLit "the type") <+> ppr (mkForAll
-- For Insts, these cases should not happen
pprSkolInfo UnkSkol = WARN( True, text "pprSkolInfo: UnkSkol" ) ptext (sLit "UnkSkol")
pprSigSkolInfo :: UserTypeCtxt -> Type -> SDoc
pprSigSkolInfo ctxt ty
= case ctxt of
FunSigCtxt f _ -> pp_sig f
_ -> hang (pprUserTypeCtxt ctxt <> colon)
2 (ppr ty)
where
pp_sig f = sep [ ptext (sLit "the type signature for:")
, pprPrefixOcc f <+> dcolon <+> ppr ty ]
pprPatSkolInfo :: ConLike -> SDoc
pprPatSkolInfo (RealDataCon dc)
= sep [ ptext (sLit "a pattern with constructor:")
, nest 2 $ ppr dc <+> dcolon
<+> pprType (dataConUserType dc) <> comma ]
-- pprType prints forall's regardless of -fprint-explict-foralls
-- which is what we want here, since we might be saying
-- type variable 't' is bound by ...
pprPatSkolInfo (PatSynCon ps)
= sep [ ptext (sLit "a pattern with pattern synonym:")
, nest 2 $ ppr ps <+> dcolon
<+> pprType (patSynType ps) <> comma ]
{-
************************************************************************
* *
......
annfail08.hs:9:1:
No instance for (Data.Data.Data (a0 -> a0))
(maybe you haven't applied enough arguments to a function?)
arising from an annotation
In the annotation: {-# ANN f (id + 1) #-}
annfail08.hs:9:15:
No instance for (Num (a0 -> a0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘+’
In the annotation: {-# ANN f (id + 1) #-}
annfail08.hs:9:1:
No instance for (Data.Data.Data (a0 -> a0))
(maybe you haven't applied a function to enough arguments?)
arising from an annotation
In the annotation: {-# ANN f (id + 1) #-}
annfail08.hs:9:15:
No instance for (Num (a0 -> a0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘+’
In the annotation: {-# ANN f (id + 1) #-}
......@@ -2,8 +2,8 @@
T5380.hs:7:27:
Couldn't match expected type ‘Bool’ with actual type ‘not_bool’
‘not_bool’ is a rigid type variable bound by
the type signature for
testB :: not_bool -> (() -> ()) -> () -> not_unit
the type signature for:
testB :: not_bool -> (() -> ()) -> () -> not_unit
at T5380.hs:6:10
Relevant bindings include
b :: not_bool (bound at T5380.hs:7:7)
......@@ -15,8 +15,8 @@ T5380.hs:7:27:
T5380.hs:7:34:
Couldn't match type ‘not_unit’ with ‘()’
‘not_unit’ is a rigid type variable bound by
the type signature for
testB :: not_bool -> (() -> ()) -> () -> not_unit
the type signature for:
testB :: not_bool -> (() -> ()) -> () -> not_unit
at T5380.hs:6:10
Expected type: () -> not_unit
Actual type: () -> ()
......
drvfail007.hs:4:38:
No instance for (Eq (Int -> Int))
(maybe you haven't applied enough arguments to a function?)
arising from the first field of ‘Foo’ (type ‘Int -> Int’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq Foo)
drvfail007.hs:4:38:
No instance for (Eq (Int -> Int))
(maybe you haven't applied a function to enough arguments?)
arising from the first field of ‘Foo’ (type ‘Int -> Int’)
Possible fix:
use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq Foo)
T2182.hs:5:5:
No instance for (Show (t1 -> t1))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘show’
In the expression: show (\ x -> x)
In an equation for ‘y’: y = show (\ x -> x)
T2182.hs:6:15:
No instance for (Eq (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘==’
In the expression: (\ x -> x) == (\ y -> y)
In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
T2182.hs:5:5:
No instance for (Show (t1 -> t1))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘show’
In the expression: show (\ x -> x)
In an equation for ‘y’: y = show (\ x -> x)
T2182.hs:6:15:
No instance for (Eq (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘==’
In the expression: (\ x -> x) == (\ y -> y)
In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
T2182.hs:5:5:
No instance for (Show (t1 -> t1))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘show’
In the expression: show (\ x -> x)
In an equation for ‘y’: y = show (\ x -> x)
T2182.hs:6:15:
No instance for (Eq (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘==’
In the expression: (\ x -> x) == (\ y -> y)
In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
T2182.hs:5:5:
No instance for (Show (t1 -> t1))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘show’
In the expression: show (\ x -> x)
In an equation for ‘y’: y = show (\ x -> x)
T2182.hs:6:15:
No instance for (Eq (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘==’
In the expression: (\ x -> x) == (\ y -> y)
In an equation for ‘z’: z = (\ x -> x) == (\ y -> y)
......@@ -2,8 +2,8 @@
T3169.hs:13:22:
Couldn't match type ‘elt’ with ‘Map b elt’
‘elt’ is a rigid type variable bound by
the type signature for
lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
the type signature for:
lookup :: (a, b) -> Map (a, b) elt -> Maybe elt
at T3169.hs:12:3
Expected type: Map a (Map b elt)
Actual type: Map (a, b) elt
......
......@@ -2,20 +2,20 @@
T3651.hs:11:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
a pattern with constructor U :: Z (), in an equation for ‘unsafe1’
a pattern with constructor: U :: Z (), in an equation for ‘unsafe1’
In the pattern: U
In an equation for ‘unsafe1’: unsafe1 B U = ()
T3651.hs:14:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
a pattern with constructor U :: Z (), in an equation for ‘unsafe2’
a pattern with constructor: U :: Z (), in an equation for ‘unsafe2’
In the pattern: U
In an equation for ‘unsafe2’: unsafe2 B U = ()
T3651.hs:17:11:
Couldn't match type ‘Bool’ with ‘()’
Inaccessible code in
a pattern with constructor U :: Z (), in an equation for ‘unsafe3’
a pattern with constructor: U :: Z (), in an equation for ‘unsafe3’
In the pattern: U
In an equation for ‘unsafe3’: unsafe3 B U = True
T7293.hs:24:5:
Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
T7293.hs:24:5:
Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor: Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
T7294.hs:25:5: Warning:
Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor
Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
T7294.hs:25:5: Warning:
Couldn't match type ‘'True’ with ‘'False’
Inaccessible code in
a pattern with constructor: Nil :: forall a. Vec a 'Zero,
in an equation for ‘nth’
In the pattern: Nil
In an equation for ‘nth’: nth Nil _ = undefined
T7558.hs:8:4:
Couldn't match type ‘a’ with ‘Maybe a’
‘a’ is a rigid type variable bound by
the type signature for f :: T a a -> Bool at T7558.hs:7:6
Inaccessible code in
a pattern with constructor
MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
in an equation for ‘f’
Relevant bindings include
f :: T a a -> Bool (bound at T7558.hs:8:1)
In the pattern: MkT x y
In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True
T7558.hs:8:4:
Couldn't match type ‘a’ with ‘Maybe a’
‘a’ is a rigid type variable bound by
the type signature for: f :: T a a -> Bool at T7558.hs:7:6
Inaccessible code in
a pattern with constructor:
MkT :: forall a b. (a ~ Maybe b) => a -> Maybe b -> T a b,
in an equation for ‘f’
Relevant bindings include
f :: T a a -> Bool (bound at T7558.hs:8:1)
In the pattern: MkT x y
In an equation for ‘f’: f (MkT x y) = [x, y] `seq` True
gadt-escape1.hs:19:58:
Couldn't match type ‘t’ with ‘ExpGADT Int’
‘t’ is untouchable
inside the constraints (t1 ~ Int)
bound by a pattern with constructor
ExpInt :: Int -> ExpGADT Int,
in a case alternative
at gadt-escape1.hs:19:43-50
‘t’ is a rigid type variable bound by
the inferred type of weird1 :: t at gadt-escape1.hs:19:1
Possible fix: add a type signature for ‘weird1’
Expected type: t
Actual type: ExpGADT t1
Relevant bindings include
weird1 :: t (bound at gadt-escape1.hs:19:1)
In the expression: a
In a case alternative: Hidden (ExpInt _) a -> a
gadt-escape1.hs:19:58:
Couldn't match type ‘t’ with ‘ExpGADT Int’
‘t’ is untouchable
inside the constraints (t1 ~ Int)
bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int,
in a case alternative
at gadt-escape1.hs:19:43-50
‘t’ is a rigid type variable bound by
the inferred type of weird1 :: t at gadt-escape1.hs:19:1
Possible fix: add a type signature for ‘weird1’
Expected type: t
Actual type: ExpGADT t1
Relevant bindings include
weird1 :: t (bound at gadt-escape1.hs:19:1)
In the expression: a
In a case alternative: Hidden (ExpInt _) a -> a
gadt13.hs:15:13:
Couldn't match expected type ‘t’
with actual type ‘String -> [Char]’
‘t’ is untouchable
inside the constraints (t1 ~ Int)
bound by a pattern with constructor
I :: Int -> Term Int,
in an equation for ‘shw’
at gadt13.hs:15:6-8
‘t’ is a rigid type variable bound by
the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1
Possible fix: add a type signature for ‘shw’
Relevant bindings include
shw :: Term t1 -> t (bound at gadt13.hs:15:1)
In the expression: ("I " ++) . shows t
In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
gadt13.hs:15:13:
Couldn't match expected type ‘t’
with actual type ‘String -> [Char]’
‘t’ is untouchable
inside the constraints (t1 ~ Int)
bound by a pattern with constructor: I :: Int -> Term Int,
in an equation for ‘shw’
at gadt13.hs:15:6-8
‘t’ is a rigid type variable bound by
the inferred type of shw :: Term t1 -> t at gadt13.hs:15:1
Possible fix: add a type signature for ‘shw’
Relevant bindings include
shw :: Term t1 -> t (bound at gadt13.hs:15:1)
In the expression: ("I " ++) . shows t
In an equation for ‘shw’: shw (I t) = ("I " ++) . shows t
......@@ -2,7 +2,7 @@
gadt21.hs:21:60:
Could not deduce (Ord a1) arising from a use of ‘f’
from the context (a ~ Set a1)
bound by a pattern with constructor
bound by a pattern with constructor:
TypeSet :: forall a. Type a -> Type (Set a),
in an equation for ‘withOrdDynExpr’
at gadt21.hs:21:35-43
......
gadt7.hs:16:38:
Couldn't match expected type ‘t’ with actual type ‘t1’
‘t1’ is untouchable
inside the constraints (t2 ~ Int)
bound by a pattern with constructor
K :: T Int,
in a case alternative
at gadt7.hs:16:33
‘t1’ is a rigid type variable bound by
the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
‘t’ is a rigid type variable bound by
the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
Possible fix: add a type signature for ‘i1b’
Relevant bindings include
y1 :: t1 (bound at gadt7.hs:16:16)
y :: t1 (bound at gadt7.hs:16:7)
i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1)
In the expression: y1
In a case alternative: K -> y1
gadt7.hs:16:38:
Couldn't match expected type ‘t’ with actual type ‘t1’
‘t1’ is untouchable
inside the constraints (t2 ~ Int)
bound by a pattern with constructor: K :: T Int,
in a case alternative
at gadt7.hs:16:33
‘t1’ is a rigid type variable bound by
the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
‘t’ is a rigid type variable bound by
the inferred type of i1b :: T t2 -> t1 -> t at gadt7.hs:16:1
Possible fix: add a type signature for ‘i1b’
Relevant bindings include
y1 :: t1 (bound at gadt7.hs:16:16)
y :: t1 (bound at gadt7.hs:16:7)
i1b :: T t2 -> t1 -> t (bound at gadt7.hs:16:1)
In the expression: y1
In a case alternative: K -> y1
......@@ -2,7 +2,7 @@
rw.hs:14:47:
Couldn't match expected type ‘a’ with actual type ‘Int’
‘a’ is a rigid type variable bound by
the type signature for writeInt :: T a -> IORef a -> IO ()
the type signature for: writeInt :: T a -> IORef a -> IO ()
at rw.hs:12:12
Relevant bindings include
ref :: IORef a (bound at rw.hs:13:12)
......@@ -15,7 +15,7 @@ rw.hs:14:47:
rw.hs:19:51:
Couldn't match type ‘a’ with ‘Bool’
‘a’ is a rigid type variable bound by
the type signature for readBool :: T a -> IORef a -> IO ()
the type signature for: readBool :: T a -> IORef a -> IO ()
at rw.hs:16:12
Expected type: a -> Bool
Actual type: Bool -> Bool
......
<interactive>:5:1:
No instance for (Show (t -> t1))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:5:1:
No instance for (Show (t -> t1))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
......@@ -20,15 +20,14 @@
../../typecheck/should_run/Defer01.hs:25:4: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
a pattern with constructor
C2 :: Bool -> C Bool,
a pattern with constructor: C2 :: Bool -> C Bool,
in an equation for ‘c’
In the pattern: C2 x
In an equation for ‘c’: c (C2 x) = True
../../typecheck/should_run/Defer01.hs:28:5: Warning:
No instance for (Num (a -> a))
(maybe you haven't applied enough arguments to a function?)
(maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
......@@ -45,7 +44,7 @@
../../typecheck/should_run/Defer01.hs:34:8: Warning:
Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
the type signature for h :: a -> (Char, Char)
the type signature for: h :: a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
......@@ -82,7 +81,7 @@
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for k :: (Int ~ Bool) => Int -> Bool
the type signature for: k :: (Int ~ Bool) => Int -> Bool
In the ambiguity check for the type signature for ‘k’:
k :: (Int ~ Bool) => Int -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
......@@ -98,7 +97,7 @@
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for k :: (Int ~ Bool) => Int -> Bool
the type signature for: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:46:7: Warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
......@@ -138,7 +137,7 @@
In the first argument of ‘print’, namely ‘(c (C2 True))’
*** Exception: ../../typecheck/should_run/Defer01.hs:28:5:
No instance for (Num (a -> a))
(maybe you haven't applied enough arguments to a function?)
(maybe you haven't applied a function to enough arguments?)
arising from the literal ‘1’
In the expression: 1
In an equation for ‘d’: d = 1
......@@ -155,7 +154,7 @@
*** Exception: ../../typecheck/should_run/Defer01.hs:34:8:
Couldn't match expected type ‘Char’ with actual type ‘a’
‘a’ is a rigid type variable bound by
the type signature for h :: a -> (Char, Char)
the type signature for: h :: a -> (Char, Char)
at ../../typecheck/should_run/Defer01.hs:33:6
Relevant bindings include
x :: a (bound at ../../typecheck/should_run/Defer01.hs:34:3)
......
<interactive>:3:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:11:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:20:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:29:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:50:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied enough arguments to a function?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:3:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:11:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:20:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:29:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
<interactive>:50:1:
No instance for (Show (t0 -> t0))
(maybe you haven't applied a function to enough arguments?)
arising from a use of ‘print’
In a stmt of an interactive GHCi command: print it
......@@ -3,7 +3,7 @@ PushedInAsGivens.hs:10:31:
Couldn't match expected type ‘a1’ with actual type ‘a’
because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type signature for foo :: (F Int ~ [a1]) => a1 -> Int
the type signature for: foo :: (F Int ~ [a1]) => a1 -> Int
at PushedInAsGivens.hs:9:20-44
Relevant bindings include
x :: a1 (bound at PushedInAsGivens.hs:10:17)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment