From 334e7e63b1bfd04a7c712d9715e56c5e2fed0e33 Mon Sep 17 00:00:00 2001 From: dnt Date: Tue, 26 Nov 1996 12:47:54 +0000 Subject: [PATCH] [project @ 1996-11-26 12:46:28 by dnt] Merged in changes from new-build-system branch --- ghc/compiler/tests/Jmakefile | 10 -- ghc/compiler/tests/Makefile | 6 + ghc/compiler/tests/README | 97 ++++------ ghc/compiler/tests/ccall/Jmakefile | 21 --- ghc/compiler/tests/ccall/Makefile | 18 ++ ghc/compiler/tests/ccall/cc005.hs | 25 +++ ghc/compiler/tests/ccall/cc005.stderr | 188 ++++++++++++++++++++ ghc/compiler/tests/ccall/cc006.hs | 21 +++ ghc/compiler/tests/ccall/cc006.stderr | 140 +++++++++++++++ ghc/compiler/tests/ccall/cc007.hs | 29 +++ ghc/compiler/tests/deSugar/Jmakefile | 54 ------ ghc/compiler/tests/deSugar/Makefile | 14 ++ .../tests/deSugar/cvh-ds-unboxed/Jmakefile | 3 - ghc/compiler/tests/deriving/Jmakefile | 9 - ghc/compiler/tests/deriving/Makefile | 7 + ghc/compiler/tests/printing/Jmakefile | 9 - ghc/compiler/tests/printing/Makefile | 10 ++ ghc/compiler/tests/reader/Jmakefile | 9 - ghc/compiler/tests/reader/Makefile | 9 + ghc/compiler/tests/rename/Jmakefile | 29 --- ghc/compiler/tests/rename/Makefile | 17 ++ ghc/compiler/tests/rename/bevan-bug-1/Jmakefile | 4 - ghc/compiler/tests/simplCore/Jmakefile | 10 -- ghc/compiler/tests/simplCore/Makefile | 7 + ghc/compiler/tests/simplCore/simpl001.hs | 3 +- ghc/compiler/tests/typecheck/Jmakefile | 6 - ghc/compiler/tests/typecheck/Makefile | 6 + ghc/compiler/tests/typecheck/should_fail/Jmakefile | 78 -------- ghc/compiler/tests/typecheck/should_fail/Makefile | 19 ++ .../tests/typecheck/should_succeed/Jmakefile | 93 ---------- .../tests/typecheck/should_succeed/Makefile | 9 + ghc/compiler/tests/typecheck/stress/Makefile | 5 + ghc/compiler/tests/validation-misc/Jmakefile | 11 -- 33 files changed, 563 insertions(+), 413 deletions(-) delete mode 100644 ghc/compiler/tests/Jmakefile create mode 100644 ghc/compiler/tests/Makefile delete mode 100644 ghc/compiler/tests/ccall/Jmakefile create mode 100644 ghc/compiler/tests/ccall/Makefile create mode 100644 ghc/compiler/tests/ccall/cc005.hs create mode 100644 ghc/compiler/tests/ccall/cc005.stderr create mode 100644 ghc/compiler/tests/ccall/cc006.hs create mode 100644 ghc/compiler/tests/ccall/cc006.stderr create mode 100644 ghc/compiler/tests/ccall/cc007.hs create mode 100644 ghc/compiler/tests/ccall/cc007.stderr delete mode 100644 ghc/compiler/tests/deSugar/Jmakefile create mode 100644 ghc/compiler/tests/deSugar/Makefile delete mode 100644 ghc/compiler/tests/deSugar/cvh-ds-unboxed/Jmakefile create mode 100644 ghc/compiler/tests/deSugar/ds-wildcard.stderr create mode 100644 ghc/compiler/tests/deSugar/ds014a.stderr delete mode 100644 ghc/compiler/tests/deriving/Jmakefile create mode 100644 ghc/compiler/tests/deriving/Makefile delete mode 100644 ghc/compiler/tests/printing/Jmakefile create mode 100644 ghc/compiler/tests/printing/Makefile delete mode 100644 ghc/compiler/tests/reader/Jmakefile create mode 100644 ghc/compiler/tests/reader/Makefile create mode 100644 ghc/compiler/tests/reader/expr001.stderr create mode 100644 ghc/compiler/tests/reader/read003.stderr delete mode 100644 ghc/compiler/tests/rename/Jmakefile create mode 100644 ghc/compiler/tests/rename/Makefile delete mode 100644 ghc/compiler/tests/rename/bevan-bug-1/Jmakefile create mode 100644 ghc/compiler/tests/rename/timing001.stderr create mode 100644 ghc/compiler/tests/rename/timing002.stderr create mode 100644 ghc/compiler/tests/rename/timing003.stderr delete mode 100644 ghc/compiler/tests/simplCore/Jmakefile create mode 100644 ghc/compiler/tests/simplCore/Makefile delete mode 100644 ghc/compiler/tests/typecheck/Jmakefile create mode 100644 ghc/compiler/tests/typecheck/Makefile delete mode 100644 ghc/compiler/tests/typecheck/should_fail/Jmakefile create mode 100644 ghc/compiler/tests/typecheck/should_fail/Makefile create mode 100644 ghc/compiler/tests/typecheck/should_fail/tcfail064.hs create mode 100644 ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr delete mode 100644 ghc/compiler/tests/typecheck/should_succeed/Jmakefile create mode 100644 ghc/compiler/tests/typecheck/should_succeed/Makefile create mode 100644 ghc/compiler/tests/typecheck/stress/Makefile create mode 100644 ghc/compiler/tests/typecheck/stress/tcstress001.stderr delete mode 100644 ghc/compiler/tests/validation-misc/Jmakefile diff --git a/ghc/compiler/tests/Jmakefile b/ghc/compiler/tests/Jmakefile deleted file mode 100644 index 8450a82..0000000 --- a/ghc/compiler/tests/Jmakefile +++ /dev/null @@ -1,10 +0,0 @@ -#define IHaveSubdirs - -SUBDIRS = reader \ - rename \ - simplCore \ - typecheck \ - deSugar \ - printing \ - ccall \ - deriving diff --git a/ghc/compiler/tests/Makefile b/ghc/compiler/tests/Makefile new file mode 100644 index 0000000..70541f9 --- /dev/null +++ b/ghc/compiler/tests/Makefile @@ -0,0 +1,6 @@ +TOP = ../../.. +include $(TOP)/ghc/mk/ghc.mk + +SUBDIRS = reader rename simplCore typecheck deSugar printing ccall deriving + +include $(TOP)/mk/subdir.mk diff --git a/ghc/compiler/tests/README b/ghc/compiler/tests/README index 467ae42..b84a5fc 100644 --- a/ghc/compiler/tests/README +++ b/ghc/compiler/tests/README @@ -1,77 +1,42 @@ -Installing a new compiler test -============================== +------------------------------------------------------------------------------- + GHC COMPILER TESTS +------------------------------------------------------------------------------- -[If the test if for the driver, the parser, the runtime system, the -std prelude, ... in short _not_ the compiler, it belongs elsewhere.] +This directory contains tests for various bits of the internals of ghc. +Note that tests for other parts of the ghc system (such as the driver, +parser, runtime system, standard prelude) belong elsewhere. -1. Copy your Haskell program into an appropriately named file in the - appropriate directory, e.g., "typecheck/tc093.hs" for the 93rd - typechecker test. +Each test takes the form of a single program (for example, reader001.hs) +and a files which specify ghc's expected error output (reader001.stderr). -2. Edit the Jmakefile in that dir to add your test: almost certainly - just a line of the form... +"make reader001.runtest" will compile reader001.hs using ghc and compare +the resulting output with that specified in the file reader001.stderr. -RunStdTest(tc093,$(TESTGHC), "-ddump-tc tc093.hs", 0, /dev/null, tc093.stderr) - ^^^^^ -name of test|||| - ^^^^^^^^^^ -driver to use----|||||||||| - ^^^^^^^^^^^^^^^^^^^^ -driver command line----------|||||||||||||||||||| - ^^ -expected exit status (0=success, 1=failure)-------|| - ^^^^^^^^^ -file holding expected standard output----------------||||||||| - ^^^^^^^^^^^^^ -file holding expected output on standard error------------------||||||||||||| +"make runtests" run all tests. - The example above is typical. The command-line stuff may vary, - but it's likely to be "dump pass output" (e.g., -ddump-tc) - and the input file name. Dump output is on stderr, hence the - expected-output files. +------------------------------------------------------------------------------- + ADDING A NEW TEST +------------------------------------------------------------------------------- - The current best documentation of the flags to use is in - $(TOP)/driver/ghc (invoke w/ -help option). +To add a new test copy your Haskell program into an appropriately named +file in the appropriate directory (for example, "typecheck/tc093.hs" for +the 93rd typechecker test). -3. Create the expected-output files. I'm usually lazy and just - "touch" them (creating an empty file), then update them (section - below) after the test has "failed". +Edit the Makefile in that directory to add your test. Most directories +have some flags which are set for every test (RUNSTDTEST_OPTS), but you can +also set some extra per-file runtest flags (to control the output of ghc, +for instance). Just set ttc093_flags to the flags you want. -4. "make Makefile", to make a Makefile from the Jmakefile. +For example, -5. "make runtest_" (e.g., make runtest_tc093) to run the - one test. + tc093_flags = -noC -ddump-tc -x1 - IF "make" FALLS OVER, THEN IMMEDIATEDLY "mv Makefile.bak Makefile"!! - You probably had a typo in the Jmakefile; fix it and resume from - step 4. +-noC tells not bother generating any C (not point in doing that, since we +only want to test the typechecker). -ddump-tc tells ghc to dump the +typechcker state, while -x1 tells runtest that the expected exit code is 1, +not 0 (the default). - -Running tests -============= - -* You may run all tests by typing "make runtests" (or, if you expect - or don't mind errors, "make -k runtests"). - -* You may run one test with "make runtest_". - -* You may run tests to with a simple script, - "dotests ". You may pass "make" arguments to it as well, - as in: - dotests -k tc019 tc028 - - -Updating the "expected output" files -==================================== - -Sometimes, it will happen that the differences between expected and -actual output of the tests will not mean failure but that the actual -output is "more correct". - -If you save the output of "make runtests" (mainly from "diff"), you -may automatically update the expected-output files by using - - patch -p0 < saved-output - -(You should probably ^C out of the "patch" if it doesn't do exactly -what you expect.) +"touch" the file tc093.stderr. "make tc093.runtest" will then build +tc093.runtest and fail (because the expected output doesn't match the empty +tc093.stderr). However, it is then easy to update tc093.stderr with the +stuff printed out during "make tc093.runtest". diff --git a/ghc/compiler/tests/ccall/Jmakefile b/ghc/compiler/tests/ccall/Jmakefile deleted file mode 100644 index 1327782..0000000 --- a/ghc/compiler/tests/ccall/Jmakefile +++ /dev/null @@ -1,21 +0,0 @@ -runtests:: - @echo '###############################################################' - @echo '# Validation tests for the ccall desugaring, etc. #' - @echo '###############################################################' - -/* NB 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... */ - -/* Flags used when testing typechecker and desugaring */ -DS_FLAGS= -fglasgow-exts -noC -dcore-lint -ddump-tc -ddump-ds - -RunStdTest(cc001,$(GHC), $(DS_FLAGS) cc001.hs -o2 cc001.stderr) -RunStdTest(cc002,$(GHC), $(DS_FLAGS) cc002.hs -o2 cc002.stderr) -RunStdTest(cc003,$(GHC), $(DS_FLAGS) cc003.hs -x1 -o2 cc003.stderr) -RunStdTest(cc004,$(GHC), $(DS_FLAGS) cc004.hs -o2 cc004.stderr) - -/* Flags used when testing code generation */ -CG_FLAGS= -fglasgow-exts -via-C -dcore-lint -ddump-stg -ddump-flatC - - diff --git a/ghc/compiler/tests/ccall/Makefile b/ghc/compiler/tests/ccall/Makefile new file mode 100644 index 0000000..e9fde1b --- /dev/null +++ b/ghc/compiler/tests/ccall/Makefile @@ -0,0 +1,18 @@ +TOP = ../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -fglasgow-exts -dcore-lint +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +# 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... + +cc001_flags = -noC -ddump-tc -ddump-ds +cc002_flags = -noC -ddump-tc -ddump-ds +cc003_flags = -noC -ddump-tc -ddump-ds -x1 +cc004_flags = -noC -ddump-tc -ddump-ds +cc005_flags = -via-C -ddump-stg -ddump-flatC +cc006_flags = -via-C -ddump-stg -ddump-flatC +cc007_flags = -via-C -ddump-stg -ddump-flatC diff --git a/ghc/compiler/tests/ccall/cc005.hs b/ghc/compiler/tests/ccall/cc005.hs new file mode 100644 index 0000000..c26a53f --- /dev/null +++ b/ghc/compiler/tests/ccall/cc005.hs @@ -0,0 +1,25 @@ +--!!! cc001 -- ccall with standard boxed arguments and results + +module Test where + +import PreludeGlaST + +-- simple functions + +a :: PrimIO Int +a = _ccall_ a + +b :: Int -> PrimIO Int +b x = _ccall_ b x + +c :: Int -> Char -> Float -> Double -> PrimIO Float +c x1 x2 x3 x4 = _ccall_ c x1 x2 x3 x4 + +-- simple monadic code + +d = a `thenPrimIO` \ x -> + b x `thenPrimIO` \ y -> + c y 'f' 1.0 2.0 + + + diff --git a/ghc/compiler/tests/ccall/cc005.stderr b/ghc/compiler/tests/ccall/cc005.stderr new file mode 100644 index 0000000..ab13745 --- /dev/null +++ b/ghc/compiler/tests/ccall/cc005.stderr @@ -0,0 +1,188 @@ +Typechecked: +lit.t444 = D# 2.0000000000000000## +lit.t443 = F# 1.0000000000000000# +AbsBinds [] [] [(a.t439, Test.a{-r79-})] + {- nonrec -} + a.t439 :: IoWorld -> (Int, IoWorld) + a.t439 + = ccall a [Int] +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(b.t440, Test.b{-r80-})] + {- nonrec -} + b.t440 :: Int -> IoWorld -> (Int, IoWorld) + b.t440 + x.r212 = ccall b [Int, Int] x.r212 +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(c.t441, Test.c{-r81-})] + {- nonrec -} + c.t441 :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) + c.t441 + x1.r213 x2.r214 x3.r215 x4.r216 + = ccall c [Float, Int, Char, Float, Double] + x1.r213 x2.r214 x3.r215 x4.r216 +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(d.t442, Test.d{-r82-})] + {- nonrec -} + d.t442 :: IoWorld -> (Float, IoWorld) + d.t442 + = (thenIO{-r102-} [Int, Float]) + Test.a{-r79-} + (\ x.r217 -> (thenIO{-r102-} [Int, Float]) + (Test.b{-r80-} x.r217) + (\ y.r218 -> Test.c{-r81-} + y.r218 'f' lit.t443 lit.t444)) +{- nonrec -} +{- nonrec -} +Desugared: +{- plain CoRec -} +lit.t444 :: Double +_NI_ +lit.t444 = (\ tpl.d0# -> D#! tpl.d0#) 2.0000000000000000## +lit.t443 :: Float +_NI_ +lit.t443 = (\ tpl.d1# -> F#! tpl.d1#) 1.0000000000000000# +Test.a{-r79-} :: IoWorld -> (Int, IoWorld) +_NI_ +Test.a{-r79-} = + \ ds.d2 -> + case + (case + (case ds.d2 of { + IoWorld ds.d3# -> ds.d3# + }) + of { + a.d8# -> ( _CCALL_ a [] Int# )! a.d8# + }) + of { + IntPrimAndIoWorld ds.d4# ds.d5# -> + let { + a.d6 :: Int + _NI_ + a.d6 = I#! ds.d4# } in + let { + a.d7 :: IoWorld + _NI_ + a.d7 = IoWorld! ds.d5# + } in Tup2! Int IoWorld a.d6 a.d7 + } +Test.b{-r80-} :: Int -> IoWorld -> (Int, IoWorld) +_NI_ +Test.b{-r80-} = + \ x.r212 ds.d9 -> + case + (case + (case ds.d9 of { + IoWorld ds.d10# -> ds.d10# + }) + of { + a.d16# -> + case + (case x.r212 of { + I# ds.d11# -> ds.d11# + }) + of { + a.d17# -> ( _CCALL_ b [Int#] Int# )! a.d16# a.d17# + } + }) + of { + IntPrimAndIoWorld ds.d12# ds.d13# -> + let { + a.d14 :: Int + _NI_ + a.d14 = I#! ds.d12# } in + let { + a.d15 :: IoWorld + _NI_ + a.d15 = IoWorld! ds.d13# + } in Tup2! Int IoWorld a.d14 a.d15 + } +Test.c{-r81-} :: Int -> Char -> Float -> Double -> IoWorld -> (Float, IoWorld) +_NI_ +Test.c{-r81-} = + \ x1.r213 x2.r214 x3.r215 x4.r216 ds.d18 -> + case + (case + (case ds.d18 of { + IoWorld ds.d19# -> ds.d19# + }) + of { + a.d28# -> + case + (case x1.r213 of { + I# ds.d20# -> ds.d20# + }) + of { + a.d29# -> + case + (case x2.r214 of { + C# ds.d21# -> ds.d21# + }) + of { + a.d30# -> + case + (case x3.r215 of { + F# ds.d22# -> ds.d22# + }) + of { + a.d31# -> + case + (case x4.r216 of { + D# ds.d23# -> ds.d23# + }) + of { + a.d32# -> + ( _CCALL_ c [Int#, + Char#, + Float#, + Double#] Float# )! + a.d28# + a.d29# + a.d30# + a.d31# + a.d32# + } + } + } + } + }) + of { + FloatPrimAndIoWorld ds.d24# ds.d25# -> + let { + a.d26 :: Float + _NI_ + a.d26 = F#! ds.d24# } in + let { + a.d27 :: IoWorld + _NI_ + a.d27 = IoWorld! ds.d25# + } in Tup2! Float IoWorld a.d26 a.d27 + } +Test.d{-r82-} :: IoWorld -> (Float, IoWorld) +_NI_ +Test.d{-r82-} = + let { + a.d36 :: Int -> IoWorld -> (Float, IoWorld) + _NI_ + a.d36 = + \ x.r217 -> + let { + a.d35 :: Int -> IoWorld -> (Float, IoWorld) + _NI_ + a.d35 = + \ y.r218 -> + (let { + a.d33 :: Char + _NI_ + a.d33 = C#! 'f'# + } in Test.c{-r81-} y.r218 a.d33) lit.t443 lit.t444 + } in + (let { + a.d34 :: IoWorld -> (Int, IoWorld) + _NI_ + a.d34 = Test.b{-r80-} x.r217 + } in ((thenIO{-r102-} Int) Float) a.d34) a.d35 + } in ((thenIO{-r102-} Int) Float) Test.a{-r79-} a.d36 +{- end plain CoRec -} diff --git a/ghc/compiler/tests/ccall/cc006.hs b/ghc/compiler/tests/ccall/cc006.hs new file mode 100644 index 0000000..95a061b --- /dev/null +++ b/ghc/compiler/tests/ccall/cc006.hs @@ -0,0 +1,21 @@ +--!!! cc002 -- ccall with non-standard boxed arguments and results + +module Test where + +import PreludeGlaST + +-- Test returning results + +a :: PrimIO ForeignObj +a = _ccall_ a + +b :: PrimIO StablePtr +b = _ccall_ b + +-- Test taking arguments + +c :: ForeignObj -> PrimIO Int +c x = _ccall_ c x + +d :: StablePtr -> PrimIO Int +d x = _ccall_ d x diff --git a/ghc/compiler/tests/ccall/cc006.stderr b/ghc/compiler/tests/ccall/cc006.stderr new file mode 100644 index 0000000..2f097cf --- /dev/null +++ b/ghc/compiler/tests/ccall/cc006.stderr @@ -0,0 +1,140 @@ +Typechecked: +AbsBinds [] [] [(a.t439, Test.a{-r79-})] + {- nonrec -} + a.t439 :: IoWorld -> (CHeapPtr, IoWorld) + a.t439 + = ccall a [CHeapPtr] +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(b.t440, Test.b{-r80-})] + {- nonrec -} + b.t440 :: IoWorld -> (StablePtr, IoWorld) + b.t440 + = ccall b [StablePtr] +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(c.t441, Test.c{-r81-})] + {- nonrec -} + c.t441 :: CHeapPtr -> IoWorld -> (Int, IoWorld) + c.t441 + x.r211 = ccall c [Int, CHeapPtr] x.r211 +{- nonrec -} +{- nonrec -} +AbsBinds [] [] [(d.t442, Test.d{-r82-})] + {- nonrec -} + d.t442 :: StablePtr -> IoWorld -> (Int, IoWorld) + d.t442 + x.r212 = ccall d [Int, StablePtr] x.r212 +{- nonrec -} +{- nonrec -} +Desugared: +Test.a{-r79-} :: IoWorld -> (CHeapPtr, IoWorld) +_NI_ +Test.a{-r79-} = + \ ds.d0 -> + case + (case + (case ds.d0 of { + IoWorld ds.d1# -> ds.d1# + }) + of { + a.d6# -> ( _CCALL_ a [] CHeapPtr# )! a.d6# + }) + of { + CHPPrimAndIoWorld ds.d2# ds.d3# -> + let { + a.d4 :: CHeapPtr + _NI_ + a.d4 = CHP#! ds.d2# } in + let { + a.d5 :: IoWorld + _NI_ + a.d5 = IoWorld! ds.d3# + } in Tup2! CHeapPtr IoWorld a.d4 a.d5 + } +Test.b{-r80-} :: IoWorld -> (StablePtr, IoWorld) +_NI_ +Test.b{-r80-} = + \ ds.d7 -> + case + (case + (case ds.d7 of { + IoWorld ds.d8# -> ds.d8# + }) + of { + a.d13# -> ( _CCALL_ b [] StablePtr# )! a.d13# + }) + of { + SPPrimAndIoWorld ds.d9# ds.d10# -> + let { + a.d11 :: StablePtr + _NI_ + a.d11 = StablePtr#! ds.d9# } in + let { + a.d12 :: IoWorld + _NI_ + a.d12 = IoWorld! ds.d10# + } in Tup2! StablePtr IoWorld a.d11 a.d12 + } +Test.c{-r81-} :: CHeapPtr -> IoWorld -> (Int, IoWorld) +_NI_ +Test.c{-r81-} = + \ x.r211 ds.d14 -> + case + (case + (case ds.d14 of { + IoWorld ds.d15# -> ds.d15# + }) + of { + a.d21# -> + case + (case x.r211 of { + CHP# ds.d16# -> ds.d16# + }) + of { + a.d22# -> ( _CCALL_ c [CHeapPtr#] Int# )! a.d21# a.d22# + } + }) + of { + IntPrimAndIoWorld ds.d17# ds.d18# -> + let { + a.d19 :: Int + _NI_ + a.d19 = I#! ds.d17# } in + let { + a.d20 :: IoWorld + _NI_ + a.d20 = IoWorld! ds.d18# + } in Tup2! Int IoWorld a.d19 a.d20 + } +Test.d{-r82-} :: StablePtr -> IoWorld -> (Int, IoWorld) +_NI_ +Test.d{-r82-} = + \ x.r212 ds.d23 -> + case + (case + (case ds.d23 of { + IoWorld ds.d24# -> ds.d24# + }) + of { + a.d30# -> + case + (case x.r212 of { + StablePtr# ds.d25# -> ds.d25# + }) + of { + a.d31# -> ( _CCALL_ d [StablePtr#] Int# )! a.d30# a.d31# + } + }) + of { + IntPrimAndIoWorld ds.d26# ds.d27# -> + let { + a.d28 :: Int + _NI_ + a.d28 = I#! ds.d26# } in + let { + a.d29 :: IoWorld + _NI_ + a.d29 = IoWorld! ds.d27# + } in Tup2! Int IoWorld a.d28 a.d29 + } diff --git a/ghc/compiler/tests/ccall/cc007.hs b/ghc/compiler/tests/ccall/cc007.hs new file mode 100644 index 0000000..6dee399 --- /dev/null +++ b/ghc/compiler/tests/ccall/cc007.hs @@ -0,0 +1,29 @@ +--!!! cc004 -- ccall with synonyms, polymorphic type variables and user type variables. +module Test where + +import PreludeGlaST + +-- Since I messed up the handling of polymorphism originally, I'll +-- explicitly test code with UserSysTyVar (ie an explicit polymorphic +-- signature) + +foo = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) + where + thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b + m `thenADR` k = \ s -> case m s of + (a,t) -> k a t + +-- and with a PolySysTyVar (ie no explicit signature) + +bar = _ccall_ f `thenADR` \ a -> returnPrimIO (a + 1) + where + -- thenADR :: PrimIO a -> (a -> PrimIO b) -> PrimIO b + m `thenADR` k = \ s -> case m s of + (a,t) -> k a t + +-- and with a type synonym + +type INT = Int +barfu :: PrimIO INT +barfu = _ccall_ b + diff --git a/ghc/compiler/tests/ccall/cc007.stderr b/ghc/compiler/tests/ccall/cc007.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/deSugar/Jmakefile b/ghc/compiler/tests/deSugar/Jmakefile deleted file mode 100644 index e513463..0000000 --- a/ghc/compiler/tests/deSugar/Jmakefile +++ /dev/null @@ -1,54 +0,0 @@ -#define IHaveSubdirs - -SUBDIRS = cvh-ds-unboxed - -runtests:: - @echo '###############################################################' - @echo '# Validation tests for the desugarer. #' - @echo '###############################################################' - -FLAGS=-noC -ddump-ds -dcore-lint - -RunStdTest(ds001,$(GHC), $(FLAGS) ds001.hs -o2 ds001.stderr) -RunStdTest(ds002,$(GHC), $(FLAGS) ds002.hs -o2 ds002.stderr) -RunStdTest(ds003,$(GHC), $(FLAGS) ds003.hs -o2 ds003.stderr) -RunStdTest(ds004,$(GHC), $(FLAGS) ds004.hs -o2 ds004.stderr) -RunStdTest(ds005,$(GHC), $(FLAGS) ds005.hs -o2 ds005.stderr) -RunStdTest(ds006,$(GHC), $(FLAGS) ds006.hs -o2 ds006.stderr) -RunStdTest(ds007,$(GHC), $(FLAGS) ds007.hs -o2 ds007.stderr) -RunStdTest(ds008,$(GHC), $(FLAGS) ds008.hs -o2 ds008.stderr) -RunStdTest(ds009,$(GHC), $(FLAGS) ds009.hs -o2 ds009.stderr) -RunStdTest(ds010,$(GHC), $(FLAGS) ds010.hs -o2 ds010.stderr) -RunStdTest(ds011,$(GHC), $(FLAGS) ds011.hs -o2 ds011.stderr) -RunStdTest(ds012,$(GHC), $(FLAGS) ds012.hs -o2 ds012.stderr) -RunStdTest(ds013,$(GHC), $(FLAGS) ds013.hs -o2 ds013.stderr) - -RunStdTest(ds014,$(GHC), $(FLAGS) ds014.hs -o2 ds014.stderr) -AsPartOfTest(ds014,@echo 'ds014a -- some things that should NOT go through -- not done yet') - -RunStdTest(ds015,$(GHC), $(FLAGS) ds015.hs -o2 ds015.stderr) -RunStdTest(ds016,$(GHC), $(FLAGS) ds016.hs -o2 ds016.stderr) -RunStdTest(ds017,$(GHC), $(FLAGS) ds017.hs -o2 ds017.stderr) -RunStdTest(ds018,$(GHC), $(FLAGS) ds018.hs -o2 ds018.stderr) -RunStdTest(ds019,$(GHC), $(FLAGS) ds019.hs -o2 ds019.stderr) -RunStdTest(ds020,$(GHC), $(FLAGS) ds020.hs -o2 ds020.stderr) -RunStdTest(ds021,$(GHC), $(FLAGS) ds021.hs -o2 ds021.stderr) -RunStdTest(ds022,$(GHC), $(FLAGS) ds022.hs -o2 ds022.stderr) -RunStdTest(ds023,$(GHC), $(FLAGS) ds023.hs -o2 ds023.stderr) -RunStdTest(ds024,$(GHC), $(FLAGS) ds024.hs -o2 ds024.stderr) -RunStdTest(ds025,$(GHC), $(FLAGS) ds025.hs -o2 ds025.stderr) -RunStdTest(ds026,$(GHC), $(FLAGS) ds026.hs -o2 ds026.stderr) -RunStdTest(ds027,$(GHC), $(FLAGS) ds027.hs -o2 ds027.stderr) -RunStdTest(ds028,$(GHC), $(FLAGS) ds028.hs -o2 ds028.stderr) -RunStdTest(ds029,$(GHC), $(FLAGS) ds029.hs -o2 ds029.stderr) -RunStdTest(ds030,$(GHC), $(FLAGS) ds030.hs -dppr-all -o2 ds030.stderr) -RunStdTest(ds031,$(GHC), $(FLAGS) ds031.hs -o2 ds031.stderr) -RunStdTest(ds032,$(GHC), $(FLAGS) ds032.hs -o2 ds032.stderr) -RunStdTest(ds033,$(GHC), $(FLAGS) ds033.hs -o2 ds033.stderr) -RunStdTest(ds034,$(GHC), $(FLAGS) ds034.hs -o2 ds034.stderr) -RunStdTest(ds035,$(GHC), -fglasgow-exts $(FLAGS) ds035.hs -o2 ds035.stderr) -RunStdTest(ds036,$(GHC), $(FLAGS) ds036.hs -o2 ds036.stderr) -RunStdTest(ds037,$(GHC), $(FLAGS) ds037.hs -o2 ds037.stderr) -RunStdTest(ds038,$(GHC), $(FLAGS) ds038.hs -o2 ds038.stderr) -RunStdTest(ds039,$(GHC), $(FLAGS) -dppr-all ds039.hs -o2 ds039.stderr) -RunStdTest(ds040,$(GHC), $(FLAGS) ds040.hs -o2 ds040.stderr) diff --git a/ghc/compiler/tests/deSugar/Makefile b/ghc/compiler/tests/deSugar/Makefile new file mode 100644 index 0000000..38f5c87 --- /dev/null +++ b/ghc/compiler/tests/deSugar/Makefile @@ -0,0 +1,14 @@ +TOP = ../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -noC -ddump-ds -dcore-lint +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + @echo 'TODO: ds014a -- some things that should NOT go through' + +#SUBDIRS = cvh-ds-unboxed + +ds030_flags = -dppr-all +ds035_flags = -fglasgow-exts +ds039_flags = -dppr-all diff --git a/ghc/compiler/tests/deSugar/cvh-ds-unboxed/Jmakefile b/ghc/compiler/tests/deSugar/cvh-ds-unboxed/Jmakefile deleted file mode 100644 index a418eb6..0000000 --- a/ghc/compiler/tests/deSugar/cvh-ds-unboxed/Jmakefile +++ /dev/null @@ -1,3 +0,0 @@ -FLAGS=-noC -ddump-ds -fglasgow-exts - -RunStdTest(cvh-unbox1,$(GHC),$(FLAGS) Life2.lhs -o2 cvh-unbox1.stderr) diff --git a/ghc/compiler/tests/deSugar/ds-wildcard.stderr b/ghc/compiler/tests/deSugar/ds-wildcard.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/deSugar/ds014a.stderr b/ghc/compiler/tests/deSugar/ds014a.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/deriving/Jmakefile b/ghc/compiler/tests/deriving/Jmakefile deleted file mode 100644 index e676c5c..0000000 --- a/ghc/compiler/tests/deriving/Jmakefile +++ /dev/null @@ -1,9 +0,0 @@ -TEST_FLAGS=-noC -ddump-tc -dcore-lint -hi - -RunStdTest(drv001,$(GHC),$(TEST_FLAGS) drv001.hs -o2 drv001.stderr) -RunStdTest(drv002,$(GHC),$(TEST_FLAGS) drv002.hs -o2 drv002.stderr) -RunStdTest(drv003,$(GHC),$(TEST_FLAGS) drv003.hs -o2 drv003.stderr) -RunStdTest(drv004,$(GHC),$(TEST_FLAGS) drv004.hs -o2 drv004.stderr) -RunStdTest(drv005,$(GHC),$(TEST_FLAGS) drv005.hs -o2 drv005.stderr) -RunStdTest(drv006,$(GHC),$(TEST_FLAGS) drv006.hs -o2 drv006.stderr) -RunStdTest(drv007,$(GHC),$(TEST_FLAGS) drv007.hs -o2 drv007.stderr) diff --git a/ghc/compiler/tests/deriving/Makefile b/ghc/compiler/tests/deriving/Makefile new file mode 100644 index 0000000..b07508f --- /dev/null +++ b/ghc/compiler/tests/deriving/Makefile @@ -0,0 +1,7 @@ +TOP = ../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -noC -ddump-tc -dcore-lint -hi +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) diff --git a/ghc/compiler/tests/printing/Jmakefile b/ghc/compiler/tests/printing/Jmakefile deleted file mode 100644 index 86b4238..0000000 --- a/ghc/compiler/tests/printing/Jmakefile +++ /dev/null @@ -1,9 +0,0 @@ -runtests:: - @echo '###############################################################' - @echo '# Tests of printing facilities in the compiler. #' - @echo '###############################################################' - -RunStdTest(print001,$(GHC), -noC -hi Print001.hs -o2 Print001.stderr) -RunStdTest(print002,$(GHC), -noC -fno-implicit-prelude -dppr-user -ddump-rif2hs -ddump-tc -hi Print002.hs -o2 Print002.stderr) -RunStdTest(print003,$(GHC), -noC -hi Print003.hs -o2 Print003.stderr) -RunStdTest(print004,$(GHC), -noC -hi Print004.hs -o2 Print004.stderr) diff --git a/ghc/compiler/tests/printing/Makefile b/ghc/compiler/tests/printing/Makefile new file mode 100644 index 0000000..bc227b9 --- /dev/null +++ b/ghc/compiler/tests/printing/Makefile @@ -0,0 +1,10 @@ +TOP = ../../../.. +GhcRunTestRules = YES +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +print001_flags = -noC -hi +print002_flags = -noC -fno-implicit-prelude -dppr-user -ddump-rif2hs -ddump-tc -hi +print003_flags = -noC -hi +print004_flags = -noC -hi diff --git a/ghc/compiler/tests/reader/Jmakefile b/ghc/compiler/tests/reader/Jmakefile deleted file mode 100644 index 60e7f91..0000000 --- a/ghc/compiler/tests/reader/Jmakefile +++ /dev/null @@ -1,9 +0,0 @@ -runtests:: - @echo '###############################################################' - @echo '# Validation tests for the reader in the compiler. #' - @echo '###############################################################' - -RunStdTest(read001,$(GHC), -noC -ddump-rif2hs read001.hs -o2 read001.stderr) -RunStdTest(read002,$(GHC), -noC -ddump-rif2hs read002.hs -o2 read002.stderr) -/* gap 003 */ -RunStdTest(read004,$(GHC), -noC -fno-implicit-prelude -ddump-rif2hs read004.hs -o2 read004.stderr) diff --git a/ghc/compiler/tests/reader/Makefile b/ghc/compiler/tests/reader/Makefile new file mode 100644 index 0000000..d974058 --- /dev/null +++ b/ghc/compiler/tests/reader/Makefile @@ -0,0 +1,9 @@ +TOP = ../../../.. +GhcRunTestRules = YES +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +read001_flags = -noC -ddump-rif2hs +read002_flags = -noC -ddump-rif2hs +read004_flags = -noC -fno-implicit-prelude -ddump-rif2hs diff --git a/ghc/compiler/tests/reader/expr001.stderr b/ghc/compiler/tests/reader/expr001.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/reader/read003.stderr b/ghc/compiler/tests/reader/read003.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/rename/Jmakefile b/ghc/compiler/tests/rename/Jmakefile deleted file mode 100644 index aff8571..0000000 --- a/ghc/compiler/tests/rename/Jmakefile +++ /dev/null @@ -1,29 +0,0 @@ -#define IHaveSubdirs - -SUBDIRS = bevan-bug-1 - -runtests:: - @echo '###############################################################' - @echo '# Validation tests for the renamer (incl dependency analysis) #' - @echo '###############################################################' - -TEST_FLAGS=/*-ddump-rn1 -ddump-rn2 -ddump-rn3*/ -ddump-rn - -RunStdTest(rn001,$(GHC), -noC $(TEST_FLAGS) rn001.hs -o2 rn001.stderr -x1) -RunStdTest(rn002,$(GHC), -noC $(TEST_FLAGS) rn002.hs -o2 rn002.stderr -x1) -RunStdTest(rn003,$(GHC), -noC $(TEST_FLAGS) rn003.hs -o2 rn003.stderr) -RunStdTest(rn004,$(GHC), -noC $(TEST_FLAGS) rn004.hs -o2 rn004.stderr -x1) -RunStdTest(rn005,$(GHC), -noC $(TEST_FLAGS) rn005.hs -o2 rn005.stderr) -RunStdTest(rn006,$(GHC), -noC $(TEST_FLAGS) rn006.hs -o2 rn006.stderr) -RunStdTest(rn007,$(GHC), -noC $(TEST_FLAGS) rn007.hs -o2 rn007.stderr -x1) -RunStdTest(rn008,$(GHC), -noC $(TEST_FLAGS) rn008.hs -o2 rn008.stderr -x1) -RunStdTest(rn009,$(GHC), -noC $(TEST_FLAGS) rn009.hs -o2 rn009.stderr) -RunStdTest(rn010,$(GHC), -noC $(TEST_FLAGS) rn010.hs -o2 rn010.stderr) -RunStdTest(rn011,$(GHC), -noC $(TEST_FLAGS) rn011.hs -o2 rn011.stderr) -RunStdTest(rn012,$(GHC), -noC $(TEST_FLAGS) rn012.hs -o2 rn012.stderr) -RunStdTest(rn013,$(GHC), -noC $(TEST_FLAGS) rn013.hs -o2 rn013.stderr) -RunStdTest(rn014,$(GHC), -noC $(TEST_FLAGS) rn014.hs -o2 rn014.stderr) -RunStdTest(rn015,$(GHC), -noC $(TEST_FLAGS) rn015.hs -o2 rn015.stderr -x1) -RunStdTest(rn016,$(GHC), -noC $(TEST_FLAGS) rn016.hs -o2 rn016.stderr) -XCOMM for rn017, the interface produced is what matters -RunStdTest(rn017,$(GHC), -noC $(TEST_FLAGS) -hi rn017.hs -o2 rn017.stderr) diff --git a/ghc/compiler/tests/rename/Makefile b/ghc/compiler/tests/rename/Makefile new file mode 100644 index 0000000..25be41a --- /dev/null +++ b/ghc/compiler/tests/rename/Makefile @@ -0,0 +1,17 @@ +TOP = ../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -ddump-rn -noC +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +#SUBDIRS = bevan-bug-1 + +rn001_flags = -x1 +rn002_flags = -x1 +rn004_flags = -x1 +rn007_flags = -x1 +rn008_flags = -x1 +rn015_flags = -x1 +rn017_flags = -hi diff --git a/ghc/compiler/tests/rename/bevan-bug-1/Jmakefile b/ghc/compiler/tests/rename/bevan-bug-1/Jmakefile deleted file mode 100644 index bdf38e7..0000000 --- a/ghc/compiler/tests/rename/bevan-bug-1/Jmakefile +++ /dev/null @@ -1,4 +0,0 @@ -XCOMM a renamer bug sent in by Stephen Bevan; -XCOMM going as far as -ddump-tc guarantees that renaming was happy. - -RunStdTest(bevan-bug-1,$(GHC), -noC -ddump-tc Lexer_Ops.lhs -o2 bevan-bug-1.stderr) diff --git a/ghc/compiler/tests/rename/timing001.stderr b/ghc/compiler/tests/rename/timing001.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/rename/timing002.stderr b/ghc/compiler/tests/rename/timing002.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/rename/timing003.stderr b/ghc/compiler/tests/rename/timing003.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/simplCore/Jmakefile b/ghc/compiler/tests/simplCore/Jmakefile deleted file mode 100644 index 06ea194..0000000 --- a/ghc/compiler/tests/simplCore/Jmakefile +++ /dev/null @@ -1,10 +0,0 @@ -runtests:: - @echo '###############################################################' - @echo '# Validation tests for the simplifier. #' - @echo '###############################################################' - -FLAGS=-noC -O -ddump-simpl -dcore-lint - -/* 001 is really a desugarer test, but it is only tickled by the simplifier */ -RunStdTest(simpl001,$(GHC), $(FLAGS) simpl001.hs -o2 simpl001.stderr) -RunStdTest(simpl002,$(GHC), $(FLAGS) simpl002.hs -o2 simpl002.stderr) diff --git a/ghc/compiler/tests/simplCore/Makefile b/ghc/compiler/tests/simplCore/Makefile new file mode 100644 index 0000000..6f36b84 --- /dev/null +++ b/ghc/compiler/tests/simplCore/Makefile @@ -0,0 +1,7 @@ +TOP = ../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -noC -O -ddump-simpl -dcore-lint +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) diff --git a/ghc/compiler/tests/simplCore/simpl001.hs b/ghc/compiler/tests/simplCore/simpl001.hs index 99cf51d..79e00ec 100644 --- a/ghc/compiler/tests/simplCore/simpl001.hs +++ b/ghc/compiler/tests/simplCore/simpl001.hs @@ -1,5 +1,6 @@ --!!! Desugaring sections with function-type arguments --- +-- Although this is really a desugaring test, the problem is +-- only tickled by the simplifier -- type Foo a b = a -> (b -> a) -> b diff --git a/ghc/compiler/tests/typecheck/Jmakefile b/ghc/compiler/tests/typecheck/Jmakefile deleted file mode 100644 index 7c079c0..0000000 --- a/ghc/compiler/tests/typecheck/Jmakefile +++ /dev/null @@ -1,6 +0,0 @@ -#define IHaveSubdirs - -SUBDIRS = /* TEMPORARILY OUT: check_mess */ \ - should_fail \ - /* TEMPORARILY OUT: test_exps */ \ - should_succeed diff --git a/ghc/compiler/tests/typecheck/Makefile b/ghc/compiler/tests/typecheck/Makefile new file mode 100644 index 0000000..4d26d0d --- /dev/null +++ b/ghc/compiler/tests/typecheck/Makefile @@ -0,0 +1,6 @@ +TOP = ../../../.. +include $(TOP)/ghc/mk/ghc.mk + +SUBDIRS = should_fail should_succeed stress + +include $(TOP)/mk/subdir.mk diff --git a/ghc/compiler/tests/typecheck/should_fail/Jmakefile b/ghc/compiler/tests/typecheck/should_fail/Jmakefile deleted file mode 100644 index 8ab9db4..0000000 --- a/ghc/compiler/tests/typecheck/should_fail/Jmakefile +++ /dev/null @@ -1,78 +0,0 @@ -TEST_FLAGS=-noC -ddump-tc - -RunStdTest(tcfail001,$(GHC),$(TEST_FLAGS) tcfail001.hs -x1 -o2 tcfail001.stderr) -RunStdTest(tcfail002,$(GHC),$(TEST_FLAGS) tcfail002.hs -x1 -o2 tcfail002.stderr) -RunStdTest(tcfail003,$(GHC),$(TEST_FLAGS) tcfail003.hs -x1 -o2 tcfail003.stderr) -RunStdTest(tcfail004,$(GHC),$(TEST_FLAGS) tcfail004.hs -x1 -o2 tcfail004.stderr) -RunStdTest(tcfail005,$(GHC),$(TEST_FLAGS) tcfail005.hs -x1 -o2 tcfail005.stderr) -RunStdTest(tcfail006,$(GHC),$(TEST_FLAGS) tcfail006.hs -x1 -o2 tcfail006.stderr) -RunStdTest(tcfail007,$(GHC),$(TEST_FLAGS) tcfail007.hs -x1 -o2 tcfail007.stderr) -RunStdTest(tcfail008,$(GHC),$(TEST_FLAGS) tcfail008.hs -x1 -o2 tcfail008.stderr) -RunStdTest(tcfail009,$(GHC),$(TEST_FLAGS) tcfail009.hs -x1 -o2 tcfail009.stderr) - -RunStdTest(tcfail010,$(GHC),$(TEST_FLAGS) tcfail010.hs -x1 -o2 tcfail010.stderr) -RunStdTest(tcfail011,$(GHC),$(TEST_FLAGS) tcfail011.hs -x1 -o2 tcfail011.stderr) -RunStdTest(tcfail012,$(GHC),$(TEST_FLAGS) tcfail012.hs -x1 -o2 tcfail012.stderr) -RunStdTest(tcfail013,$(GHC),$(TEST_FLAGS) tcfail013.hs -x1 -o2 tcfail013.stderr) -RunStdTest(tcfail014,$(GHC),$(TEST_FLAGS) tcfail014.hs -x1 -o2 tcfail014.stderr) -RunStdTest(tcfail015,$(GHC),$(TEST_FLAGS) tcfail015.hs -x1 -o2 tcfail015.stderr) -RunStdTest(tcfail016,$(GHC),$(TEST_FLAGS) tcfail016.hs -x1 -o2 tcfail016.stderr) -RunStdTest(tcfail017,$(GHC),$(TEST_FLAGS) tcfail017.hs -x1 -o2 tcfail017.stderr) -RunStdTest(tcfail018,$(GHC),$(TEST_FLAGS) tcfail018.hs -x1 -o2 tcfail018.stderr) -RunStdTest(tcfail019,$(GHC),$(TEST_FLAGS) tcfail019.hs -x1 -o2 tcfail019.stderr) - -RunStdTest(tcfail020,$(GHC),$(TEST_FLAGS) tcfail020.hs -x1 -o2 tcfail020.stderr) -RunStdTest(tcfail021,$(GHC),$(TEST_FLAGS) tcfail021.hs -x1 -o2 tcfail021.stderr) -RunStdTest(tcfail022,$(GHC),$(TEST_FLAGS) tcfail022.hs -x1 -o2 tcfail022.stderr) -RunStdTest(tcfail023,$(GHC),$(TEST_FLAGS) tcfail023.hs -x1 -o2 tcfail023.stderr) -RunStdTest(tcfail024,$(GHC),$(TEST_FLAGS) tcfail024.hs -x1 -o2 tcfail024.stderr) -RunStdTest(tcfail025,$(GHC),$(TEST_FLAGS) tcfail025.hs -x1 -o2 tcfail025.stderr) -RunStdTest(tcfail026,$(GHC),$(TEST_FLAGS) tcfail026.hs -x1 -o2 tcfail026.stderr) -RunStdTest(tcfail027,$(GHC),$(TEST_FLAGS) tcfail027.hs -x1 -o2 tcfail027.stderr) -RunStdTest(tcfail028,$(GHC),$(TEST_FLAGS) tcfail028.hs -x1 -o2 tcfail028.stderr) -RunStdTest(tcfail029,$(GHC),$(TEST_FLAGS) tcfail029.hs -x1 -o2 tcfail029.stderr) - -RunStdTest(tcfail030,$(GHC),$(TEST_FLAGS) tcfail030.hs -x1 -o2 tcfail030.stderr) -RunStdTest(tcfail031,$(GHC),$(TEST_FLAGS) tcfail031.hs -x1 -o2 tcfail031.stderr) -RunStdTest(tcfail032,$(GHC),$(TEST_FLAGS) tcfail032.hs -x1 -o2 tcfail032.stderr) -RunStdTest(tcfail033,$(GHC),$(TEST_FLAGS) tcfail033.hs -x1 -o2 tcfail033.stderr) -RunStdTest(tcfail034,$(GHC),$(TEST_FLAGS) tcfail034.hs -x1 -o2 tcfail034.stderr) -RunStdTest(tcfail035,$(GHC),$(TEST_FLAGS) tcfail035.hs -x1 -o2 tcfail035.stderr) -RunStdTest(tcfail036,$(GHC),$(TEST_FLAGS) tcfail036.hs -x1 -o2 tcfail036.stderr) -RunStdTest(tcfail037,$(GHC),$(TEST_FLAGS) tcfail037.hs -x1 -o2 tcfail037.stderr) -RunStdTest(tcfail038,$(GHC),$(TEST_FLAGS) tcfail038.hs -x1 -o2 tcfail038.stderr) -RunStdTest(tcfail039,$(GHC),$(TEST_FLAGS) tcfail039.hs -x1 -o2 tcfail039.stderr) - -RunStdTest(tcfail040,$(GHC),$(TEST_FLAGS) tcfail040.hs -x1 -o2 tcfail040.stderr) -RunStdTest(tcfail041,$(GHC),$(TEST_FLAGS) tcfail041.hs -x1 -o2 tcfail041.stderr) -RunStdTest(tcfail042,$(GHC),$(TEST_FLAGS) tcfail042.hs -x1 -o2 tcfail042.stderr) -RunStdTest(tcfail043,$(GHC),$(TEST_FLAGS) tcfail043.hs -x1 -o2 tcfail043.stderr) -RunStdTest(tcfail044,$(GHC),$(TEST_FLAGS) tcfail044.hs -x1 -o2 tcfail044.stderr) -RunStdTest(tcfail045,$(GHC),$(TEST_FLAGS) -fglasgow-exts tcfail045.hs -x1 -o2 tcfail045.stderr) -RunStdTest(tcfail046,$(GHC),$(TEST_FLAGS) tcfail046.hs -x1 -o2 tcfail046.stderr) -RunStdTest(tcfail047,$(GHC),$(TEST_FLAGS) tcfail047.hs -x1 -o2 tcfail047.stderr) -RunStdTest(tcfail048,$(GHC),$(TEST_FLAGS) tcfail048.hs -x1 -o2 tcfail048.stderr) -RunStdTest(tcfail049,$(GHC),$(TEST_FLAGS) tcfail049.hs -x1 -o2 tcfail049.stderr) - -RunStdTest(tcfail050,$(GHC),$(TEST_FLAGS) tcfail050.hs -x1 -o2 tcfail050.stderr) -RunStdTest(tcfail051,$(GHC),$(TEST_FLAGS) tcfail051.hs -x1 -o2 tcfail051.stderr) -RunStdTest(tcfail052,$(GHC),$(TEST_FLAGS) tcfail052.hs -x1 -o2 tcfail052.stderr) -RunStdTest(tcfail053,$(GHC),$(TEST_FLAGS) tcfail053.hs -x1 -o2 tcfail053.stderr) -RunStdTest(tcfail054,$(GHC),$(TEST_FLAGS) tcfail054.hs -x1 -o2 tcfail054.stderr) -RunStdTest(tcfail055,$(GHC),$(TEST_FLAGS) tcfail055.hs -x1 -o2 tcfail055.stderr) -RunStdTest(tcfail056,$(GHC),$(TEST_FLAGS) tcfail056.hs -x1 -o2 tcfail056.stderr) -RunStdTest(tcfail057,$(GHC),$(TEST_FLAGS) tcfail057.hs -x1 -o2 tcfail057.stderr) -RunStdTest(tcfail058,$(GHC),$(TEST_FLAGS) tcfail058.hs -x1 -o2 tcfail058.stderr) -RunStdTest(tcfail059,$(GHC),$(TEST_FLAGS) -hi tcfail059.hs -x1 -o2 tcfail059.stderr) - -RunStdTest(tcfail060,$(GHC),$(TEST_FLAGS) -hi tcfail060.hs -x1 -o2 tcfail060.stderr) -RunStdTest(tcfail061,$(GHC),$(TEST_FLAGS) -hi tcfail061.hs -x1 -o2 tcfail061.stderr) -RunStdTest(tcfail062,$(GHC),$(TEST_FLAGS) -hi tcfail062.hs -x1 -o2 tcfail062.stderr) -RunStdTest(tcfail063,$(GHC),$(TEST_FLAGS) -hi tcfail063.hs -x1 -o2 tcfail063.stderr) -RunStdTest(tcfail064,$(GHC),$(TEST_FLAGS) -hi Fail064.hs -x1 -o2 tcfail064.stderr) -RunStdTest(tcfail065,$(GHC),$(TEST_FLAGS) -hi tcfail065.hs -x1 -o2 tcfail065.stderr) -RunStdTest(tcfail066,$(GHC),$(TEST_FLAGS) -hi tcfail066.hs -x1 -o2 tcfail066.stderr) -RunStdTest(tcfail067,$(GHC),$(TEST_FLAGS) -hi tcfail067.hs -x1 -o2 tcfail067.stderr) -RunStdTest(tcfail068,$(GHC) -fglasgow-exts,$(TEST_FLAGS) -hi tcfail068.hs -x1 -o2 tcfail068.stderr) - -RunStdTest(Digraph,$(GHC),$(TEST_FLAGS) Digraph.hs -x1 -o2 Digraph.stderr) diff --git a/ghc/compiler/tests/typecheck/should_fail/Makefile b/ghc/compiler/tests/typecheck/should_fail/Makefile new file mode 100644 index 0000000..a3594b8 --- /dev/null +++ b/ghc/compiler/tests/typecheck/should_fail/Makefile @@ -0,0 +1,19 @@ +TOP = ../../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -noC -ddump-tc -x1 +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +tcfail045_flags = -fglasgow-exts +tcfail059_flags = -hi +tcfail060_flags = -hi +tcfail061_flags = -hi +tcfail062_flags = -hi +tcfail063_flags = -hi +tcfail064_flags = -hi +tcfail065_flags = -hi +tcfail066_flags = -hi +tcfail067_flags = -hi +tcfail068_flags = -fglasgow-exts diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail064.hs b/ghc/compiler/tests/typecheck/should_fail/tcfail064.hs new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr b/ghc/compiler/tests/typecheck/should_fail/tcfail064.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/typecheck/should_succeed/Jmakefile b/ghc/compiler/tests/typecheck/should_succeed/Jmakefile deleted file mode 100644 index e29a59c..0000000 --- a/ghc/compiler/tests/typecheck/should_succeed/Jmakefile +++ /dev/null @@ -1,93 +0,0 @@ -TEST_FLAGS=-noC -ddump-tc -dcore-lint -hi - -RunStdTest(tc001,$(GHC),$(TEST_FLAGS) tc001.hs -o2 tc001.stderr) -RunStdTest(tc002,$(GHC),$(TEST_FLAGS) tc002.hs -o2 tc002.stderr) -RunStdTest(tc003,$(GHC),$(TEST_FLAGS) tc003.hs -o2 tc003.stderr) -RunStdTest(tc004,$(GHC),$(TEST_FLAGS) tc004.hs -o2 tc004.stderr) -RunStdTest(tc005,$(GHC),$(TEST_FLAGS) tc005.hs -o2 tc005.stderr) -RunStdTest(tc006,$(GHC),$(TEST_FLAGS) tc006.hs -o2 tc006.stderr) -RunStdTest(tc007,$(GHC),$(TEST_FLAGS) tc007.hs -o2 tc007.stderr) -RunStdTest(tc008,$(GHC),$(TEST_FLAGS) tc008.hs -o2 tc008.stderr) -RunStdTest(tc009,$(GHC),$(TEST_FLAGS) tc009.hs -o2 tc009.stderr) - -RunStdTest(tc010,$(GHC),$(TEST_FLAGS) tc010.hs -o2 tc010.stderr) -RunStdTest(tc011,$(GHC),$(TEST_FLAGS) tc011.hs -o2 tc011.stderr) -RunStdTest(tc012,$(GHC),$(TEST_FLAGS) tc012.hs -o2 tc012.stderr) -RunStdTest(tc013,$(GHC),$(TEST_FLAGS) tc013.hs -o2 tc013.stderr) -RunStdTest(tc014,$(GHC),$(TEST_FLAGS) tc014.hs -o2 tc014.stderr) -RunStdTest(tc015,$(GHC),$(TEST_FLAGS) tc015.hs -o2 tc015.stderr) -RunStdTest(tc016,$(GHC),$(TEST_FLAGS) tc016.hs -o2 tc016.stderr) -RunStdTest(tc017,$(GHC),$(TEST_FLAGS) tc017.hs -o2 tc017.stderr) -RunStdTest(tc018,$(GHC),$(TEST_FLAGS) tc018.hs -o2 tc018.stderr) -RunStdTest(tc019,$(GHC),$(TEST_FLAGS) -fglasgow-exts tc019.hs -o2 tc019.stderr) - -RunStdTest(tc020,$(GHC),$(TEST_FLAGS) tc020.hs -o2 tc020.stderr) -RunStdTest(tc021,$(GHC),$(TEST_FLAGS) tc021.hs -o2 tc021.stderr) -RunStdTest(tc022,$(GHC),$(TEST_FLAGS) tc022.hs -o2 tc022.stderr) -RunStdTest(tc023,$(GHC),$(TEST_FLAGS) tc023.hs -o2 tc023.stderr) -RunStdTest(tc024,$(GHC),$(TEST_FLAGS) tc024.hs -o2 tc024.stderr) -RunStdTest(tc025,$(GHC),$(TEST_FLAGS) tc025.hs -o2 tc025.stderr) -RunStdTest(tc026,$(GHC),$(TEST_FLAGS) tc026.hs -o2 tc026.stderr) -RunStdTest(tc027,$(GHC),$(TEST_FLAGS) tc027.hs -o2 tc027.stderr) -RunStdTest(tc028,$(GHC),$(TEST_FLAGS) tc028.hs -o2 tc028.stderr) -RunStdTest(tc029,$(GHC),$(TEST_FLAGS) tc029.hs -o2 tc029.stderr) - -RunStdTest(tc030,$(GHC),$(TEST_FLAGS) tc030.hs -o2 tc030.stderr) -RunStdTest(tc031,$(GHC),$(TEST_FLAGS) tc031.hs -o2 tc031.stderr) -RunStdTest(tc032,$(GHC),$(TEST_FLAGS) tc032.hs -o2 tc032.stderr) -RunStdTest(tc033,$(GHC),$(TEST_FLAGS) tc033.hs -o2 tc033.stderr) -RunStdTest(tc034,$(GHC),$(TEST_FLAGS) tc034.hs -o2 tc034.stderr) -RunStdTest(tc035,$(GHC),$(TEST_FLAGS) tc035.hs -o2 tc035.stderr) -RunStdTest(tc036,$(GHC),$(TEST_FLAGS) tc036.hs -o2 tc036.stderr) -RunStdTest(tc037,$(GHC),$(TEST_FLAGS) tc037.hs -o2 tc037.stderr) -RunStdTest(tc038,$(GHC),$(TEST_FLAGS) tc038.hs -o2 tc038.stderr) -RunStdTest(tc039,$(GHC),$(TEST_FLAGS) tc039.hs -o2 tc039.stderr) - -RunStdTest(tc040,$(GHC),$(TEST_FLAGS) tc040.hs -o2 tc040.stderr) -RunStdTest(tc041,$(GHC),$(TEST_FLAGS) tc041.hs -o2 tc041.stderr) -RunStdTest(tc042,$(GHC),$(TEST_FLAGS) tc042.hs -o2 tc042.stderr) -RunStdTest(tc043,$(GHC),$(TEST_FLAGS) tc043.hs -o2 tc043.stderr) -RunStdTest(tc044,$(GHC),$(TEST_FLAGS) tc044.hs -o2 tc044.stderr) -RunStdTest(tc045,$(GHC),$(TEST_FLAGS) tc045.hs -o2 tc045.stderr) -RunStdTest(tc046,$(GHC),$(TEST_FLAGS) tc046.hs -o2 tc046.stderr) -RunStdTest(tc047,$(GHC),$(TEST_FLAGS) tc047.hs -o2 tc047.stderr) -RunStdTest(tc048,$(GHC),$(TEST_FLAGS) tc048.hs -o2 tc048.stderr) -RunStdTest(tc049,$(GHC),$(TEST_FLAGS) tc049.hs -o2 tc049.stderr) - -RunStdTest(tc050,$(GHC),$(TEST_FLAGS) tc050.hs -o2 tc050.stderr) -RunStdTest(tc051,$(GHC),$(TEST_FLAGS) tc051.hs -o2 tc051.stderr) -RunStdTest(tc052,$(GHC),$(TEST_FLAGS) tc052.hs -o2 tc052.stderr) -RunStdTest(tc053,$(GHC),$(TEST_FLAGS) tc053.hs -o2 tc053.stderr) -RunStdTest(tc054,$(GHC),$(TEST_FLAGS) tc054.hs -o2 tc054.stderr) -RunStdTest(tc055,$(GHC),$(TEST_FLAGS) tc055.hs -o2 tc055.stderr) -RunStdTest(tc056,$(GHC),$(TEST_FLAGS) tc056.hs -o2 tc056.stderr) -RunStdTest(tc057,$(GHC),$(TEST_FLAGS) tc057.hs -o2 tc057.stderr) -RunStdTest(tc058,$(GHC),$(TEST_FLAGS) tc058.hs -o2 tc058.stderr) -RunStdTest(tc059,$(GHC),$(TEST_FLAGS) tc059.hs -o2 tc059.stderr) - -RunStdTest(tc060,$(GHC),$(TEST_FLAGS) tc060.hs -o2 tc060.stderr) -RunStdTest(tc061,$(GHC),$(TEST_FLAGS) tc061.hs -o2 tc061.stderr) -RunStdTest(tc062,$(GHC),$(TEST_FLAGS) tc062.hs -o2 tc062.stderr) -RunStdTest(tc063,$(GHC),$(TEST_FLAGS) tc063.hs -o2 tc063.stderr) -RunStdTest(tc064,$(GHC),$(TEST_FLAGS) tc064.hs -o2 tc064.stderr) -RunStdTest(tc065,$(GHC),$(TEST_FLAGS) tc065.hs -o2 tc065.stderr) -RunStdTest(tc066,$(GHC),$(TEST_FLAGS) tc066.hs -o2 tc066.stderr) -RunStdTest(tc067,$(GHC),$(TEST_FLAGS) tc067.hs -o2 tc067.stderr) -RunStdTest(tc068,$(GHC),$(TEST_FLAGS) tc068.hs -o2 tc068.stderr) -RunStdTest(tc069,$(GHC),$(TEST_FLAGS) tc069.hs -o2 tc069.stderr) - -RunStdTest(tc070,$(GHC),$(TEST_FLAGS) tc070.hs -o2 tc070.stderr) -RunStdTest(tc073,$(GHC),$(TEST_FLAGS) tc073.hs -o2 tc073.stderr) -RunStdTest(tc074,$(GHC),$(TEST_FLAGS) tc074.hs -o2 tc074.stderr) -RunStdTest(tc075,$(GHC),$(TEST_FLAGS) tc075.hs -o2 tc075.stderr) -RunStdTest(tc076,$(GHC),$(TEST_FLAGS) tc076.hs -o2 tc076.stderr) -RunStdTest(tc077,$(GHC),$(TEST_FLAGS) tc077.hs -o2 tc077.stderr) -RunStdTest(tc078,$(GHC),$(TEST_FLAGS) tc078.hs -o2 tc078.stderr) -RunStdTest(tc079,$(GHC),$(TEST_FLAGS) tc079.hs -o2 tc079.stderr) - -RunStdTest(tc080,$(GHC),$(TEST_FLAGS) tc080.hs -o2 tc080.stderr) -RunStdTest(tc081,$(GHC),$(TEST_FLAGS) tc081.hs -o2 tc081.stderr) -RunStdTest(tc082,$(GHC),$(TEST_FLAGS) tc082.hs -o2 tc082.stderr) -RunStdTest(tc083,$(GHC),$(TEST_FLAGS) tc083.hs -o2 tc083.stderr) -RunStdTest(tc084,$(GHC),$(TEST_FLAGS) tc084.hs -o2 tc084.stderr) -RunStdTest(tc085,$(GHC),$(TEST_FLAGS) tc085.hs -o2 tc085.stderr) diff --git a/ghc/compiler/tests/typecheck/should_succeed/Makefile b/ghc/compiler/tests/typecheck/should_succeed/Makefile new file mode 100644 index 0000000..ac3311b --- /dev/null +++ b/ghc/compiler/tests/typecheck/should_succeed/Makefile @@ -0,0 +1,9 @@ +TOP = ../../../../.. +GhcRunTestRules = YES +# These options apply to all tests +RUNSTDTEST_OPTS = -noC -ddump-tc -dcore-lint -hi +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) + +tc019_flags = -fglasgow-exts diff --git a/ghc/compiler/tests/typecheck/stress/Makefile b/ghc/compiler/tests/typecheck/stress/Makefile new file mode 100644 index 0000000..4782dae --- /dev/null +++ b/ghc/compiler/tests/typecheck/stress/Makefile @@ -0,0 +1,5 @@ +TOP = ../../../../.. +GhcRunTestRules = YES +include $(TOP)/ghc/mk/ghc.mk + +runtests :: $(patsubst %.hs, %.runtest, $(wildcard *.hs)) diff --git a/ghc/compiler/tests/typecheck/stress/tcstress001.stderr b/ghc/compiler/tests/typecheck/stress/tcstress001.stderr new file mode 100644 index 0000000..e69de29 diff --git a/ghc/compiler/tests/validation-misc/Jmakefile b/ghc/compiler/tests/validation-misc/Jmakefile deleted file mode 100644 index cdc330e..0000000 --- a/ghc/compiler/tests/validation-misc/Jmakefile +++ /dev/null @@ -1,11 +0,0 @@ -all:: /* so we do not fall into runtests by default */ - @echo "making all in $(CURRENT_DIR) done" - -TESTGHC=$(GHC) - -runtests:: - @echo '###############################################################' - @echo '# The stuff that was here has been moved to ../*/ #' - @echo '###############################################################' - -ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) ) -- 1.7.10.4