+# -----------------------------------------------------------------------------
+# $Id: Makefile,v 1.4 2000/12/12 17:21:40 simonmar Exp $
+
TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_run.mk
SRC_HC_OPTS += -dcore-lint
-arr014_HC_OPTS = -fglasgow-exts
+arr014_HC_OPTS = -package lang
arr003_RUNTEST_OPTS = -x 1
arr004_RUNTEST_OPTS = -x 1
arr008_RUNTEST_OPTS = -x 1
# mkdependHS doesn't understand OPTIONS pragmas...
-SRC_MKDEPENDHS_OPTS += -fglasgow-exts
+SRC_MKDEPENDHS_OPTS += -package lang
include $(TOP)/mk/target.mk
-{-# OPTIONS -fglasgow-exts #-}
-
-- !!! multi-dimensional arrays
module Main ( main ) where
+# -----------------------------------------------------------------------------
+# $Id: Makefile,v 1.12 2000/12/12 17:21:40 simonmar Exp $
+
TOP = ../..
+HCOnly = YES
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_compile.mk
-SRC_HC_OPTS += -dcore-lint -fglasgow-exts
+SRC_HC_OPTS += -dcore-lint -fglasgow-exts -package lang
# Note that these tests are still in a state of flux... don't believe errors
# they report. In fact, these aren't really very good tests at all...
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_fail.mk
-SRC_HC_OPTS += -fglasgow-exts
+SRC_HC_OPTS += -fglasgow-exts -package lang
include $(TOP)/mk/target.mk
cc001.hs:5:
- Ambiguous type variable(s) `t' in the constraint `CCallable t'
+ Ambiguous type variable(s) `t'
+ in the constraint `PrelGHC.CCallable t'
arising from an argument in the _ccall_ to `foo', namely `(undefined ())' at cc001.hs:5
In the right-hand side of an equation for `f':
_ccall_ foo (undefined ())
-
-Compilation had errors
-
cc002.hs:10:
- No instance for `CReturnable ForeignObj'
+ No instance for `PrelGHC.CReturnable ForeignObj'
arising from the result of the _ccall_ to `a' at cc002.hs:10
In the right-hand side of an equation for `a': _ccall_ a
-
-Compilation had errors
-
-cc004.hs:2:
- Cannot generalise these overloadings (in a _ccall_):
- `CReturnable b' arising from the result of the _ccall_ to `f' at cc004.hs:8
-
-cc004.hs:2:
- Cannot generalise these overloadings (in a _ccall_):
- `CReturnable t_aMc' arising from the result of the _ccall_ to `f' at cc004.hs:15
-
-Compilation had errors
+Cannot generalise these overloadings (in a _ccall_):
+ `PrelGHC.CReturnable a' arising from the result of the _ccall_ to `f' at cc004.hs:8
+Cannot generalise these overloadings (in a _ccall_):
+ `PrelGHC.CReturnable a' arising from the result of the _ccall_ to `f' at cc004.hs:15
Unacceptable result type in foreign declaration: Int#
When checking declaration:
foreign export _ccall "bar" bar :: Int -> Int#
-
-Compilation had errors
-
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.5 2000/06/12 17:01:57 panne Exp $
+# $Id: Makefile,v 1.6 2000/12/12 17:21:40 simonmar Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_run.mk
-SRC_HC_OPTS += -dcore-lint -fglasgow-exts
+SRC_HC_OPTS += -dcore-lint -fglasgow-exts -package lang
callback_HC_OPTS += -fvia-C
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.15 2000/11/03 16:23:37 simonmar Exp $
+# $Id: Makefile,v 1.16 2000/12/12 17:21:40 simonmar Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
cg012_HC_OPTS = -fglasgow-exts
cg015_HC_OPTS = -fglasgow-exts
cg018_HC_OPTS = -fglasgow-exts
-cg025_HC_OPTS = -fglasgow-exts
-cg026_HC_OPTS = -fglasgow-exts -fvia-C
-cg029_HC_OPTS = -fglasgow-exts
-cg030_HC_OPTS = -fglasgow-exts
+cg025_HC_OPTS = -package lang
+cg026_HC_OPTS = -package lang -fglasgow-exts -fvia-C
+cg029_HC_OPTS = -package lang -fglasgow-exts
+cg030_HC_OPTS = -package lang -fglasgow-exts
cg031_HC_OPTS = -fglasgow-exts
cg032_HC_OPTS = -fglasgow-exts
cg033_HC_OPTS = -fglasgow-exts
-cg035_HC_OPTS = -fglasgow-exts
-cg042_HC_OPTS = -fglasgow-exts
-cg044_HC_OPTS = -fglasgow-exts
+cg035_HC_OPTS = -package lang -fglasgow-exts
+cg042_HC_OPTS = -package lang -fglasgow-exts
+cg044_HC_OPTS = -package lang
cg016_RUNTEST_OPTS = -x 1 # should override the -x 0 above.
cg021_RUNTEST_OPTS = +RTS -K2m
SRC_HC_OPTS += -dcore-lint
-ds035_HC_OPTS = -fglasgow-exts
+ds035_HC_OPTS = -fglasgow-exts -package lang
ds046_HC_OPTS = -O -funbox-strict-fields
-ds049_HC_OPTS = -fvia-C
+ds049_HC_OPTS = -fvia-C -package lang
ds050_HC_OPTS = -fglasgow-exts
# mkdependHS doesn't understand OPTIONS pragmas...
-ds040.hs:7: Pattern match(es) are overlapped in the definition of function `^^^^':
+ds040.hs:9: Pattern match(es) are overlapped in the definition of function `^^^^':
^^^^ _ _ = ...
-drvfail001.hs:11:
- No instance for `Show (f (f a))'
- When deriving classes for `SM'
-
-Compilation had errors
-
+No instance for `Show (f a)'
+When deriving classes for `Cons'
drvfail004.hs:5:
- Could not deduce `Eq (Foo a b)'
- from the context (Ord a1, Ord b1)
+ Could not deduce `Eq (Foo a b)' from the context (Ord a, Ord b)
Probable fix:
Add `Eq (Foo a b)' to the instance declaration context
Or add an instance declaration for `Eq (Foo a b)'
arising from an instance declaration at drvfail004.hs:5
-
-Compilation had errors
-
-drvfail007.hs:2:
- No instance for `Eq (Int -> Int)'
- When deriving classes for `Foo'
-
-Compilation had errors
-
+No instance for `Eq (Int -> Int)'
+When deriving classes for `Foo'
include $(TOP)/mk/should_run.mk
SRC_HC_OPTS += -dcore-lint
-io022_HC_OPTS += -fglasgow-exts
io010_HC_OPTS += -fglasgow-exts
-io011_HC_OPTS += -fglasgow-exts
-io018_HC_OPTS += -fglasgow-exts
-io030_HC_OPTS += -fglasgow-exts
-io032_HC_OPTS += -fglasgow-exts
+io011_HC_OPTS += -fglasgow-exts -package lang
+io018_HC_OPTS += -fglasgow-exts -package lang
+io022_HC_OPTS += -fglasgow-exts -package lang
+io032_HC_OPTS += -fglasgow-exts -package lang
io004_RUNTEST_OPTS += -x 42
io016_RUNTEST_OPTS += io016.hs io016.out
Smoewnst pa ihyu
Caught EOF
-Smoewnst pa ihyu
+S-m-o e!w!n
Caught EOF
-Smoewnst pa ihyu
+S-m-o e!w!n!s tT epsat iinhgy uR!s tT epsat iinhgy uRW handles
+module Main(main) where
+
+import IO
+import IOExts
+import Directory (removeFile, doesFileExist)
+import Monad
+
+-- This test is weird, full marks to whoever dreamt it up!
+
+main :: IO ()
+main = do
+ let username = "io018.inout"
+ f <- doesFileExist username
+ when f (removeFile username)
+ cd <- openFile username ReadWriteMode
+ hSetBinaryMode cd True
+ hSetBuffering stdin NoBuffering
+ hSetBuffering stdout NoBuffering
+ hSetBuffering cd NoBuffering
+ hPutStr cd speakString
+ hSeek cd AbsoluteSeek 0
+ speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err
+ hSeek cd AbsoluteSeek 0
+ hSetBuffering cd LineBuffering
+ speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err
+ hSeek cd AbsoluteSeek 0
+ hSetBuffering cd (BlockBuffering Nothing)
+ speak cd `catch` \ err -> if isEOFError err then putStrLn "\nCaught EOF" else ioError err
+
+speakString = "Someone wants to speak with you\n"
+
+speak cd = do
+ (do
+ ready <- hReady cd
+ if ready then
+ hGetChar cd >>= putChar
+ else
+ return ()
+ ready <- hReady stdin
+ if ready then (do { ch <- ge
Caught EOF
ok
ok
ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
+ok
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.24 2000/09/04 15:23:55 simonmar Exp $
+# $Id: Makefile,v 1.25 2000/12/12 17:21:41 simonmar Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
SRC_HC_OPTS += -dcore-lint
packedstring001_HC_OPTS = -package lang
-exceptions001_HC_OPTS = -fglasgow-exts -fno-warn-missing-methods
-stableptr001_HC_OPTS = -fglasgow-exts
-stableptr002_HC_OPTS = -fglasgow-exts
-stableptr003_HC_OPTS = -fglasgow-exts
-stableptr004_HC_OPTS = -fglasgow-exts
-list001_HC_OPTS = -fglasgow-exts
+exceptions001_HC_OPTS = -package lang -fno-warn-missing-methods
+stableptr001_HC_OPTS = -package lang
+stableptr002_HC_OPTS = -package lang -fglasgow-exts
+stableptr003_HC_OPTS = -package lang
+stableptr004_HC_OPTS = -package lang
+list001_HC_OPTS = -package lang
uri001_HC_OPTS = -package lang -package net
time001_HC_OPTS = -package lang
+io001_HC_OPTS = -package lang
+io002_HC_OPTS = -package lang
+addr001_HC_OPTS = -package lang
-enum01_HC_OPTS = -cpp -fglasgow-exts -H12m
-enum02_HC_OPTS = -cpp -fglasgow-exts -H12m
-enum03_HC_OPTS = -cpp -fglasgow-exts -H12m
+enum01_HC_OPTS = -cpp -package lang -H12m
+enum02_HC_OPTS = -cpp -package lang -H12m
+enum03_HC_OPTS = -cpp -package lang -H12m
stableptr001_RUNTEST_OPTS = +RTS -K4m
stableptr004_RUNTEST_OPTS = +RTS -K4m
dynamic001_HC_OPTS = -package lang
dynamic002_HC_OPTS = -package lang
-io001_HC_OPTS = -fglasgow-exts
-io002_HC_OPTS = -fglasgow-exts
-addr001_HC_OPTS = -fglasgow-exts
-
-ioexts001_HC_OPTS = -fglasgow-exts -O
-ioexts001_RUNTEST_OPTS = +RTS -K8m
+ioexts001_HC_OPTS = -package lang -O
+ioexts001_RUNTEST_OPTS = +RTS -K16m
memo001_HC_OPTS = -package lang -package util
# stress the garbage collector a bit, to make sure weak pointers are being
memo002_HC_OPTS = -package lang -package util
memo002_RUNTEST_OPTS = 20
-weak001_HC_OPTS = -fglasgow-exts
+weak001_HC_OPTS = -package lang -fglasgow-exts
SRC_MKDEPENDHS_OPTS += -package lang
lex '\xf2' = [("'\\xf2'","")]
lex '\xf2t' = []
lex '\X24' = [("'\\x24'","")]
-lex '\x24b' = []
-lex '\Xa4b' = []
+lex '\x24b' = [("'\\x24b'","")]
+lex '\Xa4b' = [("'\\xa4b'","")]
lex '\xa4bg' = []
lex '\o00' = [("'\\o00'","")]
lex '\o05' = [("'\\o05'","")]
print (typeOf (undefined :: Ordering))
print (typeOf (undefined :: Addr))
- print (typeOf (undefined :: AddrOff))
print (typeOf (undefined :: Dynamic))
print (typeOf (undefined :: ForeignObj))
print (typeOf (undefined :: (IORef ())))
Maybe ()
Ordering
Addr
-AddrOff
Dynamic
ForeignObj
IORef ()
--
-mayBomb x = catchAllIO x errorHandler
-
-errorHandler :: Exception -> IO ()
-errorHandler e =
- case justErrors e of
- Just t -> putStrLn ("error " ++ show t)
- _ -> return ()
-
+mayBomb x = catchJust errorCalls x (\e -> putStrLn ("error " ++ show e))
test :: Show a => String -> String -> a -> IO ()
test test_nm expected val = do
(succ (minBound::Char)) = '\SOH'
(succ (maxBound::Char)) = error "Prelude.Enum.Char.succ: bad argument"
(pred 'b') = 'a'
- pred (maxBound::Char) = '\254'
+ pred (maxBound::Char) = '\2147483646'
pred (minBound::Char) = error "Prelude.Enum.Char.pred: bad argument"
- (map (toEnum::Int->Char) [123,ord (minBound::Char), ord(maxBound::Char)]) = "{\NUL\255"
+ (map (toEnum::Int->Char) [123,ord (minBound::Char), ord(maxBound::Char)]) = "{\NUL\2147483647"
(toEnum::Int->Char) (minBound::Int) = error "Prelude.chr: bad argument"
- (map fromEnum ['X',minBound,maxBound]) = [88,0,255]
+ (map fromEnum ['X',minBound,maxBound]) = [88,0,2147483647]
(take 7 ['\NUL' .. ]) = "\NUL\SOH\STX\ETX\EOT\ENQ\ACK"
- (take 7 ['\250' .. ]) = "\250\251\252\253\254\255"
+ (take 7 ['\250' .. ]) = "\250\251\252\253\254\255\256"
(take 7 ['a','b'..]) = "abcdefg"
(take 7 ['a','e'..]) = "aeimquy"
(take 7 ['a','a'..]) = "aaaaaaa"
(take 7 ['z','v'..]) = "zvrnjfb"
(take 7 ['\1', '\0' ..]) = "\SOH\NUL"
(take 7 ['\5', '\4' ..]) = "\ENQ\EOT\ETX\STX\SOH\NUL"
- (take 7 ['\250', '\251' ..]) = "\250\251\252\253\254\255"
+ (take 7 ['\250', '\251' ..]) = "\250\251\252\253\254\255\256"
(take 7 (['a' .. 'e'])) = "abcde"
(take 4 (['a' .. 'a'])) = "a"
(take 7 (['b' .. 'a'])) = ""
(take 7 ['c','b' .. 'c']) = "c"
(take 7 ['c','b' .. 'b']) = "cb"
(take 7 ['c','d' .. 'b']) = ""
- (take 7 ['\251', '\252' .. maxBound]) = "\251\252\253\254\255"
+ (take 7 ['\251', '\252' .. maxBound]) = "\251\252\253\254\255\256\257"
(take 7 ['\5', '\4' .. minBound]) = "\ENQ\EOT\ETX\STX\SOH\NUL"
Testing Enum ():
(succ ()) = error "Prelude.Enum.().succ: bad argment"
--
-mayBomb x = catchAllIO x errorHandler
-
-errorHandler :: Exception -> IO ()
-errorHandler e =
- case justErrors e of
- Just t -> putStrLn ("error " ++ show t)
- _ -> return ()
-
+mayBomb x = catchJust errorCalls x (\e -> putStrLn ("error " ++ show e))
-- [x..] aka enumFrom
printTest ((take 7 [(1::Word8)..]))
printTest ((take 7 [((maxBound::Word8)-5)..])) -- just in case it doesn't catch the upper bound..
-
+
-- [x,y..] aka enumFromThen
printTest ((take 7 [(1::Word8),2..]))
printTest ((take 7 [(1::Word8),7..]))
--
-mayBomb x = catchAllIO x errorHandler
-
-errorHandler :: Exception -> IO ()
-errorHandler e =
- case justErrors e of
- Just t -> putStrLn ("error " ++ show t)
- _ -> return ()
-
+mayBomb x = catchJust errorCalls x (\e -> putStrLn ("error " ++ show e))
dynTest
ioTest :: IO ()
-ioTest = catchIO justIoErrors (ioError (userError "wibble"))
- (\ex -> if isUserError ex then putStr "io exception caught\n"
- else error "help!")
+ioTest = catchJust userErrors (ioError (userError "wibble"))
+ (\ex -> putStr "user exception caught\n")
errorTest :: IO ()
errorTest = tryAll (1 + error "call to 'error'") >>= \r ->
-io exception caught
+user exception caught
error call caught
no method error
-exceptions001.hs:40: Non-exhaustive patterns in function test1
-exceptions001.hs:47: Non-exhaustive patterns in function test2
+exceptions001.hs:39: Non-exhaustive patterns in function test1
+exceptions001.hs:46: Non-exhaustive patterns in function test2
43
\ No newline at end of file
loop r c = loop r (c-1) >> writeIORef r 42
main = newIORef 0 >>= \r -> loop r 1000000 >> putStrLn "done"
-
-
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.7 2000/06/12 17:01:58 panne Exp $
+# $Id: Makefile,v 1.8 2000/12/12 17:21:41 simonmar Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_run.mk
SRC_HC_OPTS += -dcore-lint
-arith006_HC_OPTS += -fglasgow-exts
-arith010_HC_OPTS += -fglasgow-exts
-arith011_HC_OPTS += -fglasgow-exts
-arith012_HC_OPTS += -fglasgow-exts
-num006_HC_OPTS += -fglasgow-exts
+arith006_HC_OPTS += -package lang
+arith010_HC_OPTS += -package lang
+arith011_HC_OPTS += -package lang
+arith012_HC_OPTS += -package lang
+num006_HC_OPTS += -package lang
.PRECIOUS: %.bin %.o
-read014.hs:2: Warning: definition but no type signature for `ng1'
+read014.hs:4: Warning: Definition but no type signature for `ng1'
read014.hs:4: Warning: Defined but not used: x
-- f' = Just.\1 where (.\) = ($)
-- -----------------------------------------------------
--- M.{as,hiding,qualified} *are* qualified identifiers,
--- but GHC deviates from the Haskell report here.
+-- M.{as,hiding,qualified} *are* qualified identifiers:
--- g = ShouldCompile.as
+g = ShouldCompile.as
-- ---------------------------------------------------------------------------
-- special symbols (!, -) can be qualified to make varids.
data Equal = Char := Int
--- fails in GHC 4.04, due to not doing fixity resolution on the lhs
--- before deciding which is the function symbol.
+-- fails in GHC (all versions), due to not doing fixity resolution on
+-- the lhs before deciding which is the function symbol.
(|-) :: Int -> Equal -> Bool
0 |- x:=y = 1 |- x:=y -- XXX fails here
read001.hs:5: Type constructor or class not in scope: `FooDataC'
+read001.hs:25: Variable not in scope: `+#'
+
read001.hs:38: Type constructor or class not in scope: `EqLeaf'
read001.hs:38: Type constructor or class not in scope: `EqLeaf'
read001.hs:107: Data constructor not in scope: `Bar'
read001.hs:112: Type constructor or class not in scope: `Foo'
-
-Compilation had errors
-
((n+42))
= y
expr a b c d
- = ((((((((a + (: a b)) + (a : b)) + (((1 - 'c') - "abc") - 1.293))
+ = ((((((((a + ((:) a b)) + (a : b))
+ + (((1 - 'c') - "abc") - 1.293))
+ ((\ x y z -> x) 42))
+ ((9 *)))
+ ((* 8)))
+ (case x of
- Prelude.[]
+ PrelBase.[]
| null x -> 99
| otherwise -> 98
| True -> 97
data FooData = FooCon Int
data FooDataB = FooConB Double
data (Eq a) => EqTree a = EqLeaf a | EqBranch (EqLeaf a) (EqLeaf a)
-class (Eq a) => EqClass a where { eqc :: a -> Char; eqc x = '?' }
+class (Eq a) => EqClass a where {
+ eqc = :: a -> Char; Just eqc x = '?' }
class (Ord a) => OrdClass a where {
- orda :: a -> Char; ordb :: a -> Char; ordc :: a -> Char; }
+ orda = :: a -> Char; ordb = :: a -> Char; ordc = :: a -> Char;
+ Just
+ }
instance (Eq a) => {EqClass (EqTree a)} where
[]
eqc x = 'a'
Expected type: (t, [a], t1)
Inferred type: t
In the right-hand side of a pattern binding: a
-
-Compilation had errors
-
read004.hs:19: error in character literal
-
-Compilation had errors
-
read005.hs:4: error in character literal
-
-Compilation had errors
-
read006.hs:8: parse error on input `@'
-
-Compilation had errors
-
`+' is not a data constructor
In the pattern: 2 + 2
In a do statement: (2 + 2) <- 2
-
-Compilation had errors
-
read008.hs:5: parse error on input `!'
-
-Compilation had errors
-
read009.hs:5:
`do' statements must end in expression: do let foo = True
-
-Compilation had errors
-
read011.hs:7: parse error on input `='
-
-Compilation had errors
-
read012.hs:7: parse error (possibly incorrect indentation)
-
-Compilation had errors
-
read013.hs:4: unterminated ``
-
-Compilation had errors
-
read014.hs:3: parse error on input `}'
-
-Compilation had errors
-
+++ /dev/null
-__interface Rn016 1 0 where
-__export Rn016 K{op1 op2};
-instance {K PrelBase.Int} = _f1;
-instance {K PrelBase.Bool} = _f2;
-instance __forall [a] => {K [a]} = _f3;
-1 _f1 :: {K PrelBase.Int} ;
-1 _f2 :: {K PrelBase.Bool} ;
-1 _f3 :: __forall [a] => {K [a]} ;
-1 class K a :: (* -> *) where { op1 :: a -> a ; op2 :: a -> a ; } ;
+++ /dev/null
--- !!! Import an interface defining a class and some instances
-
-module Main where
-
-import Rn016
-
-main = undefined
SRC_HC_OPTS += -dcore-lint
simpl006_HC_OPTS += -package concurrent
+simpl004_HC_OPTS = -package lang
+Simpl006Help_HC_OPTS = -O
include $(TOP)/mk/target.mk
-{-# OPTIONS -O #-}
-
module Simpl006Help( forever ) where
forever c = sequence_ (repeat c)
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/should_compile.mk
-SRC_HC_OPTS += -dcore-lint -fno-warn-incomplete-patterns
+SRC_HC_OPTS += -dcore-lint -fno-warn-incomplete-patterns
# -hi-with-declarations -hi-with-instances -hi-with-exports
tc019_HC_OPTS = -fglasgow-exts
tc065_HC_OPTS = -package lang -package data
+tc085_HC_OPTS = -package lang
tc087_HC_OPTS = -fglasgow-exts
tc088_HC_OPTS = -package lang
tc089_HC_OPTS = -H12m
tc097_HC_OPTS = -fglasgow-exts
tc100_HC_OPTS = -O
+tc108_HC_OPTS = -fglasgow-exts
# mkdependHS doesn't understand OPTIONS pragmas...
SRC_MKDEPENDHS_OPTS += -fglasgow-exts
-__export ShouldSucceed Boolean{FF TT} List{Nil Cons} Nat{ZZero Succ} Pair{Mkpair} Tree{Leaf Node} add app before flatten idb idl lEngth nUll neg rEverse sUm swap;
-1 add :: Nat -> Nat -> Nat ;
-1 app :: __forall [alpha] => List alpha -> List alpha -> List alpha ;
-1 before :: List Nat -> List Nat ;
-1 data Boolean = FF | TT ;
-1 data List alpha = Nil | Cons alpha (List alpha) ;
-1 data Nat = ZZero | Succ Nat ;
-1 data Pair a b = Mkpair a b ;
-1 data Tree t = Leaf t | Node (Tree t) (Tree t) ;
-1 flatten :: __forall [alpha] => Tree alpha -> List alpha ;
-1 idb :: Boolean -> Boolean ;
-1 idl :: __forall [a] => List a -> List a ;
-1 lEngth :: __forall [a] => List a -> Nat ;
-1 nUll :: __forall [alpha] => List alpha -> Boolean ;
-1 neg :: Boolean -> Boolean ;
-1 rEverse :: __forall [alpha] => List alpha -> List alpha ;
-1 sUm :: Tree Nat -> Nat ;
-1 swap :: __forall [a b] => Pair a b -> Pair b a ;
+NOTE: Simplifier still going after 4 iterations; bailing out.
tc056.hs:14:
Warning: Duplicate class assertion `Eq' a' in the context:
(Eq' a, Eq' a) => ...
-__export ShouldSucceed Eqzq{doubleeq} Ordzq{lt} f;
-instance {Eqzq PrelBase.Int} = zdfEqzqInt;
-instance __forall [a] => {Eqzq a} -> {Eqzq a} -> {Eqzq [a]} = zdfEqzqZMZN;
-1 class Eqzq a where {doubleeq :: a -> a -> PrelBase.Bool} ;
-1 class {Eqzq a} => Ordzq a where {lt :: a -> a -> PrelBase.Bool} ;
-1 f :: __forall [t t1] => {Eqzq [t1]} -> {PrelNum.Num t1} -> [t1] -> t -> PrelBase.Bool ;
-1 zddmdoubleeq :: __forall [a] => {Eqzq a} -> a -> a -> PrelBase.Bool ;
-1 zddmlt :: __forall [a] => {Ordzq a} -> a -> a -> PrelBase.Bool ;
-1 zdfEqzqInt :: {Eqzq PrelBase.Int} ;
-1 zdfEqzqZMZN :: __forall [a] => {Eqzq a} -> {Eqzq a} -> {Eqzq [a]} ;
-__export ShouldSucceed HappyAbsSyn{HappyTerminal HappyErrorToken HappyAbsSyn1 HappyAbsSyn2 HappyAbsSyn3} HappyState{HappyState} Token{TokenInt TokenVar TokenEq} action_0 action_1 action_2 action_3 action_4 action_5 action_6 happyAccept happyError happyFail happyGoto happyMonadReduce happyNewToken happyParse happyReduce happyReduce_1 happyReduce_2 happyReduce_3 happyReturn happyShift happySpecReduce_0 happySpecReduce_1 happySpecReduce_2 happySpecReduce_3 happyThen main myparser notHappyAtAll;
-instance {PrelShow.Show Token} = zdfShowToken;
-1 action_0 :: __forall [t t1] => {PrelNum.Num t} -> {PrelBase.Eq t} -> t -> PrelBase.Int -> Token -> HappyState Token ([HappyAbsSyn (t1 -> PrelFloat.Double) [([PrelBase.Char], t1 -> PrelBase.Int)] (t1 -> PrelBase.Int)] -> [Token] -> t1 -> PrelFloat.Double) -> [HappyState Token ([HappyAbsSyn (t1 -> PrelFloat.Double) [([PrelBase.Char], t1 -> PrelBase.Int)] (t1 -> PrelBase.Int)] -> [Token] -> t1 -> PrelFloat.Double)] -> [HappyAbsSyn (t1 -> PrelFloat.Double) [([PrelBase.Char], t1 -> PrelBase.Int)] (t1 -> PrelBase.Int)] -> [Token] -> t1 -> PrelFloat.Double ;
-1 action_1 :: __forall [t t1 t2 t3 b] => {PrelNum.Num t} -> {PrelBase.Eq t} -> t -> PrelBase.Int -> b -> HappyState b ([HappyAbsSyn t1 t2 t3] -> [Token] -> t1) -> [HappyState b ([HappyAbsSyn t1 t2 t3] -> [Token] -> t1)] -> [HappyAbsSyn t1 t2 t3] -> [Token] -> t1 ;
-1 action_2 :: __forall [t t1 b t2 t3 t4 t5 t31] => t -> PrelBase.Int -> b -> t2 -> [HappyState b ([HappyAbsSyn (t3 -> PrelFloat.Double) [(t4, t3 -> t5)] t31] -> t1)] -> [HappyAbsSyn (t3 -> PrelFloat.Double) [(t4, t3 -> t5)] t31] -> t1 ;
-1 action_3 :: __forall [t t1 t11 a] => {PrelNum.Num t} -> {PrelBase.Eq t} -> t -> PrelBase.Int -> Token -> HappyState Token ([HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a) -> [HappyState Token ([HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a)] -> [HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a ;
-1 action_4 :: __forall [t t1 t11 a] => {PrelNum.Num t} -> {PrelBase.Eq t} -> t -> PrelBase.Int -> Token -> HappyState Token ([HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a) -> [HappyState Token ([HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a)] -> [HappyAbsSyn t1 [([PrelBase.Char], t11 -> PrelBase.Int)] (t11 -> PrelBase.Int)] -> [Token] -> a ;
-1 action_5 :: __forall [t t1 b t2 t11 t3] => t -> PrelBase.Int -> b -> t2 -> [HappyState b ([HappyAbsSyn t11 [([PrelBase.Char], t3)] t3] -> t1)] -> [HappyAbsSyn t11 [([PrelBase.Char], t3)] t3] -> t1 ;
-1 action_6 :: __forall [t t1 b t2 t11 t21 t3] => t -> PrelBase.Int -> b -> t2 -> [HappyState b ([HappyAbsSyn t11 t21 (t3 -> PrelBase.Int)] -> t1)] -> [HappyAbsSyn t11 t21 (t3 -> PrelBase.Int)] -> t1 ;
-1 data HappyAbsSyn t1 t2 t3 = HappyTerminal Token | HappyErrorToken PrelBase.Int | HappyAbsSyn1 t1 | HappyAbsSyn2 t2 | HappyAbsSyn3 t3 ;
-1 newtype HappyState b c = HappyState (PrelBase.Int -> PrelBase.Int -> b -> HappyState b c -> [HappyState b c] -> c) ;
-1 data Token = TokenInt PrelBase.Int | TokenVar PrelBase.String | TokenEq ;
-1 happyAccept :: __forall [t t1 t2 t3 t11 t21 t31 t4] => t -> t1 -> t2 -> t3 -> [HappyAbsSyn t11 t21 t31] -> t4 -> t11 ;
-1 happyError :: __forall [a] => [Token] -> a ;
-1 happyFail :: __forall [a b t1 t2 t3] => PrelBase.Int -> b -> HappyState b ([HappyAbsSyn t1 t2 t3] -> [Token] -> a) -> [HappyState b ([HappyAbsSyn t1 t2 t3] -> [Token] -> a)] -> [HappyAbsSyn t1 t2 t3] -> [Token] -> a ;
-1 happyGoto :: __forall [t b c] => (PrelBase.Int -> PrelBase.Int -> b -> HappyState b c -> [HappyState b c] -> c) -> PrelBase.Int -> b -> t -> [HappyState b c] -> c ;
-1 happyMonadReduce :: __forall [a b b1 t] => PrelBase.Int -> PrelBase.Int -> (t -> b1) -> ([b1] -> t) -> PrelBase.Int -> b -> HappyState b ([b1] -> [Token] -> a) -> [HappyState b ([b1] -> [Token] -> a)] -> [b1] -> [Token] -> a ;
-1 happyNewToken :: __forall [t t1] => (PrelBase.Int -> PrelBase.Int -> Token -> HappyState Token (t -> [Token] -> t1) -> [HappyState Token (t -> [Token] -> t1)] -> t -> [Token] -> t1) -> [HappyState Token (t -> [Token] -> t1)] -> t -> [Token] -> t1 ;
-1 happyParse :: __forall [t] => [Token] -> t -> PrelFloat.Double ;
-1 happyReduce :: __forall [t b t1] => PrelBase.Int -> PrelBase.Int -> (t1 -> t1) -> PrelBase.Int -> b -> HappyState b (t1 -> t) -> [HappyState b (t1 -> t)] -> t1 -> t ;
-1 happyReduce_1 :: __forall [t b t1 t2 t3 t4 t31] => PrelBase.Int -> b -> t1 -> [HappyState b ([HappyAbsSyn (t3 -> PrelFloat.Double) [(t2, t3 -> t4)] t31] -> t)] -> [HappyAbsSyn (t3 -> PrelFloat.Double) [(t2, t3 -> t4)] t31] -> t ;
-1 happyReduce_2 :: __forall [t b t1 t11 t3] => PrelBase.Int -> b -> t1 -> [HappyState b ([HappyAbsSyn t11 [([PrelBase.Char], t3)] t3] -> t)] -> [HappyAbsSyn t11 [([PrelBase.Char], t3)] t3] -> t ;
-1 happyReduce_3 :: __forall [t b t1 t11 t2 t21] => PrelBase.Int -> b -> t1 -> [HappyState b ([HappyAbsSyn t11 t2 (t21 -> PrelBase.Int)] -> t)] -> [HappyAbsSyn t11 t2 (t21 -> PrelBase.Int)] -> t ;
-1 happyReturn :: __forall [t t1] => t -> t1 -> t ;
-1 happyShift :: __forall [t t1 t2 t3 t11] => {PrelNum.Num t} -> {PrelBase.Eq t} -> (PrelBase.Int -> PrelBase.Int -> Token -> HappyState Token ([HappyAbsSyn t1 t2 t3] -> [Token] -> t11) -> [HappyState Token ([HappyAbsSyn t1 t2 t3] -> [Token] -> t11)] -> [HappyAbsSyn t1 t2 t3] -> [Token] -> t11) -> t -> Token -> HappyState Token ([HappyAbsSyn t1 t2 t3] -> [Token] -> t11) -> [HappyState Token ([HappyAbsSyn t1 t2 t3] -> [Token] -> t11)] -> [HappyAbsSyn t1 t2 t3] -> [Token] -> t11 ;
-1 happySpecReduce_0 :: __forall [t a b] => PrelBase.Int -> t -> PrelBase.Int -> b -> HappyState b ([t] -> [Token] -> a) -> [HappyState b ([t] -> [Token] -> a)] -> [t] -> [Token] -> a ;
-1 happySpecReduce_1 :: __forall [t b t1 t2] => PrelBase.Int -> (t1 -> t1) -> PrelBase.Int -> b -> t -> [HappyState b ([t1] -> t2)] -> [t1] -> t2 ;
-1 happySpecReduce_2 :: __forall [t b t1 t2] => PrelBase.Int -> (t1 -> t1 -> t1) -> PrelBase.Int -> b -> t -> [HappyState b ([t1] -> t2)] -> [t1] -> t2 ;
-1 happySpecReduce_3 :: __forall [t b t1 t2] => PrelBase.Int -> (t1 -> t1 -> t1 -> t1) -> PrelBase.Int -> b -> t -> [HappyState b ([t1] -> t2)] -> [t1] -> t2 ;
-1 happyThen :: __forall [t t1] => t -> (t -> t1) -> t1 ;
-1 main :: PrelIOBase.IO PrelBase.Z0T ;
-1 myparser :: __forall [t] => [Token] -> t -> PrelFloat.Double ;
-1 notHappyAtAll :: __forall [t] => t ;
-1 zdfShowToken :: {PrelShow.Show Token} ;
+NOTE: Simplifier still going after 4 iterations; bailing out.
-
+
+tc108.hs:15:
+ Too many parameters for class `HasConfigValue'
+ In the class declaration for `HasConfigValue'
{-# OPTIONS -fglasgow-exts #-}
-module ShouldCompile
+module ShouldCompile where
-- This accepted by Hugs, but not by GHC 4.08.1
-- Reported by Thomas Hallgren Nov 00
+
+tc109.hs:11:
+ Illegal instance declaration for `P b'
+ (There must be at least one non-type-variable in the instance head)
| otherwise = span_tree r (vs', (x : ns') : ns) xs
where
(vs', ns') = dfs r (x : vs, []) (r x)
-
-Compilation had errors
-
# The -noC messes up the Data82 compilation
# HC_OPTS += -noC
-tcfail045_HC_OPTS = -fglasgow-exts
-tcfail068_HC_OPTS = -fglasgow-exts
-tcfail080_HC_OPTS = -fglasgow-exts
+tcfail045_HC_OPTS = -fglasgow-exts -package lang
+tcfail068_HC_OPTS = -fglasgow-exts -package lang
+tcfail080_HC_OPTS = -fglasgow-exts -package lang
Inst82_1.o : Inst82_1.hs Data82.hi
$(HC) $(HC_OPTS) -c $< -o $@
$(HC) $(HC_OPTS) -c $< -o $@
# mkdependHS doesn't understand OPTIONS pragmas...
-SRC_MKDEPENDHS_OPTS += -fglasgow-exts
+SRC_MKDEPENDHS_OPTS += -fglasgow-exts -package lang
include $(TOP)/mk/target.mk
Inferred type: t -> t1
In an equation for function `op': op [] = []
In the definition for method `op'
-
-Compilation had errors
-
Expected type: t
Inferred type: [t]
In the right-hand side of an equation for `c': z
-
-Compilation had errors
-
arising from the literal `1' at tcfail003.hs:3
In the list element: 1
In the right-hand side of a pattern binding: [1, 'a']
-
-Compilation had errors
-
Expected type: (t, t1)
Inferred type: (t2, t3, t4)
In the right-hand side of a pattern binding: (1, 2, 3)
-
-Compilation had errors
-
Expected type: [t]
Inferred type: (t1, t2)
In the right-hand side of a pattern binding: (1, 'a')
-
-Compilation had errors
-
No instance for `Num Bool'
arising from the literal `1' at tcfail006.hs:4
In the right-hand side of a case alternative: (True, 1)
-
-Compilation had errors
-
tcfail007.hs:3:
No instance for `Num Bool'
arising from the literal `1' at tcfail007.hs:3
- In the second argument of `+', namely `1'
+ In the second argument of `(+)', namely `1'
In the right-hand side of an equation for `n': x + 1
-
-Compilation had errors
-
tcfail008.hs:3:
Ambiguous type variable(s) `t' in the constraint `Num [t]'
arising from the literal `2' at tcfail008.hs:3
- In the second argument of `:', namely `2'
- In the right-hand side of a pattern binding: 1 : 2
+ In the second argument of `(:)', namely `2'
+ In the right-hand side of an equation for `o': 1 : 2
tcfail008.hs:3:
Ambiguous type variable(s) `t' in the constraint `Num t'
arising from the literal `1' at tcfail008.hs:3
- In the first argument of `:', namely `1'
- In the right-hand side of a pattern binding: 1 : 2
-
-Compilation had errors
-
+ In the first argument of `(:)', namely `1'
+ In the right-hand side of an equation for `o': 1 : 2
Expected type: Integer
Inferred type: Int
In an expression with a type signature: 2 :: Integer
-
-Compilation had errors
-
tcfail010.hs:3:
Ambiguous type variable(s) `t' in the constraint `Num [t]'
- arising from the literal `2' at tcfail010.hs:3
- In the second argument of `+', namely `2'
+ arising from use of `+' at tcfail010.hs:3
In the right-hand side of a lambda abstraction: z + 2
-
-Compilation had errors
-
tcfail011.hs:3: Variable not in scope: `y'
-
-Compilation had errors
-
Expected type: Bool
Inferred type: [t]
In the right-hand side of a pattern binding: []
-
-Compilation had errors
-
Inferred type: Bool
In the pattern: True
In an equation for function `f': f True = 2
-
-Compilation had errors
-
Inferred type: t -> t1
In the first argument of `z', namely `z'
In the right-hand side of an equation for `h': z z
-
-Compilation had errors
-
No instance for `Num Bool'
arising from the literal `2' at tcfail015.hs:7
In the right-hand side of an equation for `g': 2
-
-Compilation had errors
-
Expected type: Expr a
Inferred type: AnnExpr a
In the first argument of `g', namely `e1'
- In the first argument of `++', namely `(g e1)'
-
-Compilation had errors
-
+ In the first argument of `(++)', namely `(g e1)'
tcfail017.hs:10:
- Could not deduce `C [a]' from the context: (B a)
- Probable cause: missing `C [a]' in instance declaration context
- or missing instance declaration for `C [a]'
+ Could not deduce `C [a]' from the context (B a)
+ Probable fix:
+ Add `C [a]' to the instance declaration context
+ Or add an instance declaration for `C [a]'
arising from an instance declaration at tcfail017.hs:10
-
-Compilation had errors
-
Ambiguous type variable(s) `t' in the constraint `Num [t]'
arising from the literal `1' at tcfail018.hs:5
In the right-hand side of a pattern binding: 1
-
-Compilation had errors
-
tcfail019.hs:18:
- Could not deduce `C [a]' from the context: ()
- Probable cause: missing `C [a]' in instance declaration context
- or missing instance declaration for `C [a]'
+ Could not deduce `C [a]' from the context ()
+ Probable fix:
+ Add `C [a]' to the instance declaration context
+ Or add an instance declaration for `C [a]'
arising from an instance declaration at tcfail019.hs:18
tcfail019.hs:18:
- Could not deduce `B [a]' from the context: ()
- Probable cause: missing `B [a]' in instance declaration context
- or missing instance declaration for `B [a]'
+ Could not deduce `B [a]' from the context ()
+ Probable fix:
+ Add `B [a]' to the instance declaration context
+ Or add an instance declaration for `B [a]'
arising from an instance declaration at tcfail019.hs:18
-
-Compilation had errors
-
tcfail020.hs:10:
- Could not deduce `A [a]' from the context: (A a)
- Probable cause: missing `A [a]' in instance declaration context
- or missing instance declaration for `A [a]'
+ Could not deduce `A [a]' from the context (A a)
+ Probable fix:
+ Add `A [a]' to the instance declaration context
+ Or add an instance declaration for `A [a]'
arising from an instance declaration at tcfail020.hs:10
-
-Compilation had errors
-
tcfail021.hs:8:
Can't handle multiple methods defined by one pattern binding
(==, /=) = (\ x -> \ y -> ..., \ x -> \ y -> ...)
-
-Compilation had errors
-
-tcfail023.hs:1:
- Duplicate or overlapping instance declarations
- for `A B' defined at tcfail023.hs:13 and defined at tcfail023.hs:10
+Duplicate or overlapping instance declarations:
+ tcfail023.hs:10: {A B}
+ tcfail023.hs:13: {A B}
tcfail023.hs:11:
Couldn't match `B' against `Bool'
Expected type: B
Inferred type: Bool
In the right-hand side of an equation for `op': True
-
-Compilation had errors
-
-tcfail027.hs:2:
- Cycle in class declarations:
- `A' at tcfail027.hs:4
- `B' at tcfail027.hs:7
-
-Compilation had errors
-
+Cycle in class declarations:
+ `A' at tcfail027.hs:4
+ `B' at tcfail027.hs:7
tcfail028.hs:4:
- Couldn't match `Type t' against `k -> *'
- Expected kind: Type t
- Inferred kind: k -> *
+ Couldn't match `k -> k1' against `Type bx'
+ Expected kind: k -> k1
+ Inferred kind: Type bx
When checking that `A a' is a type
- In the newtype declaration for `A'
-
-Compilation had errors
-
+ In the data type declaration for `A'
No instance for `Ord Foo'
arising from use of `>' at tcfail029.hs:6
In the right-hand side of an equation for `f': x > Bar
-
-Compilation had errors
-
-tcfail030.hs:3: Variable not in scope: `Main.main'
-
-Compilation had errors
+tcfail030.hs:3: Variable not in scope: `main'
+tcfail030.hs:3: Module `Main' must include a definition for `main'
Inferred type: Char
In the predicate expression: 'a'
In the right-hand side of an equation for `f': if 'a' then 1 else 2
-
-Compilation had errors
-
When checking an expression type signature
In an expression with a type signature:
x :: forall a. (Eq a) => a -> Int
-
-Compilation had errors
-
Expected type: (t, t1)
Inferred type: t
In a list-comprehension qualifier: return x
-
-Compilation had errors
-
tcfail034.hs:17:
- Could not deduce `Integral a' from the context: (Num a, Eq a)
- Probable cause: missing `Integral a' in type signature for `test'
+ Could not deduce `Integral a' from the context (Num a, Eq a)
+ Probable fix:
+ Add `Integral a' to the type signature for `test'
arising from use of `mod' at tcfail034.hs:17
- In the first argument of `==', namely `(x `mod` 3)'
+ In the first argument of `(==)', namely `(x `mod` 3)'
In the right-hand side of an equation for `test': (x `mod` 3) == 0
-
-Compilation had errors
-
-tcfail035.hs:3:
- Duplicate or overlapping instance declarations
- for `Num NUM'
- defined at tcfail035.hs:7 and defined at tcfail035.hs:6
-
-Compilation had errors
-
+Duplicate or overlapping instance declarations:
+ tcfail035.hs:6: {Num NUM}
+ tcfail035.hs:7: {Num NUM}
-tcfail036.hs:3:
- Duplicate or overlapping instance declarations
- for `Num NUM'
- defined at tcfail036.hs:8 and defined at tcfail036.hs:6
+Duplicate or overlapping instance declarations:
+ tcfail036.hs:6: {Num NUM}
+ tcfail036.hs:8: {Num NUM}
tcfail036.hs:8:
No instance for `Eq NUM'
arising from an instance declaration at tcfail036.hs:8
tcfail036.hs:9:
- Class used as a type constructor: Num
+ Class `Num' used as a type
When checking kinds in `Eq Num'
-
-Compilation had errors
-
tcfail037.hs:7:
Ambiguous occurrence `+'
- It could refer to either `+', defined at tcfail037.hs:10
- or `Prelude.+', imported from Prelude at tcfail037.hs:3
-
-Compilation had errors
-
+ It could refer to either `ShouldFail.+', defined at tcfail037.hs:10
+ or `PrelNum.+', imported from Prelude at tcfail037.hs:3 ()
tcfail038.hs:10:
Conflicting definitions for `/='
in the bindings in an instance declaration
-
-Compilation had errors
-
tcfail039.hs:11:
Ambiguous occurrence `=='
- It could refer to either `==', defined at tcfail039.hs:7
- or `Prelude.==', imported from Prelude at tcfail039.hs:3
-
-Compilation had errors
-
+ It could refer to either `ShouldFail.==', defined at tcfail039.hs:7
+ or `PrelBase.==', imported from Prelude at tcfail039.hs:3 ()
tcfail040.hs:19:
Ambiguous type variable(s) `a' in the constraint `ORD a'
arising from use of `<<' at tcfail040.hs:19
- In the first argument of `===', namely `<<'
- In the right-hand side of a pattern binding: << === <<
-
-Compilation had errors
-
+ In the second argument of `(===)', namely `(<<)'
+ In the right-hand side of an equation for `f': (<<) === (<<)
tcfail042.hs:15:
- Could not deduce `Num a' from the context: (Eq a, Show a)
- Probable cause: missing `Num a' in instance declaration context
+ Could not deduce `Num a' from the context (Eq a, Show a)
+ Probable fix:
+ Add `Num a' to the instance declaration context
arising from an instance declaration at tcfail042.hs:15
-
-Compilation had errors
-
False
else
if eq a (hd bs) then True else search a (tl bs)
-
-tcfail043.hs:40:
- Ambiguous type variable(s) `a' in the constraint `Eq_ a'
- arising from use of `eq' at tcfail043.hs:40
- In the predicate expression: eq a (hd bs)
- In the right-hand side of a lambda abstraction:
- if gt (hd bs) a then
- False
- else
- if eq a (hd bs) then True else search a (tl bs)
-
-Compilation had errors
-
Illegal instance declaration for `Num (a -> a)'
(the instance type must be of form (T a b c)
where T is not a synonym, and a,b,c are distinct type variables)
-
-Compilation had errors
-
tcfail045.hs:10:
Unacceptable instance type for ccall-ish class
class CCallable type Socket
-
-Compilation had errors
-
-tcfail046.hs:4:
- No instance for `Eq (Process a)'
- When deriving classes for `Continuation'
-
-Compilation had errors
-
+No instance for `Eq (Process a)'
+When deriving classes for `Message'
Illegal instance declaration for `A (a, (b, c))'
(the instance type must be of form (T a b c)
where T is not a synonym, and a,b,c are distinct type variables)
-
-Compilation had errors
-
tcfail048.hs:3: Type constructor or class not in scope: `B'
-
-Compilation had errors
-
tcfail049.hs:3: Variable not in scope: `g'
-
-Compilation had errors
-
tcfail050.hs:3: Data constructor not in scope: `B'
-
-Compilation had errors
-
tcfail051.hs:3: Type constructor or class not in scope: `B'
tcfail051.hs:4: Variable not in scope: `op1'
-
-Compilation had errors
-
tcfail052.hs:3: Type variable not in scope: `c'
-
-Compilation had errors
-
tcfail053.hs:3: Type constructor or class not in scope: `A'
-
-Compilation had errors
-
tcfail054.hs:3: Data constructor not in scope: `B'
-
-Compilation had errors
-
Expected type: Int
Inferred type: Float
In an expression with a type signature: x + 1 :: Int
-
-Compilation had errors
-
-tcfail056.hs:1:
- Duplicate or overlapping instance declarations
- for `Eq Foo'
- defined at tcfail056.hs:8 and defined at tcfail056.hs:5
-
-tcfail056.hs:10: Class `Eq' does not have a method `<='
-
-Compilation had errors
+Duplicate or overlapping instance declarations:
+ tcfail056.hs:5: {Eq Foo}
+ tcfail056.hs:8: {Eq Foo}
+tcfail056.hs:8: Class `Eq' does not have a method `<='
tcfail057.hs:5:
- Class used as a type constructor: RealFrac
- When checking kinds in `RealFrac a'
-
-Compilation had errors
-
+ Class `RealFrac' used as a type
+ In a type signature for `f'
tcfail058.hs:6:
- Type constructor used as a class: Array
+ Type constructor `Array' used as a class
When checking kinds in `Array a'
-
-Compilation had errors
-
+ In a type signature for `f'
-tcfail062.hs:33:
- Type variable not in scope: `behaviouralExpression'
-
-tcfail062.hs:33:
- Type variable not in scope: `behaviouralExpression'
-
-Compilation had errors
-
+tcfail062.hs:37:
+ Illegal polymorphic type as argument: BehaviouralRelation
+ In the type synonym declaration for `BehaviouralRelationList'
tcfail063.hs:4: Illegal class assertion
-
-Compilation had errors
-
tcfail065.hs:28:
Inferred type is less polymorphic than expected
- Quantified type variable `x' escapes
- It is reachable from the type variable(s) `x1'
- which is free in the signature
+ Quantified type variable `x' is unified with `x'
Signature type: forall x. x -> X x1 -> X x1
- Type to generalise: x1 -> X x1 -> X x1
+ Type to generalise: x -> X x -> X x
When checking the type signature for `setX'
In the definition for method `setX'
-
-Compilation had errors
-
tcfail067.hs:60:
- Could not deduce `Show (SubRange a)' from the context: (Num a)
- Probable cause: missing `Show (SubRange a)'
- in instance declaration context
- or missing instance declaration for `Show (SubRange a)'
+ Could not deduce `Show (SubRange a)' from the context (Num a1)
+ Probable fix:
+ Add `Show (SubRange a)' to the instance declaration context
+ Or add an instance declaration for `Show (SubRange a)'
arising from an instance declaration at tcfail067.hs:60
tcfail067.hs:61:
Could not deduce `Ord a'
- from the context: (Num (SubRange a),
- Num a,
- Eq (SubRange a),
- Show (SubRange a))
- Probable cause: missing `Ord a' in instance declaration context
+ from the context (Num (SubRange a1),
+ Num a1,
+ Eq (SubRange a1),
+ Show (SubRange a1))
+ Probable fix:
+ Add `Ord a' to the instance declaration context
arising from use of `numSubRangeNegate' at tcfail067.hs:61
- In the right-hand side of a pattern binding: numSubRangeNegate
+ In the right-hand side of an equation for `negate':
+ numSubRangeNegate
tcfail067.hs:74:
- Could not deduce `Ord a' from the context: (Num a)
- Probable cause: missing `Ord a'
- in type signature for `numSubRangeBinOp'
+ Could not deduce `Ord a' from the context (Num a)
+ Probable fix:
+ Add `Ord a' to the type signature for `numSubRangeBinOp'
arising from use of `SubRange' at tcfail067.hs:74
In the right-hand side of an equation for `numSubRangeBinOp':
SubRange (result, result) result
-
-Compilation had errors
-
It unifies with `s1', which is mentioned in the environment
The following variables in the environment mention `s1'
itrapstate' :: Int
- -> Int
- -> c
- -> ST s1 (c, STArray s1 (Int, Int) b)
+ -> Int -> c -> ST s1 (c, STArray s1 (Int, Int) b)
itrapstatesnd :: Int
- -> Int
- -> c
- -> ST s1 (c, STArray s1 (Int, Int) b)
+ -> Int -> c -> ST s1 (c, STArray s1 (Int, Int) b)
arr :: IndTree s1 b
Signature type: forall s. ST s a
Type to generalise: ST s1 (c, IndTree s1 b)
In the first argument of `runST', namely `(itrapstate' i k s)'
In the right-hand side of an equation for `itrapstate':
runST (itrapstate' i k s)
-
-Compilation had errors
-
Inferred type: (t1, t2)
In the scrutinee of a case expression: (list1, list2)
In the case expression: case (list1, list2) of [] -> error "foo"
-
-Compilation had errors
-
Inferred kind: * -> k
When checking kinds in `[Int] Bool'
In the type synonym declaration for `State'
-
-Compilation had errors
-
Inferred type: c
In the first argument of `f', namely `c'
In the first argument of `foldr', namely `(f c)'
-
-Compilation had errors
-
Ambiguous type variable(s) `q' in the constraint `Ord q'
arising from use of `g' at tcfail072.hs:23
In the right-hand side of an equation for `g': g A
-
-Compilation had errors
-
-tcfail073.hs:3:
- Duplicate or overlapping instance declarations
- for `Eq (a, b)'
- defined at tcfail073.hs:7 and imported from module `PrelTup'
+Duplicate or overlapping instance declarations:
+ tcfail073.hs:7: {Eq (a, b)}
+ /home/simonmar/builds/i386-unknown-linux/ghc/compiler/../lib/std/PrelTup.hi:66: {Eq (a,
+ b)}
tcfail073.hs:8:
- Could not deduce `Eq a' from the context: (Eq (a, b))
- Probable cause: missing `Eq a' in instance declaration context
+ Could not deduce `Eq a' from the context (Eq (a, b))
+ Probable fix:
+ Add `Eq a' to the instance declaration context
arising from use of `==' at tcfail073.hs:8
In the right-hand side of an equation for `==': m == o
-
-Compilation had errors
-
-tcfail075.hs:5:
- Top-level bindings for unlifted types aren't allowed x = 1#
+Top-level bindings for unlifted types aren't allowed: x = 1#
tcfail075.hs:12:
Couldn't match `#' against `*'
- Expected kind: #
- Inferred kind: *
When matching types `Int#' and `t'
Expected type: Int#
Inferred type: t
+ In the first argument of `(+#)', namely `x'
tcfail075.hs:15:
Couldn't match `#' against `*'
- Expected kind: #
- Inferred kind: *
When matching types `Int#' and `t'
Expected type: Int#
Inferred type: t
+ In the first argument of `(-#)', namely `x'
tcfail075.hs:17:
Couldn't match `#' against `*'
- Expected kind: #
- Inferred kind: *
When matching types `Int#' and `t'
Expected type: Int#
Inferred type: t
-
-Compilation had errors
-
+ In the first argument of `(>#)', namely `z'
tcfail076.hs:18:
Inferred type is less polymorphic than expected
Quantified type variable `res' escapes
- It is mentioned in the environment
- The following variables in the environment mention `res'
- cont :: a -> m res
+ It unifies with `res1', which is mentioned in the environment
+ The following variables in the environment mention `res1'
+ cont :: a -> m res1
Signature type: forall res. (a1 -> m1 res) -> m1 res
- Type to generalise: (b -> m res) -> m res
+ Type to generalise: (b -> m res1) -> m res1
When checking an expression type signature
In the first argument of `KContT', namely `(\ cont' -> cont a)'
In the right-hand side of a lambda abstraction:
KContT (\ cont' -> cont a)
-
-Compilation had errors
-
tcfail077.hs:8: Variable not in scope: `op2'
-
-Compilation had errors
-
tcfail078.hs:5:
- Type constructor used as a class: Integer
+ Type constructor `Integer' used as a class
When checking kinds in `Integer i'
-
-Compilation had errors
-
+ In a type signature for `f'
-tcfail079.hs:9:
- Couldn't match `*' against `#'
- Expected kind: *
- Inferred kind: #
- When checking that `Int#' is a type
- In the data type declaration for `Unboxed'
-
-Compilation had errors
-
+tcfail079.hs:7: Could not find interface file for `GlaExts'
In the first argument of `isempty', namely `(singleton x)'
In the right-hand side of an equation for `q':
isempty (singleton x)
-
-Compilation had errors
-
-tcfail081.hs:2:
- Cannot unify the type-signature variable `a' with the type `IO t'
- Expected type: IO t
- Inferred type: a
- When checking that `main' has the required type
-
-Compilation had errors
-
+Cannot unify the type-signature variable `a' with the type `IO t'
+ Expected type: IO t
+ Inferred type: a
+When checking that `main' has the required type
-tcfail082.hs:1:
- Duplicate or overlapping instance declarations
- for `Read FooData'
- imported from module `Inst82_1' and imported from module `Inst82_2'
+Duplicate or overlapping instance declarations:
+ ./Inst82_1.hi:8: {Read FooData}
+ ./Inst82_2.hi:8: {Read FooData}
tcfail082.hs:8:
No instance for `Show FooData'
arising from use of `print' at tcfail082.hs:8
- In the right-hand side of a pattern binding:
+ In the right-hand side of an equation for `main':
print ((read "FooData") :: FooData)
-
-Compilation had errors
-
In the pattern: State {bar = Bar {flag = f, baz = b}}
In an equation for function `display':
display (State {bar = Bar {flag = f, baz = b}}) = print (f, b)
-
-Compilation had errors
-
tcfail084.hs:10:
Constructor `F' does not have field `y'
In the record construction: F {y = 2}
- In the right-hand side of a pattern binding: F {y = 2}
-
-Compilation had errors
-
+ In the right-hand side of an equation for `z': F {y = 2}
tcfail085.hs:9:
Constructor `F' does not have the required strict field `y'
In the record construction: F {x = 2}
- In the right-hand side of a pattern binding: F {x = 2}
-
-Compilation had errors
-
+ In the right-hand side of an equation for `z': F {x = 2}
-tcfail086.hs:4:
- Can't derive any instances for type `Ex'
- because it has existentially-quantified constructor(s)
-
-Compilation had errors
-
+Can't derive any instances for type `Ex'
+because it has existentially-quantified constructor(s)
-
+
+tcfail087.hs:8:
+ Illegal unboxed tuple type as argument: (# Int, Int #)
+ In a type signature for `f'
Illegal polymorphic type as argument: forall b. b
When checking kinds in `T s (forall b. b)'
In a type signature for `g'
-
-Compilation had errors
-