Commit 0b00c6a0 authored by simonpj's avatar simonpj
Browse files

Massive bunch of changes to track my massive refactoring to the typechecker

parent ca15920e
annfail07.hs:9:17:
Couldn't match expected type `[a]' with actual type `Bool'
Couldn't match expected type `[a0]' with actual type `Bool'
In the first argument of `head', namely `True'
In the expression: (head True)
In the annotation: {-# ANN f (head True) #-}
annfail08.hs:9:1:
No instance for (Data.Data.Data (a -> a))
No instance for (Data.Data.Data (a0 -> a0))
arising from an annotation
Possible fix:
add an instance declaration for (Data.Data.Data (a -> a))
add an instance declaration for (Data.Data.Data (a0 -> a0))
In the expression: (id + 1)
In the annotation: {-# ANN f (id + 1) #-}
annfail08.hs:9:15:
No instance for (Num (a -> a))
arising from a use of `+'
Possible fix: add an instance declaration for (Num (a -> a))
annfail08.hs:9:17:
No instance for (Num (a0 -> a0))
arising from the literal `1'
Possible fix: add an instance declaration for (Num (a0 -> a0))
In the second argument of `(+)', namely `1'
In the expression: (id + 1)
In the annotation: {-# ANN f (id + 1) #-}
annfail10.hs:9:1:
Ambiguous type variable `a' in the constraints:
(Data.Data.Data a) arising from an annotation
at annfail10.hs:9:1-15
(Num a) arising from the literal `1' at annfail10.hs:9:11
annfail10.hs:9:11:
Ambiguous type variable `a0' in the constraints:
(Num a0) arising from the literal `1' at annfail10.hs:9:11
(Data.Data.Data a0) arising from an annotation
at annfail10.hs:9:1-15
Probable fix: add a type signature that fixes these type variable(s)
In the expression: 1
In the annotation: {-# ANN f 1 #-}
......@@ -2,7 +2,8 @@
T2851.hs:9:15:
No instance for (Show (F a))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Show (F a))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Show (F a))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Show (D a))
{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, FunctionalDependencies, FlexibleContexts, UndecidableInstances, StandaloneDeriving #-}
module T3621 where
-- This one is ok, even though the deriving clause mentions 'a'
......@@ -18,6 +18,19 @@ instance Monad (State s) where {}
instance MonadState s (State s) where {}
newtype WrappedState s a = WS { runWS :: State s a }
deriving (Monad, MonadState state)
deriving (Monad, MonadState state)
-- deriving (Monad)
deriving instance (MonadState state (State s))
=> MonadState state (WrappedState s)
-- ASSERT error
-- deriving instance (MonadState state (State s), Monad (WrappedState s))
-- => MonadState s (WrappedState s)
-- We try
-- instance MonadState state (State state a)
-- => MonadState state (WrappedState state a)
--
-- Superclass needs (Monad (WrappedState state a))
T3621.hs:21:22:
Couldn't match type `s' with `state'
`s' is a rigid type variable bound by
the instance declaration at T3621.hs:21:22
`state' is a rigid type variable bound by
the instance declaration at T3621.hs:21:22
arising from the 'deriving' clause of a data type declaration
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
T3621.hs:21:21:
No instance for (MonadState state (State s))
arising from the 'deriving' clause of a data type declaration
Possible fix:
add an instance declaration for (MonadState state (State s))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (MonadState state (WrappedState s))
......@@ -2,17 +2,19 @@
drvfail-foldable-traversable1.hs:9:23:
No instance for (Functor Trivial1)
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Functor Trivial1)
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Functor Trivial1)
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Traversable Trivial1)
drvfail-foldable-traversable1.hs:13:22:
No instance for (Foldable Trivial2)
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Foldable Trivial2)
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Foldable Trivial2)
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Traversable Trivial2)
drvfail-foldable-traversable1.hs:17:22:
......
......@@ -22,7 +22,8 @@ drvfail-functor2.hs:20:14:
drvfail-functor2.hs:26:14:
No instance for (Functor NoFunctor)
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Functor NoFunctor)
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Functor NoFunctor)
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Functor UseNoFunctor)
......@@ -2,7 +2,8 @@
drvfail001.hs:16:33:
No instance for (Show (f (f a)))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Show (f (f a)))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Show (f (f a)))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Show (SM f a))
......@@ -2,7 +2,8 @@
drvfail003.hs:16:56:
No instance for (Show (v (v a)))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Show (v (v a)))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Show (v (v a)))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Show (Square_ v w a))
......@@ -2,7 +2,8 @@
drvfail004.hs:8:12:
No instance for (Eq (Foo a b))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Eq (Foo a b))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Eq (Foo a b))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Ord (Foo a b))
......@@ -2,7 +2,8 @@
drvfail007.hs:4:38:
No instance for (Eq (Int -> Int))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Eq (Int -> Int))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Eq (Int -> Int))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq Foo)
......@@ -2,7 +2,8 @@
drvfail012.hs:5:33:
No instance for (Eq (Ego a))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Eq (Ego a))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Eq (Ego a))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Ord (Ego a))
......@@ -2,15 +2,17 @@
drvfail013.hs:4:70:
No instance for (Eq (m (Maybe a)))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Eq (m (Maybe a)))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Eq (m (Maybe a)))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq (MaybeT m a))
drvfail013.hs:6:70:
No instance for (Eq (m (Maybe a)))
arising from the 'deriving' clause of a data type declaration
Possible fix: add an instance declaration for (Eq (m (Maybe a)))
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
Possible fix:
add an instance declaration for (Eq (m (Maybe a)))
or use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (Eq (MaybeT' m a))
......@@ -2,20 +2,20 @@
T3651.hs:11:11:
Couldn't match type `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', 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 `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', 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 `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', 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
gadt10.hs:6:24:
`RInt' is not applied to enough type arguments
Expected kind `?', but `RInt' has kind `k -> *'
Expected kind `?', but `RInt' has kind `k0 -> *'
In the type `RInt'
In the definition of data constructor `R'
In the data type declaration for `RInt'
gadt21.hs:21:60:
Could not deduce (Ord a1) from the context (a ~ Set a1)
arising from a use of `f'
Could not deduce (Ord a1) arising from a use of `f'
from the context (a ~ Set a1)
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
Possible fix:
add (Ord a1) to the context of
the data constructor `TypeSet'
or the data constructor `DynExpr'
or the type signature for `withOrdDynExpr'
or the type signature for
withOrdDynExpr :: DynExpr
-> (forall a. Ord a => Expr a -> b)
-> Maybe b
In the first argument of `Just', namely `(f e)'
In the expression: Just (f e)
In an equation for `withOrdDynExpr':
......
......@@ -2,7 +2,8 @@
rw.hs:14:47:
Couldn't match type `a' with `Int'
`a' is a rigid type variable bound by
the type signature for `writeInt' at rw.hs:12:14
the type signature for writeInt :: T a -> IORef a -> IO ()
at rw.hs:13:1
In the second argument of `writeIORef', namely `(1 :: Int)'
In the expression: writeIORef ref (1 :: Int)
In a case alternative: ~(Li x) -> writeIORef ref (1 :: Int)
......@@ -10,7 +11,9 @@ 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' at rw.hs:16:14
the type signature for readBool :: T a -> IORef a -> IO ()
at rw.hs:17:1
Expected type: a -> Bool
Actual type: Bool -> Bool
In the second argument of `(.)', namely `not'
In the second argument of `(>>=)', namely `(print . not)'
In the expression: readIORef ref >>= (print . not)
Stopped at break012.hs:(1,1)-(5,18)
_result :: (a1, a2 -> a2, (), a -> a -> a) = _
_result :: (t, a1 -> a1, (), a -> a -> a) = _
Stopped at break012.hs:5:10-18
_result :: (a1, a2 -> a2, (), a -> a -> a) = _
a :: a1 = _
b :: a3 -> a3 = _
_result :: (t, a1 -> a1, (), a -> a -> a) = _
a :: t = _
b :: a2 -> a2 = _
c :: () = _
d :: a -> a -> a = _
a :: a1
b :: a3 -> a3
a :: t
b :: a2 -> a2
c :: ()
d :: a -> a -> a
a = (_t1::a1)
b = (_t2::forall a3. a3 -> a3)
a = (_t1::t)
b = (_t2::forall a2. a2 -> a2)
c = (_t3::())
d = (_t4::a -> a -> a)
......@@ -2,7 +2,7 @@ t = O (_t1::t)
()
t = O ((_t2::a1) : (_t3::[a1]))
()
t = O ((_t4::a11) : (_t5::a11) : (_t6::[a11]))
t = O ((_t4::a2) : (_t5::a2) : (_t6::[a2]))
()
t = O ((_t7::Maybe [a1]) : Just [(_t8::a1),(_t9::a1)] :
(_t10::[Maybe [a1]]))
......
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