[project @ 1997-12-19 15:07:35 by simonm]
authorsimonm <unknown>
Fri, 19 Dec 1997 15:07:38 +0000 (15:07 +0000)
committersimonm <unknown>
Fri, 19 Dec 1997 15:07:38 +0000 (15:07 +0000)
add test for getWorkerIdAndCons bug.

ghc/tests/stranal/should_compile/Makefile
ghc/tests/stranal/should_compile/str001.hs [new file with mode: 0644]
ghc/tests/stranal/should_compile/str001.stdout [new file with mode: 0644]

index 6ca3886..000b901 100644 (file)
@@ -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 (file)
index 0000000..2442d44
--- /dev/null
@@ -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 (file)
index 0000000..e69de29