Commit b400b605 authored by amosrobinson's avatar amosrobinson

Merge branch 'master' of http://darcs.haskell.org/testsuite

parents 35a209ce 58bac614
......@@ -3,7 +3,7 @@ drvfail011.hs:8:1:
No instance for (Eq a) arising from a use of ‛==’
Possible fix: add (Eq a) to the context of the instance declaration
In the expression: ((a1 == b1))
In an equation for ‛==’: == (T1 a1) (T1 b1) = ((a1 == b1))
In an equation for ‛==’: (==) (T1 a1) (T1 b1) = ((a1 == b1))
When typechecking the code for ‛==’
in a standalone derived instance for ‛Eq (T a)’:
To see the code I am typechecking, use -ddump-deriv
......
T3330c.hs:23:43:
Couldn't match kind ‛*’ with ‛* -> *’
When matching types
Der ((->) x) :: * -> *
R :: (* -> *) -> *
Expected type: Der ((->) x) (f1 x)
Actual type: R f1
In the first argument of ‛plug’, namely ‛rf’
In the first argument of ‛Inl’, namely ‛(plug rf df x)’
In the expression: Inl (plug rf df x)
T3330c.hs:23:43:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
R :: (* -> *) -> *
Der ((->) x) :: * -> *
Expected type: Der ((->) x) (f1 x)
Actual type: R f1
In the first argument of ‛plug’, namely ‛rf’
In the first argument of ‛Inl’, namely ‛(plug rf df x)’
In the expression: Inl (plug rf df x)
{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
module T7729 where
class Monad m => PrimMonad m where
type PrimState m
class MonadTrans t where
lift :: Monad m => m a -> t m a
class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m where
type BasePrimMonad m :: * -> *
liftPrim :: BasePrimMonad m a -> m a
newtype Rand m a = Rand {
runRand :: Maybe (m ()) -> m a
}
instance (Monad m) => Monad (Rand m) where
return = Rand . const . return
(Rand rnd) >>= f = Rand $ \g -> (\x -> runRand (f x) g) =<< rnd g
instance MonadTrans Rand where
lift = Rand . const
instance MonadPrim m => MonadPrim (Rand m) where
type BasePrimMonad (Rand m) = BasePrimMonad m
liftPrim = liftPrim . lift
\ No newline at end of file
T7729.hs:28:14:
Could not deduce (BasePrimMonad (Rand m)
~ t0 (BasePrimMonad (Rand m)))
from the context (PrimMonad (BasePrimMonad (Rand m)),
Monad (Rand m),
MonadPrim m)
bound by the instance declaration at T7729.hs:26:10-42
The type variable ‛t0’ is ambiguous
Expected type: t0 (BasePrimMonad (Rand m)) a -> Rand m a
Actual type: BasePrimMonad (Rand m) a -> Rand m a
Relevant bindings include
liftPrim :: BasePrimMonad (Rand m) a -> Rand m a
(bound at T7729.hs:28:3)
In the first argument of ‛(.)’, namely ‛liftPrim’
In the expression: liftPrim . lift
In an equation for ‛liftPrim’: liftPrim = liftPrim . lift
{-# LANGUAGE FlexibleContexts, TypeFamilies #-}
module T7729a where
class Monad m => PrimMonad m where
type PrimState m
class MonadTrans t where
lift :: Monad m => m a -> t m a
class (PrimMonad (BasePrimMonad m), Monad m) => MonadPrim m where
type BasePrimMonad m :: * -> *
liftPrim :: BasePrimMonad m a -> m a
newtype Rand m a = Rand {
runRand :: Maybe (m ()) -> m a
}
instance (Monad m) => Monad (Rand m) where
return = Rand . const . return
(Rand rnd) >>= f = Rand $ \g -> (\x -> runRand (f x) g) =<< rnd g
instance MonadTrans Rand where
lift = Rand . const
instance MonadPrim m => MonadPrim (Rand m) where
type BasePrimMonad (Rand m) = BasePrimMonad m
liftPrim x = liftPrim (lift x) -- This line changed from T7729
\ No newline at end of file
T7729a.hs:28:31:
Occurs check: cannot construct the infinite type: m0 ~ t0 m0
Expected type: m0 a
Actual type: BasePrimMonad (Rand m) a
In the first argument of ‛lift’, namely ‛x’
In the first argument of ‛liftPrim’, namely ‛(lift x)’
In the expression: liftPrim (lift x)
......@@ -94,4 +94,6 @@ test('T7354a',
['$MAKE -s --no-print-directory T7354a'])
test('T7536', normal, compile_fail, [''])
test('T7560', normal, compile_fail, [''])
\ No newline at end of file
test('T7560', normal, compile_fail, [''])
test('T7729', normal, compile_fail, [''])
test('T7729a', normal, compile_fail, [''])
exists Nothing
:: Floop * (KProxy (Maybe *)) a mp => Existential (Maybe *) mp
:: Floop * (KProxy (Maybe *)) a kp => Existential (Maybe *) kp
module Dep01 where
import Control.Monad
import Control.Monad.ST
import Data.STRef
sumST :: Num a => [a] -> IO a
sumST xs = unsafeSTToIO $ do
n <- newSTRef 0
forM_ xs $ \x -> do
modifySTRef n (+x)
readSTRef n
Dep01.hs:8:12: Warning:
In the use of ‛unsafeSTToIO’ (imported from Control.Monad.ST):
Deprecated: "Please import from Control.Monad.ST.Unsafe instead; This will be removed in the next release"
module Dep02 where
import Control.Monad
import Control.Monad.ST.Lazy
import Data.STRef.Lazy
sumST :: Num a => [a] -> a
sumST xs = runST $ do
n <- newSTRef 0
forM_ xs $ \x -> do
modifySTRef n (+x)
readSTRef n
badST :: ()
badST = runST $ unsafeIOToST $ putStrLn "Hello World"
Dep02.hs:15:17: Warning:
In the use of ‛unsafeIOToST’ (imported from Control.Monad.ST.Lazy):
Deprecated: "Please import from Control.Monad.ST.Lazy.Unsafe instead; This will be removed in the next release"
......@@ -10,8 +10,6 @@ def f( name, opts ):
setTestOpts(f)
# Check correct methods are deprecated
test('Dep01', normal, compile, [''])
test('Dep02', normal, compile, [''])
test('Dep05', normal, compile_fail, [''])
test('Dep06', normal, compile_fail, [''])
test('Dep07', normal, compile_fail, [''])
......
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module T7641 where
data Foo b = Foo deriving Show
class ToFoo a b where
toFoo :: a -> Foo b
instance ToFoo (c -> ()) b where
toFoo _ = Foo
baz () = toFoo $ \_ -> ()
......@@ -397,3 +397,4 @@ test('T7408', normal, compile, [''])
test('UnboxStrictPrimitiveFields', normal, compile, [''])
test('T7541', normal, compile, [''])
test('T7562', normal, compile, [''])
test('T7641', normal, compile, [''])
T3950.hs:15:13:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
w :: (* -> * -> *) -> *
Sealed :: (* -> *) -> *
Expected type: w (Id p)
Actual type: Sealed (Id p0 x0)
In the first argument of ‛Just’, namely ‛rp'’
In the expression: Just rp'
In an equation for ‛rp’:
rp _
= Just rp'
where
rp' :: Sealed (Id p x)
rp' = undefined
T3950.hs:15:13:
Couldn't match kind ‛*’ with ‛* -> *’
When matching types
Sealed :: (* -> *) -> *
w :: (* -> * -> *) -> *
Expected type: w (Id p)
Actual type: Sealed (Id p0 x0)
In the first argument of ‛Just’, namely ‛rp'’
In the expression: Just rp'
In an equation for ‛rp’:
rp _
= Just rp'
where
rp' :: Sealed (Id p x)
rp' = undefined
T5570.hs:7:16:
Couldn't match kind ‛*’ with ‛#’
When matching types
s0 :: *
Double# :: #
In the second argument of ‛($)’, namely ‛D# $ 3.0##’
In the expression: print $ D# $ 3.0##
In an equation for ‛main’: main = print $ D# $ 3.0##
T5570.hs:7:16:
Couldn't match kind ‛#’ with ‛*’
When matching types
Double# :: #
s0 :: *
In the second argument of ‛($)’, namely ‛D# $ 3.0##’
In the expression: print $ D# $ 3.0##
In an equation for ‛main’: main = print $ D# $ 3.0##
T7368.hs:3:10:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
c0 :: (* -> *) -> *
(->) a0 :: * -> *
Expected type: a0 -> b0
Actual type: c0 b1
In the return type of a call of ‛l’
Probable cause: ‛l’ is applied to too many arguments
In the first argument of ‛b’, namely ‛(l ())’
In the expression: b (l ())
T7368.hs:3:13:
Couldn't match type ‛()’ with ‛b0 a1’
Expected type: b1 a1
Actual type: ()
In the first argument of ‛l’, namely ‛()’
In the first argument of ‛b’, namely ‛(l ())’
In the expression: b (l ())
T7368.hs:3:10:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
b1 :: * -> *
b0 :: *
Expected type: a0 -> b0
Actual type: c0 b1
In the return type of a call of ‛l’
Probable cause: ‛l’ is applied to too many arguments
In the first argument of ‛b’, namely ‛(l ())’
In the expression: b (l ())
T7368.hs:3:13:
Couldn't match expected type ‛b1 a1’ with actual type ‛()’
In the first argument of ‛l’, namely ‛()’
In the first argument of ‛b’, namely ‛(l ())’
In the expression: b (l ())
T7368a.hs:8:6:
Couldn't match kind ‛*’ with ‛* -> *’
When matching types
f :: * -> *
Bad :: (* -> *) -> *
Expected type: f (Bad f)
Actual type: Bad t0
In the pattern: Bad x
In an equation for ‛fun’: fun (Bad x) = True
T7368a.hs:8:6:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
Bad :: (* -> *) -> *
f :: * -> *
Expected type: f (Bad f)
Actual type: Bad t0
In the pattern: Bad x
In an equation for ‛fun’: fun (Bad x) = True
T7609.hs:7:16:
Expecting one more argument to ‛Maybe’
The second argument of a tuple should have kind ‛*’,
but ‛Maybe’ has kind ‛* -> *’
In the type signature for ‛f’: f :: (a `X` a, Maybe)
T7609.hs:10:19:
Expecting one more argument to ‛Maybe’
Expected a type, but ‛Maybe’ has kind ‛* -> *’
In the type signature for ‛g’: g :: a `X` a => Maybe
T7609.hs:7:16:
Expecting one more argument to ‛Maybe’
The second argument of a tuple should have kind ‛*’,
but ‛Maybe’ has kind ‛* -> *’
In the type signature for ‛f’: f :: (a `X` a, Maybe)
T7609.hs:10:7:
Expected a constraint, but ‛a `X` a’ has kind ‛*’
In the type signature for ‛g’: g :: a `X` a => Maybe
module T7696 where
f1 :: (m a, t m)
f1 = undefined
f2 :: ((), w ())
f2 = f1
{-
m :: * -> *
t :: (* -> *) -> *
a :: *
w :: * -> *
m a ~ ()
t m ~ w ()
-}
\ No newline at end of file
T7696.hs:7:6:
Couldn't match kind ‛* -> *’ with ‛*’
When matching types
m0 :: * -> *
() :: *
Expected type: ((), w ())
Actual type: (m0 a0, t0 m0)
In the expression: f1
In an equation for ‛f2’: f2 = f1
T7696.hs:7:6:
Couldn't match type ‛m0 a0’ with ‛()’
Expected type: ((), w ())
Actual type: (m0 a0, t0 m0)
In the expression: f1
In an equation for ‛f2’: f2 = f1
module T7697 where
f :: Int => Int
f x = x
T7697.hs:3:6:
Expected a constraint, but ‛Int’ has kind ‛*’
In the type signature for ‛f’: f :: Int => Int
module T7734 where
x `f` y = x x
(&) x y = x x
T7734.hs:4:13:
Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
Relevant bindings include
f :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:4:1)
x :: t2 -> t1 (bound at T7734.hs:4:1)
In the first argument of ‛x’, namely ‛x’
In the expression: x x
In an equation for ‛f’: x `f` y = x x
T7734.hs:5:13:
Occurs check: cannot construct the infinite type: t2 ~ t2 -> t1
Relevant bindings include
& :: (t2 -> t1) -> t -> t1 (bound at T7734.hs:5:1)
x :: t2 -> t1 (bound at T7734.hs:5:5)
In the first argument of ‛x’, namely ‛x’
In the expression: x x
In an equation for ‛&’: (&) x y = x x
......@@ -297,3 +297,6 @@ test('T2247', normal, compile_fail, [''])
test('T7609', normal, compile_fail, [''])
test('T7645', normal, compile_fail, [''])
test('T2354', normal, compile_fail, ['-O'])
test('T7734', normal, compile_fail, [''])
test('T7697', normal, compile_fail, [''])
test('T7696', normal, compile_fail, [''])
tcfail123.hs:11:9:
Couldn't match kind ‛*’ with ‛#’
When matching types
t0 :: *
GHC.Prim.Int# :: #
In the first argument of ‛f’, namely ‛3#’
In the expression: f 3#
In an equation for ‛h’: h v = f 3#
tcfail123.hs:11:9:
Couldn't match kind ‛#’ with ‛*’
When matching types
GHC.Prim.Int# :: #
t0 :: *
In the first argument of ‛f’, namely ‛3#’
In the expression: f 3#
In an equation for ‛h’: h v = f 3#
tcfail159.hs:9:11:
Couldn't match kind ‛*’ with ‛#’
When matching types
t0 :: *
(# Int, Int #) :: #
In the pattern: ~(# p, q #)
In a case alternative: ~(# p, q #) -> p
In the expression: case h x of { ~(# p, q #) -> p }
tcfail159.hs:9:11:
Couldn't match kind ‛#’ with ‛*’
When matching types
(# Int, Int #) :: #
t0 :: *
In the pattern: ~(# p, q #)
In a case alternative: ~(# p, q #) -> p
In the expression: case h x of { ~(# p, q #) -> p }
tcfail200.hs:5:15:
Couldn't match kind ‛*’ with ‛#’
When matching types
t1 :: *
GHC.Prim.Int# :: #
In the expression: 1#
In the expression: (1#, 'c')
In an equation for ‛x’: x = (1#, 'c')
tcfail200.hs:5:15:
Couldn't match kind ‛#’ with ‛*’
When matching types
GHC.Prim.Int# :: #
t1 :: *
In the expression: 1#
In the expression: (1#, 'c')
In an equation for ‛x’: x = (1#, 'c')
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