Commit eaccc721 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Wibbles (usually improvements) to error messages

parent 1b6988e7
T5287.hs:6:10:
Could not deduce (A a oops0)
arising from the ambiguity check for an instance declaration
from the context (A a oops)
bound by an instance declaration: A a oops => Read (D a)
at T5287.hs:6:10-31
The type variable ‘oops0’ is ambiguous
In the ambiguity check for: forall a oops. A a oops => Read (D a)
In the ambiguity check for an instance declaration:
forall a oops. A a oops => Read (D a)
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the instance declaration for ‘Read (D a)’
......@@ -83,13 +83,15 @@
Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
the type signature for k :: (Int ~ Bool) => Int -> Bool
In the ambiguity check for: (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
In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
../../typecheck/should_run/Defer01.hs:45:6: Warning:
Couldn't match expected type ‘Bool’ with actual type ‘Int’
In the ambiguity check for: (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
In the type signature for ‘k’: k :: (Int ~ Bool) => Int -> Bool
......
($$$) :: [b -> c] -> [b] -> [c] -- Defined at <interactive>:2:8
($$$) :: [a -> c] -> [a] -> [c] -- Defined at <interactive>:2:8
......@@ -4,6 +4,7 @@ module Simple14 where
data EQ_ x y = EQ_
-- Nov 2014: actually eqE has an ambiguous type
eqE :: EQ_ x y -> (x~y => EQ_ z z) -> p
eqE = error "eqE"
......
Simple14.hs:17:19:
Couldn't match type ‘z0’ with ‘m
Simple14.hs:8:8:
Couldn't match type ‘z0’ with ‘z
‘z0’ is untouchable
inside the constraints (Maybe m ~ Maybe n)
bound by a type expected by the context:
(Maybe m ~ Maybe n) => EQ_ z0 z0
at Simple14.hs:17:12-33
‘m’ is a rigid type variable bound by
the type signature for foo :: EQ_ (Maybe m) (Maybe n)
at Simple14.hs:16:15
inside the constraints (x ~ y)
bound by the type signature for eqE :: (x ~ y) => EQ_ z0 z0
at Simple14.hs:8:8-39
‘z’ is a rigid type variable bound by
the type signature for eqE :: EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
at Simple14.hs:8:8
Expected type: EQ_ z0 z0
Actual type: EQ_ m n
Relevant bindings include
foo :: EQ_ (Maybe m) (Maybe n) (bound at Simple14.hs:17:1)
In the second argument of ‘eqE’, namely ‘(eqI :: EQ_ m n)’
In the first argument of ‘ntI’, namely ‘(`eqE` (eqI :: EQ_ m n))’
In the expression: ntI (`eqE` (eqI :: EQ_ m n))
Actual type: EQ_ z z
In the ambiguity check for the type signature for ‘eqE’:
eqE :: forall x y z p. EQ_ x y -> ((x ~ y) => EQ_ z z) -> p
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘eqE’:
eqE :: EQ_ x y -> (x ~ y => EQ_ z z) -> p
NoMatchErr.hs:19:7:
Couldn't match type ‘Memo d’ with ‘Memo d0
Couldn't match type ‘Memo d0’ with ‘Memo d
NB: ‘Memo’ is a type function, and may not be injective
The type variable ‘d0’ is ambiguous
Expected type: Memo d a -> Memo d a
Actual type: Memo d0 a -> Memo d0 a
In the ambiguity check for:
forall d a. Fun d => Memo d a -> Memo d a
In the ambiguity check for the type signature for ‘f’:
f :: forall d a. Fun d => Memo d a -> Memo d a
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘f’: f :: (Fun d) => Memo d a -> Memo d a
T1897b.hs:16:1:
Couldn't match type ‘Depend a’ with ‘Depend a0
Couldn't match type ‘Depend a0’ with ‘Depend a
NB: ‘Depend’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
Expected type: t (Depend a) -> Bool
......
......@@ -5,7 +5,8 @@ T1900.hs:13:10:
The type variable ‘s0’ is ambiguous
Expected type: Depend s -> Bool
Actual type: Depend s0 -> Bool
In the ambiguity check for: forall s. Bug s => Depend s -> Bool
In the ambiguity check for the type signature for ‘check’:
check :: forall s. Bug s => Depend s -> Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘check’:
check :: (Bug s) => Depend s -> Bool
T2693.hs:11:7:
Couldn't match expected type ‘TFn a’ with actual type ‘TFn a0’
NB: ‘TFn’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
When checking that ‘x’ has the inferred type
x :: forall a. TFn a
Probable cause: the inferred type is ambiguous
In the expression:
do { let Just x = ...;
let n = fst x + fst x;
return () }
In an equation for ‘f’:
f = do { let Just x = ...;
let n = ...;
return () }
T2693.hs:19:15:
Couldn't match expected type ‘(a5, b0)’ with actual type ‘TFn a2’
The type variables ‘b0’, ‘a2’, ‘a5’ are ambiguous
Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
In the first argument of ‘fst’, namely ‘x’
In the first argument of ‘(+)’, namely ‘fst x’
T2693.hs:19:23:
Couldn't match expected type ‘(a3, a5)’ with actual type ‘TFn a4’
The type variables ‘a3’, ‘a4’, ‘a5’ are ambiguous
Relevant bindings include n :: a5 (bound at T2693.hs:19:7)
In the first argument of ‘snd’, namely ‘x’
In the second argument of ‘(+)’, namely ‘snd x’
T2693.hs:29:20:
Couldn't match type ‘TFn a0’ with ‘PVR a1’
The type variables ‘a0’, ‘a1’ are ambiguous
Expected type: () -> Maybe (PVR a1)
Actual type: () -> Maybe (TFn a0)
In the first argument of ‘mapM’, namely ‘g’
In a stmt of a 'do' block: pvs <- mapM g undefined
T2693.hs:11:7:
Couldn't match expected type ‘TFn a’ with actual type ‘TFn a0’
NB: ‘TFn’ is a type function, and may not be injective
The type variable ‘a0’ is ambiguous
When checking that ‘x’ has the inferred type
x :: forall a. TFn a
Probable cause: the inferred type is ambiguous
In the expression:
do { let Just x = ...;
let n = fst x + fst x;
return () }
In an equation for ‘f’:
f = do { let Just x = ...;
let n = ...;
return () }
T2693.hs:19:15:
Couldn't match expected type ‘(a2, b0)’ with actual type ‘TFn a3’
The type variables ‘a2’, ‘b0’, ‘a3’ are ambiguous
Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
In the first argument of ‘fst’, namely ‘x’
In the first argument of ‘(+)’, namely ‘fst x’
T2693.hs:19:23:
Couldn't match expected type ‘(a4, a2)’ with actual type ‘TFn a5’
The type variables ‘a2’, ‘a4’, ‘a5’ are ambiguous
Relevant bindings include n :: a2 (bound at T2693.hs:19:7)
In the first argument of ‘snd’, namely ‘x’
In the second argument of ‘(+)’, namely ‘snd x’
T2693.hs:29:20:
Couldn't match type ‘TFn a0’ with ‘PVR a1’
The type variables ‘a0’, ‘a1’ are ambiguous
Expected type: () -> Maybe (PVR a1)
Actual type: () -> Maybe (TFn a0)
In the first argument of ‘mapM’, namely ‘g’
In a stmt of a 'do' block: pvs <- mapM g undefined
......@@ -5,7 +5,8 @@ T4093a.hs:7:9:
bound by the type signature for hang :: (Foo e ~ Maybe e) => Foo e
at T4093a.hs:7:9-34
The type variable ‘e0’ is ambiguous
In the ambiguity check for: forall e. (Foo e ~ Maybe e) => Foo e
In the ambiguity check for the type signature for ‘hang’:
hang :: forall e. (Foo e ~ Maybe e) => Foo e
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘hang’:
hang :: (Foo e ~ Maybe e) => Foo e
T9036.hs:17:17:
Couldn't match type ‘Curried t [t]’ with ‘Curried t0 [t0]
NB: ‘Curried’ is a type function, and may not be injective
Couldn't match type ‘GetMonad t0’ with ‘GetMonad t
NB: ‘GetMonad’ is a type function, and may not be injective
The type variable ‘t0’ is ambiguous
Expected type: Maybe (GetMonad t after) -> Curried t [t]
Actual type: Maybe (GetMonad t0 after) -> Curried t0 [t0]
In the ambiguity check for:
forall t after. Maybe (GetMonad t after) -> Curried t [t]
In the ambiguity check for the type signature for ‘simpleLogger’:
simpleLogger :: forall t after.
Maybe (GetMonad t after) -> Curried t [t]
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘simpleLogger’:
simpleLogger :: Maybe (GetMonad t after) -> t `Curried` [t]
T9171.hs:10:1:
Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
with actual type ‘GetParam Base (GetParam Base Int)’
NB: ‘GetParam’ is a type function, and may not be injective
The kind variable ‘k0’ is ambiguous
Use -fprint-explicit-kinds to see the kind arguments
When checking that ‘foo’ has the inferred type
foo :: forall (k :: BOX). GetParam Base (GetParam Base Int)
Probable cause: the inferred type is ambiguous
T9171.hs:10:20:
Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
with actual type ‘GetParam Base (GetParam Base Int)’
NB: ‘GetParam’ is a type function, and may not be injective
The kind variable ‘k0’ is ambiguous
Use -fprint-explicit-kinds to see the kind arguments
In the ambiguity check for:
forall (k :: BOX). GetParam Base (GetParam Base Int)
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In an expression type signature: GetParam Base (GetParam Base Int)
In the expression: undefined :: GetParam Base (GetParam Base Int)
T9171.hs:10:1:
Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
with actual type ‘GetParam Base (GetParam Base Int)’
NB: ‘GetParam’ is a type function, and may not be injective
The kind variable ‘k0’ is ambiguous
Use -fprint-explicit-kinds to see the kind arguments
When checking that ‘foo’ has the inferred type
foo :: forall (k :: BOX). GetParam Base (GetParam Base Int)
Probable cause: the inferred type is ambiguous
T9171.hs:10:20:
Couldn't match expected type ‘GetParam Base (GetParam Base Int)’
with actual type ‘GetParam Base (GetParam Base Int)’
NB: ‘GetParam’ is a type function, and may not be injective
The kind variable ‘k0’ is ambiguous
Use -fprint-explicit-kinds to see the kind arguments
In the ambiguity check for an expression type signature:
forall (k :: BOX). GetParam Base (GetParam Base Int)
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In an expression type signature: GetParam Base (GetParam Base Int)
In the expression: undefined :: GetParam Base (GetParam Base Int)
T7848.hs:6:57:
Occurs check: cannot construct the infinite type:
t2 ~ t0 -> t -> t1 -> A -> A -> A -> A -> t2
Relevant bindings include
y :: forall t3. t3 -> t -> t1 -> A -> A -> A -> A -> t2
(bound at T7848.hs:8:9)
(&) :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:11:9)
z :: t1 (bound at T7848.hs:6:12)
(&) :: t1 (bound at T7848.hs:6:8)
(+) :: t (bound at T7848.hs:6:3)
x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
In the expression: y
In an equation for ‘x’:
x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
= y
where
infixl 3 `y`
y _ = (&)
{-# INLINE (&) #-}
{-# SPECIALIZE (&) :: a #-}
(&) = x
T7848.hs:10:9:
Couldn't match expected type ‘forall a. a’
with actual type ‘t -> t1 -> A -> A -> A -> A -> t2’
Couldn't match type ‘a’ with ‘t -> t1 -> A -> A -> A -> A -> t2’
‘a’ is a rigid type variable bound by
the type signature for (&) :: a at T7848.hs:10:9
Expected type: forall a. a
Actual type: t -> t1 -> A -> A -> A -> A -> t2
Relevant bindings include
z :: t1 (bound at T7848.hs:6:12)
(&) :: t1 (bound at T7848.hs:6:8)
(+) :: t (bound at T7848.hs:6:3)
x :: t -> t1 -> A -> A -> A -> A -> t2 (bound at T7848.hs:6:1)
When checking that: t -> t1 -> A -> A -> A -> A -> t2
is more polymorphic than: forall a. a
In the SPECIALISE pragma {-# SPECIALIZE (&) :: a #-}
In an equation for ‘x’:
x (+) ((&)@z) ((:&&) a b) (c :&& d) (e `A` f) (A g h)
......
......@@ -157,5 +157,6 @@ T5837.hs:8:6:
(TF
(TF
Int)))))))))))))))))))))))))))))))))))))))))))))))))))
In the ambiguity check for: forall a. (a ~ TF (a, Int)) => Int
In the ambiguity check for the type signature for ‘t’:
t :: forall a. (a ~ TF (a, Int)) => Int
In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
T2494.hs:15:14:
Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
Relevant bindings include
f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
(bound at T2494.hs:13:11)
g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
(bound at T2494.hs:14:11)
x :: Maybe a (bound at T2494.hs:14:65)
In the first argument of ‘foo’, namely ‘g’
In the second argument of ‘foo’, namely ‘(foo g x)’
T2494.hs:15:30:
Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
Relevant bindings include
f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
(bound at T2494.hs:13:11)
g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
(bound at T2494.hs:14:11)
x :: Maybe a (bound at T2494.hs:14:65)
In the second argument of ‘(.)’, namely ‘g’
In the first argument of ‘foo’, namely ‘(f . g)’
T2494.hs:15:14:
Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
Relevant bindings include
f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
(bound at T2494.hs:13:11)
g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
(bound at T2494.hs:14:11)
x :: Maybe a (bound at T2494.hs:14:65)
In the first argument of ‘foo’, namely ‘g’
In the second argument of ‘foo’, namely ‘(foo g x)’
T2494.hs:15:30:
Couldn't match type ‘b’ with ‘a’
‘b’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:14:16
‘a’ is a rigid type variable bound by
the RULE "foo/foo" at T2494.hs:13:16
Expected type: Maybe (m a) -> Maybe (m a)
Actual type: Maybe (m b) -> Maybe (m b)
Relevant bindings include
f :: forall (m :: * -> *). Monad m => Maybe (m a) -> Maybe (m a)
(bound at T2494.hs:13:11)
g :: forall (m :: * -> *). Monad m => Maybe (m b) -> Maybe (m b)
(bound at T2494.hs:14:11)
x :: Maybe a (bound at T2494.hs:14:65)
In the second argument of ‘(.)’, namely ‘g’
In the first argument of ‘foo’, namely ‘(f . g)’
......@@ -7,4 +7,4 @@ type Foo a b = () -> (Bar a => a)
class Bar a where {}
foo :: Foo a b
foo = id (undefined :: Foo a b)
foo = id (undefined :: Foo p q)
T9708.hs:9:8:
Could not deduce (SomeFun x ~ SomeFun y)
from the context (x <= y, y <= x)
bound by the type signature for
ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
at T9708.hs:9:8-61
NB: ‘SomeFun’ is a type function, and may not be injective
Expected type: Proxy (SomeFun x) -> Proxy y -> ()
Actual type: Proxy (SomeFun y) -> Proxy y -> ()
In the ambiguity check for:
forall (x :: Nat) (y :: Nat).
(x <= y, y <= x) =>
Proxy (SomeFun x) -> Proxy y -> ()
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘ti7’:
ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
T9708.hs:9:8:
Could not deduce (SomeFun y ~ SomeFun x)
from the context (x <= y, y <= x)
bound by the type signature for
ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
at T9708.hs:9:8-61
NB: ‘SomeFun’ is a type function, and may not be injective
Expected type: Proxy (SomeFun x) -> Proxy y -> ()
Actual type: Proxy (SomeFun y) -> Proxy y -> ()
In the ambiguity check for the type signature for ‘ti7’:
ti7 :: forall (x :: Nat) (y :: Nat).
(x <= y, y <= x) =>
Proxy (SomeFun x) -> Proxy y -> ()
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘ti7’:
ti7 :: (x <= y, y <= x) => Proxy (SomeFun x) -> Proxy y -> ()
tc168.hs:17:1:
Could not deduce (C a1 (a, b0))
arising from the ambiguity check for ‘g’
from the context (C a1 (a, b))
bound by the inferred type for ‘g’: C a1 (a, b) => a1 -> a
at tc168.hs:17:1-16
The type variable ‘b0’ is ambiguous
When checking that ‘g’ has the inferred type
g :: forall a b a1. C a1 (a, b) => a1 -> a
Probable cause: the inferred type is ambiguous
tc168.hs:17:1:
Could not deduce (C a1 (a, b0))
from the context (C a1 (a, b))
bound by the inferred type for ‘g’: C a1 (a, b) => a1 -> a
at tc168.hs:17:1-16
The type variable ‘b0’ is ambiguous
When checking that ‘g’ has the inferred type
g :: forall a b a1. C a1 (a, b) => a1 -> a
Probable cause: the inferred type is ambiguous
{-# OPTIONS_GHC -XImpredicativeTypes -fno-warn-deprecated-flags -XScopedTypeVariables -XGADTs #-}
-- Nov 2014: impredicative types are very dodgy so I am
-- FAR from confident that these tests give the right errors
-- Here are a bunch of tests for impredicative polymorphism
-- mainly written by Dimitrios
......
tc211.hs:15:22:
Couldn't match type ‘forall a1. a1 -> a1’ with ‘a -> a’
Expected type: [a -> a]
Actual type: [forall a. a -> a]
In the first argument of ‘head’, namely ‘foo’
In the first argument of ‘(:) ::
(forall a. a -> a)
-> [forall a. a -> a] -> [forall a. a -> a]’, namely
‘(head foo)’
tc211.hs:70:9:
Couldn't match type ‘forall a2. a2 -> a2’ with ‘a1 -> a1’
Expected type: List (forall a. a -> a)
-> (forall a. a -> a) -> a1 -> a1
Actual type: List (forall a. a -> a)
-> (forall a. a -> a) -> forall a. a -> a
In the expression:
foo2 ::
List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
In the expression:
(foo2 ::
List (forall a. a -> a)
-> (forall a. a -> a) -> (forall a. a -> a))
xs1 (\ x -> x)
tc211.hs:17:8:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a2 -> a2’
In the expression:
(:) ::
(forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a]
In the expression:
((:) ::
(forall a. a -> a) -> [forall a. a -> a] -> [forall a. a -> a])
(head foo) foo
tc211.hs:18:22:
Couldn't match type ‘forall a3. a3 -> a3’ with ‘a -> a’
Expected type: [a -> a]
Actual type: [forall a. a -> a]
In the first argument of ‘head’, namely ‘foo’
In the first argument of ‘(:) ::
(forall a. a -> a)
-> [forall a. a -> a] -> [forall a. a -> a]’, namely
‘(head foo)’
tc211.hs:59:18:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a1 -> a1’
In the expression:
Cons ::
(forall a. a -> a)
-> List (forall a. a -> a) -> List (forall a. a -> a)
In an equation for ‘cons’:
cons
= Cons ::
(forall a. a -> a)
-> List (forall a. a -> a) -> List (forall a. a -> a)
tc211.hs:65:8:
Couldn't match expected type ‘forall a. a -> a’
with actual type ‘a0 -> a0’
In the expression:
Cons ::
(forall a. a -> a)
-> List (forall a. a -> a) -> List (forall a. a -> a)
In the expression:
(Cons ::
(forall a. a -> a)
-> List (forall a. a -> a) -> List (forall a. a -> a))
(\ x -> x) Nil
tc211.hs:73:9:
Couldn't match type ‘forall a4. a4 -> a4’ with ‘a3 -> a3’
Expected type: List (forall a. a -> a)
-> (forall a. a -> a) -> a3 -> a3
Actual type: List (a3 -> a3) -> (a3 -> a3) -> a3 -> a3
In the expression:
foo2 ::
List (forall a. a -> a) -> (forall a. a -> a) -> (forall a. a -> a)
In the expression:
(foo2 ::
List (forall a. a -> a)
-> (forall a. a -> a) -> (forall a. a -> a))
xs1 (\ x -> x)
......@@ -5,5 +5,6 @@ ContextStack2.hs:8:6:
TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))
~ (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF a)))))))))),
TF (TF (TF (TF (TF (TF (TF (TF (TF (TF (TF Int)))))))))))
In the ambiguity check for: forall a. (a ~ TF (a, Int)) => Int
In the ambiguity check for the type signature for ‘t’:
t :: forall a. (a ~ TF (a, Int)) => Int
In the type signature for ‘t’: t :: (a ~ TF (a, Int)) => Int
T1897a.hs:9:1:
Could not deduce (Wob a0 b)
arising from the ambiguity check for ‘foo’
from the context (Wob a b)
bound by the inferred type for ‘foo’: Wob a b => b -> [b]
at T1897a.hs:9:1-24
The type variable ‘a0’ is ambiguous
When checking that ‘foo’ has the inferred type
foo :: forall a b. Wob a b => b -> [b]
Probable cause: the inferred type is ambiguous
T1897a.hs:9:1:
Could not deduce (Wob a0 b)
from the context (Wob a b)
bound by the inferred type for ‘foo’: Wob a b => b -> [b]
at T1897a.hs:9:1-24
The type variable ‘a0’ is ambiguous
When checking that ‘foo’ has the inferred type
foo :: forall a b. Wob a b => b -> [b]
Probable cause: the inferred type is ambiguous
......@@ -2,6 +2,6 @@
T2414.hs:9:13:
Occurs check: cannot construct the infinite type: b0 ~ (Bool, b0)
Expected type: b0 -> Maybe (Bool, b0)
Actual type: b0 -> Maybe b0
Actual type: (Bool, b0) -> Maybe (Bool, b0)
In the first argument of ‘unfoldr’, namely ‘Just’
In the expression: unfoldr Just
T2534.hs:3:19:
Couldn't match expected type ‘a -> a -> b’ with actual type ‘[t0]’
Relevant bindings include
foo :: a -> a -> b (bound at T2534.hs:3:1)
In the second argument of ‘foldr’, namely ‘[]’
T2534.hs:3:13:
Couldn't match type ‘[b]’ with ‘a0 -> [b]’
Expected type: [a0] -> [b] -> [b]
Actual type: [a0] -> (a0 -> [b]) -> [b]
Relevant bindings include foo :: [b] (bound at T2534.hs:3:1)
In the first argument of ‘foldr’, namely ‘(>>=)’
In the expression: foldr (>>=) [] []
In an equation for ‘foo’: foo = foldr (>>=) [] []
T3592.hs:8:5:
No instance for (Show (T a)) arising from a use of ‘show’
No instance for (Show a) arising from a use of ‘show’
Possible fix:
add (Show a) to the context of
the type signature for f :: T a -> String
In the expression: show
In an equation for ‘f’: f = show
......
......@@ -7,9 +7,7 @@ T3613.hs:14:20:
In the first argument of ‘fooThen’, namely ‘(bar >> undefined)’
T3613.hs:17:24:
Couldn't match type ‘IO’ with ‘Maybe’
Expected type: Maybe ()
Actual type: IO ()
Couldn't match expected type ‘Maybe a0’ with actual type ‘IO ()’
In a stmt of a 'do' block: bar
In the first argument of ‘fooThen’, namely
‘(do { bar;
......
T5236.hs:13:9:
Couldn't match type ‘B’ with ‘A’
arising from a functional dependency between:
constraint ‘Id A B’
arising from the type signature for loop :: Id A B => Bool
instance ‘Id B B’ at T5236.hs:11:10-15
In the ambiguity check for: Id A B => Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘loop’: loop :: Id A B => Bool
T5236.hs:13:9:
Couldn't match type ‘B’ with ‘A’
arising from a functional dependency between:
constraint ‘Id A B’
arising from the type signature for loop :: Id A B => Bool
instance ‘Id B B’ at T5236.hs:11:10-15
In the ambiguity check for the type signature for ‘loop’:
loop :: Id A B => Bool
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘loop’: loop :: Id A B => Bool
T5300.hs:11:7:
Could not deduce (C1 a b c0)
arising from the ambiguity check for ‘f1’
from the context (Monad m, C1 a b c)
bound by the type signature for
f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
at T5300.hs:11:7-50
The type variable ‘c0’ is ambiguous
In the ambiguity check for:
forall a b (m :: * -> *) c.
(Monad m, C1 a b c) =>
a -> StateT (T b) m a
In the ambiguity check for the type signature for ‘f1’:
f1 :: forall a b (m :: * -> *) c.
(Monad m, C1 a b c) =>
a -> StateT (T b) m a
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘f1’:
f1 :: (Monad m, C1 a b c) => a -> StateT (T b) m a
T5300.hs:14:7:
Could not deduce (C2 a2 b2 c20)
arising from the ambiguity check for ‘f2’
from the context (Monad m, C1 a1 b1 c1, C2 a2 b2 c2)
bound by the type signature for
f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
a1 -> StateT (T b2) m a2
at T5300.hs:14:7-69
The type variable ‘c20’ is ambiguous
In the ambiguity check for:
forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
(Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
a1 -> StateT (T b2) m a2
In the ambiguity check for the type signature for ‘f2’:
f2 :: forall a1 b2 (m :: * -> *) a2 b1 c1 c2.
(Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
a1 -> StateT (T b2) m a2
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
In the type signature for ‘f2’:
f2 :: (Monad m, C1 a1 b1 c1, C2 a2 b2 c2) =>
......
T5691.hs:14:9:
Couldn't match type ‘p’ with ‘PrintRuleInterp’
Expected type: PrintRuleInterp a
Actual type: p a
Expected type: p a
Actual type: PrintRuleInterp a
When checking that the pattern signature: p a
fits the type of its context: PrintRuleInterp a
In the pattern: f :: p a
In an equation for ‘test’: test (f :: p a) = MkPRI $ printRule_ f
In the instance declaration for ‘Test PrintRuleInterp’
T5691.hs:15:24:
Couldn't match type ‘p’ with ‘PrintRuleInterp’
......