projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
2442d44543d284f951d25098d1d8d761a649ec4c
[ghc-hetmet.git]
/
ghc
/
tests
/
stranal
/
should_compile
/
str001.hs
1
module ShouldSucceed where
2
3
{-# OPTIONS -O #-}
4
5
newtype Num a => Point2 a = Point2 (a,a)
6
7
area2 :: Num a => Point2 a -> Point2 a -> Point2 a -> a
8
area2 (Point2 (px,py)) (Point2 (qx,qy)) (Point2 (rx,ry))
9
= (px-qx) * (py-ry) - (py-qy) * (px-rx)