diff --git a/ghc/tests/stranal/should_compile/Makefile b/ghc/tests/stranal/should_compile/Makefile index 6ca3886c09c91e2988d305af0c5c14a7f9ab9ed1..000b9017e6b48fe85a199114ff05b2a77e206fab 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 0000000000000000000000000000000000000000..2442d44543d284f951d25098d1d8d761a649ec4c --- /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 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391