From 2abbfca487269aa886775f4c5629630fcc3de0cd Mon Sep 17 00:00:00 2001
From: simonm <unknown>
Date: Fri, 19 Dec 1997 15:07:38 +0000
Subject: [PATCH] [project @ 1997-12-19 15:07:35 by simonm] add test for
 getWorkerIdAndCons bug.

---
 ghc/tests/stranal/should_compile/Makefile      | 4 +++-
 ghc/tests/stranal/should_compile/str001.hs     | 9 +++++++++
 ghc/tests/stranal/should_compile/str001.stdout | 0
 3 files changed, 12 insertions(+), 1 deletion(-)
 create mode 100644 ghc/tests/stranal/should_compile/str001.hs
 create mode 100644 ghc/tests/stranal/should_compile/str001.stdout

diff --git a/ghc/tests/stranal/should_compile/Makefile b/ghc/tests/stranal/should_compile/Makefile
index 6ca3886c09c9..000b9017e6b4 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 000000000000..2442d44543d2
--- /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 000000000000..e69de29bb2d1
-- 
GitLab