Commit 584d954c authored by simonmar's avatar simonmar
Browse files

[project @ 2000-12-12 17:21:40 by simonmar]

Take a pass over the tests, get most things working again.  Mostly
-package lang changes, and synching up of the expected output.

This was a good exercise though: I found at least two real bugs in the
process :)
parent baa3f2a9
# -----------------------------------------------------------------------------
# $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
......@@ -12,6 +15,6 @@ arr007_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...
......
......@@ -2,6 +2,6 @@ TOP = ../..
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
......@@ -8,6 +8,3 @@ cc005.hs:10:
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
......@@ -18,16 +18,16 @@ SRC_HC_OPTS += -dcore-lint
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
......
......@@ -4,9 +4,9 @@ include $(TOP)/mk/should_compile.mk
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'
......@@ -10,12 +10,11 @@ endif
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
......@@ -48,3 +48,153 @@ 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
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
......@@ -8,30 +8,29 @@ include $(TOP)/mk/should_run.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
......@@ -41,7 +40,7 @@ memo001_RUNTEST_OPTS = +RTS -A10k -G1
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
......
......@@ -3,8 +3,8 @@ lex '\x0f2' = [("'\\x0f2'","")]
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'","")]
......
Supports Markdown
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