From 40d0a050c81ff21949fc7eeede4e0dbb3b1d7c98 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Tue, 30 Jun 2015 22:29:34 +0200 Subject: Add reference files for hyperlinker test cases. --- hypsrc-test/ref/src/Records.html | 646 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 646 insertions(+) create mode 100644 hypsrc-test/ref/src/Records.html (limited to 'hypsrc-test/ref/src/Records.html') diff --git a/hypsrc-test/ref/src/Records.html b/hypsrc-test/ref/src/Records.html new file mode 100644 index 00000000..b982c5b1 --- /dev/null +++ b/hypsrc-test/ref/src/Records.html @@ -0,0 +1,646 @@ + +
{-# LANGUAGE NamedFieldPuns #-}
+
+module Records where
+
+
+data Point = Point
+    { x :: !Int
+    , y :: !Int
+    }
+
+
+point :: Int -> Int -> Point
+point x y = Point { x = x, y = y }
+
+
+lengthSqr :: Point -> Int
+lengthSqr (Point { x = x, y = y }) = x * x + y * y
+
+lengthSqr' :: Point -> Int
+lengthSqr' (Point { x, y }) = y * y + x * x
+
+
+translateX, translateY :: Point -> Int -> Point
+translateX p d = p { x = x p + d }
+translateY p d = p { y = y p + d }
+
-- cgit v1.2.3