From dc2eed5daa4d01f97a4686352fd17405f4567169 Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Wed, 1 Jul 2015 18:33:44 +0200 Subject: Create test case for hyperlinking @-patterns. --- hypsrc-test/src/Constructors.hs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hypsrc-test/src') diff --git a/hypsrc-test/src/Constructors.hs b/hypsrc-test/src/Constructors.hs index c52bdc72..8cb46535 100644 --- a/hypsrc-test/src/Constructors.hs +++ b/hypsrc-test/src/Constructors.hs @@ -25,3 +25,11 @@ unnorf :: Norf -> [Foo] unnorf (Norf (Bar, xs, Bar)) = xs unnorf (Norf (Baz, xs, Baz)) = reverse xs unnorf _ = undefined + + +unnorf' :: Norf -> Int +unnorf' x@(Norf (f1@(Quux _ n), _, f2@(Quux f3 _))) = + x' + n * unfoo f1 + aux f3 + where + aux fx = unfoo f2 * unfoo fx * unfoo f3 + x' = sum . map unfoo . unnorf $ x -- cgit v1.2.3