Permalink
Browse files

[project @ 1999-01-23 18:10:00 by sof]

even more h98 updates, this time to codeGen tests
  • Loading branch information...
sof
sof committed Jan 23, 1999
1 parent eba9914 commit b2170318027ec00dbd71c29b9bd561a3956fa7f3
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.7 1998/07/08 10:36:45 simonm Exp $
+# $Id: Makefile,v 1.8 1999/01/23 18:10:00 sof Exp $
TOP = ../..
include $(TOP)/mk/boilerplate.mk
@@ -28,4 +28,9 @@ cg045_RUNTEST_OPTS = -x 1
# mkdependHS doesn't understand OPTIONS pragmas...
SRC_MKDEPENDHS_OPTS += -fglasgow-exts
+.PRECIOUS: %.bin %.o
+
+clean ::
+ rm -f *.bin *.o
+
include $(TOP)/mk/target.mk
@@ -1,4 +1,4 @@
---!! cg001: main = -42 -- take 1
+-- !! cg001: main = -42 -- take 1
main = print ( f () )
where
@@ -1,4 +1,4 @@
---!! answer: 65532
+-- !! answer: 65532
main = print foo
@@ -1,4 +1,4 @@
---!!! simple overloading example
+-- !!! simple overloading example
class Foo a where
foo :: a -> a -> Bool
@@ -1,4 +1,4 @@
---!!! move arguments around on the stacks, mainly the B stack
+-- !!! move arguments around on the stacks, mainly the B stack
import PrelBase ( Float#, Double#, Int#, Int(..) )
@@ -1,3 +1,3 @@
---!! cg014: main = -42 -- twice: in Float and Double
+-- !! cg014: main = -42 -- twice: in Float and Double
main = print ((show ( (-42) :: Float )) ++ " " ++ (show ( (-42) :: Double )) ++ "\n")
@@ -1,4 +1,4 @@
---!!! tests calls of `error' (that make calls of `error'...)
+-- !!! tests calls of `error' (that make calls of `error'...)
--
main = error ("1st call to error\n"++(
error ("2nd call to error\n"++(
@@ -1,4 +1,4 @@
---!!! test of cyclic default methods
+-- !!! test of cyclic default methods
--
class Foo a where
op1 :: Fractional b => a -> b -> Bool
@@ -1,4 +1,4 @@
---!!! test of datatype with many unboxed fields
+-- !!! test of datatype with many unboxed fields
--
import PrelBase
@@ -1,3 +1,3 @@
---!!! printing of floating-pt numbers
+-- !!! printing of floating-pt numbers
--
main = print (1.234e5 :: Float)
@@ -1,3 +1,3 @@
---!!! reading/showing of Ints/Integers
+-- !!! reading/showing of Ints/Integers
--
main = print ((read "-1") :: Integer)
@@ -1,5 +1,5 @@
---!!! Tests garbage collection in the branch of a case
---!!! alternative where the constructor is returned in the heap.
+-- !!! Tests garbage collection in the branch of a case
+-- !!! alternative where the constructor is returned in the heap.
{- This is also a rather stressful test for another reason.
The mutual recursion between munch and f causes lots of
@@ -1,5 +1,5 @@
---!!! tests stack stubbing: if "f" doesn't stub "ns",
---!!! the program has a space leak.
+-- !!! tests stack stubbing: if "f" doesn't stub "ns",
+-- !!! the program has a space leak.
module Main where
@@ -1,4 +1,4 @@
---!!! test super-dictionary grabification
+-- !!! test super-dictionary grabification
--
main = putStr (show (is_one (1.2::Double)))
@@ -1,4 +1,4 @@
---!!! test various I/O Requests
+-- !!! test various I/O Requests
--
--
import IO
@@ -1,7 +1,7 @@
"cg025.bin"
["cg025.hs"]
GOT PATH
---!!! test various I/O Requests
+-- !!! test various I/O Requests
--
--
import IO
@@ -1,4 +1,4 @@
---!!! simple tests of primitive arrays
+-- !!! simple tests of primitive arrays
--
module Main ( main ) where
@@ -29,7 +29,8 @@ test_chars
= let str = reverse "Now is the time for all good men to come to...\n"
in
unsafePerformIO (
- _ccall_ fprintf (``stdout''::Addr) "%d %s\n" 93 str >>
+ _ccall_ fprintf (``stdout''::Addr) "%d %s\n" (93::Int) str >>
+ _ccall_ fflush (``stdout''::Addr) >>
return ""
)
@@ -1,3 +1,5 @@
+93
+...ot emoc ot nem doog lla rof emit eht si woN
[1764,1849,1936,2025,2116,2209,2304,2401,2500,2601,2704,2809,2916,3025,3136,3249,3364,3481,3600,3721,3844,3969,4096,4225,4356,4489,4624,4761,4900,5041,5184,5329,5476,5625,5776,5929,6084,6241,6400,6561,6724,6889,7056,7225,7396,7569,7744,7921,8100,8281,8464,8649,8836,9025,9216,9409,9604,9801,10000,10201,10404,10609,10816,11025,11236,11449,11664,11881,12100,12321,12544,12769,12996,13225,13456,13689,13924,14161,14400,14641,14884,15129,15376,15625,15876,16129,16384,16641,16900,17161,17424,17689,17956,18225,18496,18769,19044,19321,19600,19881,20164,20449,20736,21025,21316,21609,21904,22201,22500,22801,23104,23409,23716,24025,24336,24649,24964,25281,25600,25921,26244,26569,26896,27225,27556,27889,28224,28561,28900,29241,29584,29929,30276,30625,30976,31329,31684,32041,32400,32761,33124,33489,33856,34225,34596,34969,35344,35721,36100,36481,36864,37249,37636,38025,38416,38809,39204,39601,40000,40401,40804,41209,41616,42025,42436,42849,43264,43681,44100,44521,44944,45369,45796,46225,46656,47089,47524,47961,48400,48841,49284,49729,50176,50625,51076,51529,51984,52441,52900,53361,53824,54289,54756,55225,55696,56169,56644,57121,57600,58081,58564,59049,59536,60025,60516,61009,61504,62001,62500,63001,63504,64009,64516,65025,65536,66049,66564,67081,67600,68121,68644,69169,69696,70225,70756,71289,71824,72361,72900,73441,73984,74529,75076,75625,76176,76729,77284,77841,78400,78961,79524,80089,80656,81225,81796,82369,82944,83521,84100,84681,85264,85849,86436,87025,87616,88209,88804,89401,90000,90601,91204,91809,92416,93025,93636,94249,94864,95481,96100,96721,97344,97969,98596,99225,99856,100489,101124,101761,102400,103041,103684,104329,104976,105625,106276,106929,107584,108241,108900,109561,110224,110889,111556,112225,112896,113569,114244,114921,115600,116281,116964,117649,118336,119025,119716,120409,121104,121801,122500,123201,123904,124609,125316,126025,126736,127449,128164,128881,129600,130321,131044,131769,132496,133225,133956,134689,135424,136161,136900,137641,138384,139129,139876,140625,141376,142129,142884,143641,144400,145161,145924,146689,147456,148225,148996,149769,150544,151321,152100,152881,153664,154449,155236,156025,156816,157609,158404,159201,160000,160801,161604,162409,163216,164025,164836,165649,166464,167281,168100,168921,169744,170569,171396,172225,173056]
@@ -9,5 +11,3 @@
[1764 % 1,1849 % 1,1936 % 1,2025 % 1,2116 % 1,2209 % 1,2304 % 1,2401 % 1,2500 % 1,2601 % 1,2704 % 1,2809 % 1,2916 % 1,3025 % 1,3136 % 1,3249 % 1,3364 % 1,3481 % 1,3600 % 1,3721 % 1,3844 % 1,3969 % 1,4096 % 1,4225 % 1,4356 % 1,4489 % 1,4624 % 1,4761 % 1,4900 % 1,5041 % 1,5184 % 1,5329 % 1,5476 % 1,5625 % 1,5776 % 1,5929 % 1,6084 % 1,6241 % 1,6400 % 1,6561 % 1,6724 % 1,6889 % 1,7056 % 1,7225 % 1,7396 % 1,7569 % 1,7744 % 1,7921 % 1,8100 % 1,8281 % 1,8464 % 1,8649 % 1,8836 % 1,9025 % 1,9216 % 1,9409 % 1,9604 % 1,9801 % 1,10000 % 1,10201 % 1,10404 % 1,10609 % 1,10816 % 1,11025 % 1,11236 % 1,11449 % 1,11664 % 1,11881 % 1,12100 % 1,12321 % 1,12544 % 1,12769 % 1,12996 % 1,13225 % 1,13456 % 1,13689 % 1,13924 % 1,14161 % 1,14400 % 1,14641 % 1,14884 % 1,15129 % 1,15376 % 1,15625 % 1,15876 % 1,16129 % 1,16384 % 1,16641 % 1,16900 % 1,17161 % 1,17424 % 1,17689 % 1,17956 % 1,18225 % 1,18496 % 1,18769 % 1,19044 % 1,19321 % 1,19600 % 1,19881 % 1,20164 % 1,20449 % 1,20736 % 1,21025 % 1,21316 % 1,21609 % 1,21904 % 1,22201 % 1,22500 % 1,22801 % 1,23104 % 1,23409 % 1,23716 % 1,24025 % 1,24336 % 1,24649 % 1,24964 % 1,25281 % 1,25600 % 1,25921 % 1,26244 % 1,26569 % 1,26896 % 1,27225 % 1,27556 % 1,27889 % 1,28224 % 1,28561 % 1,28900 % 1,29241 % 1,29584 % 1,29929 % 1,30276 % 1,30625 % 1,30976 % 1,31329 % 1,31684 % 1,32041 % 1,32400 % 1,32761 % 1,33124 % 1,33489 % 1,33856 % 1,34225 % 1,34596 % 1,34969 % 1,35344 % 1,35721 % 1,36100 % 1,36481 % 1,36864 % 1,37249 % 1,37636 % 1,38025 % 1,38416 % 1,38809 % 1,39204 % 1,39601 % 1,40000 % 1,40401 % 1,40804 % 1,41209 % 1,41616 % 1,42025 % 1,42436 % 1,42849 % 1,43264 % 1,43681 % 1,44100 % 1,44521 % 1,44944 % 1,45369 % 1,45796 % 1,46225 % 1,46656 % 1,47089 % 1,47524 % 1,47961 % 1,48400 % 1,48841 % 1,49284 % 1,49729 % 1,50176 % 1,50625 % 1,51076 % 1,51529 % 1,51984 % 1,52441 % 1,52900 % 1,53361 % 1,53824 % 1,54289 % 1,54756 % 1,55225 % 1,55696 % 1,56169 % 1,56644 % 1,57121 % 1,57600 % 1,58081 % 1,58564 % 1,59049 % 1,59536 % 1,60025 % 1,60516 % 1,61009 % 1,61504 % 1,62001 % 1,62500 % 1,63001 % 1,63504 % 1,64009 % 1,64516 % 1,65025 % 1,65536 % 1,66049 % 1,66564 % 1,67081 % 1,67600 % 1,68121 % 1,68644 % 1,69169 % 1,69696 % 1,70225 % 1,70756 % 1,71289 % 1,71824 % 1,72361 % 1,72900 % 1,73441 % 1,73984 % 1,74529 % 1,75076 % 1,75625 % 1,76176 % 1,76729 % 1,77284 % 1,77841 % 1,78400 % 1,78961 % 1,79524 % 1,80089 % 1,80656 % 1,81225 % 1,81796 % 1,82369 % 1,82944 % 1,83521 % 1,84100 % 1,84681 % 1,85264 % 1,85849 % 1,86436 % 1,87025 % 1,87616 % 1,88209 % 1,88804 % 1,89401 % 1,90000 % 1,90601 % 1,91204 % 1,91809 % 1,92416 % 1,93025 % 1,93636 % 1,94249 % 1,94864 % 1,95481 % 1,96100 % 1,96721 % 1,97344 % 1,97969 % 1,98596 % 1,99225 % 1,99856 % 1,100489 % 1,101124 % 1,101761 % 1,102400 % 1,103041 % 1,103684 % 1,104329 % 1,104976 % 1,105625 % 1,106276 % 1,106929 % 1,107584 % 1,108241 % 1,108900 % 1,109561 % 1,110224 % 1,110889 % 1,111556 % 1,112225 % 1,112896 % 1,113569 % 1,114244 % 1,114921 % 1,115600 % 1,116281 % 1,116964 % 1,117649 % 1,118336 % 1,119025 % 1,119716 % 1,120409 % 1,121104 % 1,121801 % 1,122500 % 1,123201 % 1,123904 % 1,124609 % 1,125316 % 1,126025 % 1,126736 % 1,127449 % 1,128164 % 1,128881 % 1,129600 % 1,130321 % 1,131044 % 1,131769 % 1,132496 % 1,133225 % 1,133956 % 1,134689 % 1,135424 % 1,136161 % 1,136900 % 1,137641 % 1,138384 % 1,139129 % 1,139876 % 1,140625 % 1,141376 % 1,142129 % 1,142884 % 1,143641 % 1,144400 % 1,145161 % 1,145924 % 1,146689 % 1,147456 % 1,148225 % 1,148996 % 1,149769 % 1,150544 % 1,151321 % 1,152100 % 1,152881 % 1,153664 % 1,154449 % 1,155236 % 1,156025 % 1,156816 % 1,157609 % 1,158404 % 1,159201 % 1,160000 % 1,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5,3 % 5]
-93
-...ot emoc ot nem doog lla rof emit eht si woN
@@ -1,4 +1,4 @@
---!!! simple test of 0-method classes
+-- !!! simple test of 0-method classes
--
class (Num a, Integral a) => Foo a
@@ -1,5 +1,5 @@
---!! test GEN reps w/ unboxed values in them
---!! NB: it was the static ones that were hosed...
+-- !! test GEN reps w/ unboxed values in them
+-- !! NB: it was the static ones that were hosed...
--
module Main ( main ) where
@@ -1,4 +1,4 @@
---!! pattern-matching failure on functions that return Int#
+-- !! pattern-matching failure on functions that return Int#
import PrelBase --ghc1.3
@@ -1,5 +1,5 @@
---!! worker/wrapper turns ( \ <absent> -> Int# ) function
---!! into Int# -- WRONG
+-- !! worker/wrapper turns ( \ <absent> -> Int# ) function
+-- !! into Int# -- WRONG
import PrelBase --ghc1.3
@@ -1,3 +1,4 @@
+-- !! fromRational woes
import Ratio -- 1.3
main = putStr (
@@ -32,8 +33,6 @@ main = putStr (
y_f = 1.82173691287639817263897126389712638972163e-300
y_d = 1.82173691287639817263897126389712638972163e-300
---!! fromRational woes
-
fromRationalX :: (RealFloat a) => Rational -> a
fromRationalX r =
let
@@ -1,6 +1,6 @@
---!! Won't compile unless the compile succeeds on
---!! the "single occurrence of big thing in a duplicated small thing"
---!! inlining old-chestnut. WDP 95/03
+-- !! Won't compile unless the compile succeeds on
+-- !! the "single occurrence of big thing in a duplicated small thing"
+-- !! inlining old-chestnut. WDP 95/03
--
module Main ( main, g ) where
@@ -1,6 +1,6 @@
---! From a Rick Morgan bug report:
---! Single-method class with a locally-polymorphic
---! method.
+-- !!! From a Rick Morgan bug report:
+-- !!! Single-method class with a locally-polymorphic
+-- !!! method.
module Main where
@@ -8,9 +8,9 @@ f1 :: Int -> Burble Int
f1 n = B1 { op1 = \x->x+n, op2 = \x -> x, op3 = n }
f2 :: Burble a -> Int -> Int
-f2 r@(B1 {op1, op2}) n = op1 (op2 n) + op3 r
+f2 r@(B1 {op1 = op1 , op2 = op2 }) n = op1 (op2 n) + op3 r
f3 :: Burble a -> Burble a
-f3 x@(B1 {op3}) = x {op3 = op3+1}
+f3 x@(B1 {op3=op3}) = x {op3 = op3+1}
main = print (f2 (f3 (f1 3)) 4)
@@ -1,4 +1,4 @@
---!!! mutable Double array test (ncg test)
+-- !!! mutable Double array test (ncg test)
--
module Main ( main ) where
@@ -1,6 +1,6 @@
---!!! Tickled a bug in core2stg
---!!! (CoreSyn.Coerce constructors were not peeled off
---!!! when converting CoreSyn.App)
+-- !!! Tickled a bug in core2stg
+-- !!! (CoreSyn.Coerce constructors were not peeled off
+-- !!! when converting CoreSyn.App)
module Main where
@@ -1,4 +1,4 @@
---!!! Testing IEEE Float and Double extremity predicates.
+-- !!! Testing IEEE Float and Double extremity predicates.
module Main(main) where
main :: IO ()
@@ -2,7 +2,7 @@ module Main where
import IO
---!!! CAF space leaks
+-- !!! CAF space leaks
main = lots_of_xs 10000

0 comments on commit b217031

Please sign in to comment.