From: simonm Date: Fri, 19 Dec 1997 15:07:38 +0000 (+0000) Subject: [project @ 1997-12-19 15:07:35 by simonm] X-Git-Tag: Approx_2487_patches~1141 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=2abbfca487269aa886775f4c5629630fcc3de0cd;p=ghc-hetmet.git [project @ 1997-12-19 15:07:35 by simonm] add test for getWorkerIdAndCons bug. --- diff --git a/ghc/tests/stranal/should_compile/Makefile b/ghc/tests/stranal/should_compile/Makefile index 6ca3886..000b901 100644 --- a/ghc/tests/stranal/should_compile/Makefile +++ b/ghc/tests/stranal/should_compile/Makefile @@ -2,6 +2,8 @@ TOP = ../.. include $(TOP)/mk/boilerplate.mk include $(TOP)/mk/should_compile.mk -HC_OPTS += -noC -O -dcore-lint +SRC_HC_OPTS += -noC -O -dcore-lint + +str001_HC_OPTS = -hi include $(TOP)/mk/target.mk diff --git a/ghc/tests/stranal/should_compile/str001.hs b/ghc/tests/stranal/should_compile/str001.hs new file mode 100644 index 0000000..2442d44 --- /dev/null +++ b/ghc/tests/stranal/should_compile/str001.hs @@ -0,0 +1,9 @@ +module ShouldSucceed where + +{-# OPTIONS -O #-} + +newtype Num a => Point2 a = Point2 (a,a) + +area2 :: Num a => Point2 a -> Point2 a -> Point2 a -> a +area2 (Point2 (px,py)) (Point2 (qx,qy)) (Point2 (rx,ry)) + = (px-qx) * (py-ry) - (py-qy) * (px-rx) diff --git a/ghc/tests/stranal/should_compile/str001.stdout b/ghc/tests/stranal/should_compile/str001.stdout new file mode 100644 index 0000000..e69de29