Commit 0bd88c95 authored by partain's avatar partain

[project @ 1996-01-08 20:13:28 by partain]

Initial revision
parent 05b55364

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

Workloads
~~~~~~~~~
* spectral/life, spectral/mandel,
#define IHaveSubdirs
SUBDIRS = arith001 \
arith002 \
arith003 \
arith004 \
arith005 \
arith006 \
arith007 \
arith008 \
array001 \
array002 \
bugs \
cg001 \
cg002 \
cg003 \
cg004 \
cg005 \
cg006 \
cg007 \
cg008 \
cg009 \
cg010 \
cg011 \
cg012 \
cg013 \
cg014 \
cg015 \
cg016 \
cg017 \
cg018 \
cg019 \
cg020 \
cg021 \
cg022 \
cg024 \
cg025 \
cg026 \
cg028 \
cg029 \
cg030 \
cg031 \
cg032 \
cg033 \
cg034 \
cg035 \
cg036 \
ghclib001 \
io001 /* 1.3 I/O */ \
io002 \
io003 \
io004 \
io005 \
io006 \
io007 \
io008 \
io009 \
io010 \
io011 \
io012 \
io013 \
io014 \
io015 \
io016 \
io017 \
io018 \
io019 \
io020 \
io021 \
obfuscated93 \
po001 /* LibPosix */ \
po002 \
po003 \
po004 \
po005 \
po006 \
po007 \
po008 \
po009 \
po010 \
po011 \
po012 \
net001 /* SocketPrim, BSD, Socket */ \
net002 \
net003 \
net004 \
net005 \
net006 \
net007 \
net008
/* LATER: specialise */
/* takes too long: put it back:ToDo: cg023 */
/* OLD: cg018 -- -feval-tran no longer supported */
/* cg027 : compile-time error */
runtests::
@echo '###############################################################'
@echo '# GHC tests that need to be *run* #'
@echo '###############################################################'
NoFibOneModuleCompileAndRun(arith001,)
--!!! conversions: Double <=> Rational/Integer things
--
main _
= [AppendChan stdout
(show r42 ++ "\n" ++
show nu42 ++ ", " ++
show de42 ++ "\n" ++
show nu42d ++ ", " ++
show de42d ++ "\n" ++
show s2 ++ ", " ++
show e2 ++ "\n" ++
show s ++ ", " ++
show e ++ "\n" )
]
where
d42 :: Double
r42 :: Rational
nu42, de42 :: Integer
nu42d, de42d :: Double
d42 = 42
r42 = toRational d42
nu42 = numerator r42
de42 = denominator r42
nu42d= fromInteger nu42
de42d= fromInteger de42
(s,e)= decodeFloat (nu42d / de42d )
(s2,e2) = decodeFloat d42
42 % 1
42, 1
42.000000000000000, 1.0000000000000000
5910974510923776, -47
5910974510923776, -47
NoFibOneModuleCompileAndRun(arith002,)
--!!! basic Rational operations
--
main _
= [AppendChan stdout
(-- Ratio Ints
show [i0a, i0b, i0c, i2a, i2b, im2a, im2b, i_pi, i_misc]
++ "\n"
-- the Ints
++ show ((map numerator [i0a, i0b, i0c, i2a, i2b, im2a, im2b, i_pi, i_misc])
++(map denominator [i0a, i0b, i0c, i2a, i2b, im2a, im2b, i_pi, i_misc]))
++ "\n"
-- Booleans
-- ++ show []
-- ++ "\n"
-- Rationals (Ratio Integers)
++ show [r0a, r0b, r0c, r2a, r2b, rm2a, rm2b, r_pi, r_misc]
++ "\n"
-- the Integers
++ show ((map numerator [r0a, r0b, r0c, r2a, r2b, rm2a, rm2b, r_pi, r_misc])
++(map denominator [r0a, r0b, r0c, r2a, r2b, rm2a, rm2b, r_pi, r_misc]))
++ "\n"
-- Booleans
-- ++ show []
-- ++ "\n"
)
]
where
i0a, i0b, i0c, i2a, i2b, im2a, im2b, i_pi, i_misc :: Ratio Int
i0a = 0 % 1
i0b = -0 % 1
i0c = 0 % -1
i2a = 4 % 2
i2b = -4 % -2
im2a = -4 % 2
im2b = 4 % -2
i_pi = 22 % 7
i_misc = 2 % 10000
r0a, r0b, r0c, r2a, r2b, rm2a, rm2b, r_pi, r_misc :: Rational
r0a = 0 % 1
r0b = -0 % 1
r0c = 0 % -1
r2a = 4 % 2
r2b = -4 % -2
rm2a = -4 % 2
rm2b = 4 % -2
r_pi = 22 % 7
r_misc = 2 % 10000
[0 % 1, 0 % 1, 0 % 1, 2 % 1, 2 % 1, -2 % 1, -2 % 1, 22 % 7, 1 % 5000]
[0, 0, 0, 2, 2, -2, -2, 22, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5000]
[0 % 1, 0 % 1, 0 % 1, 2 % 1, 2 % 1, -2 % 1, -2 % 1, 22 % 7, 1 % 5000]
[0, 0, 0, 2, 2, -2, -2, 22, 1, 1, 1, 1, 1, 1, 1, 1, 7, 5000]
NoFibOneModuleCompileAndRun(arith003,)
--!!! test arithmetic operations from "Prelude" (gcd, ldm, etc.)
--
main _
= [AppendChan stdout
(-- w/ Ints
show [
minInt, maxInt,
subtract i8 i4,
subtract i8m i4,
subtract maxInt i4,
subtract i0 minInt,
gcd i8 i6,
gcd i8m i6,
gcd i8m i6m,
gcd i8m i0,
gcd i0 i8m,
gcd (4070297::Int) (2695911::Int), -- 52,861
lcm i8 i6,
lcm i8m i6,
lcm i8m i6m,
lcm i8m i0,
lcm i0 i8m,
lcm (4070297::Int) (2695911::Int), -- 207,585,147
i8 ^ i0,
i8m ^ i4,
i4 ^ i6
-- ToDo: more stuff
]
++ "\n"
-- w/ Integers
++ show [
toInteger minInt, toInteger maxInt,
subtract i8I i4I,
subtract i8mI i4I,
subtract (toInteger maxInt) i4I,
subtract i0I (toInteger minInt),
gcd i8I i6I,
gcd i8mI i6I,
gcd i8mI i6mI,