From 7eafa83ffaf535ae8c1a038f004a254192d08afc Mon Sep 17 00:00:00 2001 From: Ɓukasz Hanuszczak Date: Sat, 25 Jul 2015 20:08:46 +0200 Subject: Re-accept test cases after adding line anchors for each of them. --- hypsrc-test/ref/src/Classes.html | 498 +++++++++++++++++++++------------- hypsrc-test/ref/src/Constructors.html | 402 +++++++++++++++++---------- hypsrc-test/ref/src/Identifiers.html | 422 ++++++++++++++++------------ hypsrc-test/ref/src/Literals.html | 172 +++++++----- hypsrc-test/ref/src/Operators.html | 288 ++++++++++++-------- hypsrc-test/ref/src/Records.html | 448 ++++++++++++++++++------------ hypsrc-test/ref/src/Types.html | 454 +++++++++++++++++++------------ 7 files changed, 1673 insertions(+), 1011 deletions(-) (limited to 'hypsrc-test') diff --git a/hypsrc-test/ref/src/Classes.html b/hypsrc-test/ref/src/Classes.html index 13c8389a..74a7a427 100644 --- a/hypsrc-test/ref/src/Classes.html +++ b/hypsrc-test/ref/src/Classes.html @@ -9,22 +9,32 @@ >
module Classes where
-
-
 
+
+class Foo a where
-        bar :: a -> Int
-        baz :: Int -> (, )
-
 
+instance Foo Int where
-        bar = id
-        baz x = (, )
-
 
+instance Foo [] where
-        bar = length
-        baz _ = (], [])
+
-
-
 
+class Foo a => Foo' a where
-        quux :: (, ) -> a
-        quux (, ) = norf [, ]
-
-    
+    norf :: [] -> a
-        norf = quux . baz . sum . map bar
+
-
 instance Foo' Int where
-        norf = sum
+
-
 instance Foo' [] where
-        quux = uncurry (++)
+
+
-
-
 class Plugh p where
-        plugh :: p a a -> p b b -> p (a -> ) (b -> )
+
-
 instance Plugh Either where
-        plugh (Left ) _ = Right $ const a
-        plugh (Right ) _ = Right $ const a
-        plugh _ (Left ) = Left $ const b
-        plugh _ (Right ) = Left $ const b
 
module Constructors where
-
-
 
+
+data Foo
-        = Bar
-        | Baz
-        | Quux Foo Int
-
 
+newtype Norf = Norf (, [], )
+
-
-
 
+bar, baz, quux :: Foo
 bar = Bar
 baz = Baz
 quux = Quux quux 0
+
-
-
 
+unfoo :: Foo -> Int
 unfoo Bar = 0
 unfoo Baz = 0
 unfoo (Quux foo ) = 42 * n + unfoo foo
+
-
-
 
+unnorf :: Norf -> []
 unnorf (Norf (, , )) = xs
 unnorf (Norf (, , )) = reverse xs
 unnorf _ = undefined
+
+
-
-
 unnorf' :: Norf -> Int
 unnorf' Norf (Quux _ ), _, Quux f3 _)) =
-        x' + n * unfoo f1 + aux f3
-    where
-        aux fx = unfoo f2 * unfoo fx * unfoo f3
-        x' = sum . map unfoo . unnorf $ x
 
module Identifiers where
-
-
 
+
+foo, bar, baz :: Int -> Int -> Int
 foo x y = x + x * bar y x * y + y
 bar x y = y + x - baz x y - x + y
 baz x y = x * y * y * y * x
+
-
 quux :: Int -> Int
 quux x = foo (bar x ) (bar x )
-
 
+norf :: Int -> Int -> Int -> Int
 norf x y z
-        | x < 0 = quux x
-        | y < 0 = quux y
-        | z < 0 = quux z
-        | otherwise = norf () () ()
-
-
 
+
+main :: IO ()
 main = do
-        putStrLn . show $ foo x y
-        putStrLn . show $ quux z
-        putStrLn . show $ norf x y z
-    where
-        x = 10
-        y = 20
-        z = 30
 
module Literals where
-
-
 
+
+str :: String
 str = "str literal"
+
-
 num :: Num a => a
 num = 0 + 1 + 1010011 * 41231 + 12131
-
 
+frac :: Fractional a => a
 frac = 42.0000001
+
-
 list :: []]
 list = [], [], []]
+
-
 pair :: (), (), (), (), ())
 pair = (), (), (), (), ())
 
module Operators where
-
-
 
+
+(+++) :: [] -> [] -> []
 a +++ b = a ++ b ++ a
-
 
+($$$) :: [] -> [] -> []
 a $$$ b = b +++ a
+
-
 (***) :: [] -> [] -> []
 () a [] = a
 (***) a () = a +++ (a *** )
-
 
+(*/\*) :: []] -> [] -> []
 a */\* b = concatMap (*** ) a
+
-
 (**/\**) :: []] -> []] -> []]
 a **/\** b = zipWith () [a +++ ] (a $$$ )
+
+
-
-
 (#.#) :: a -> b -> (c -> (, ))
 a #.# b = const $ (, )
 
{-# LANGUAGE NamedFieldPuns #-}
 {-# LANGUAGE RecordWildCards #-}
-
-
 
+
+module Records where
+
+
-
-
 data Point = Point
-        { x :: !Int
-        , y :: !Int
-        }
+
+
-
-
 point :: Int -> Int -> Point
 point x y = Point { x = , y = y }
-
-
 
+
+lengthSqr :: Point -> Int
 lengthSqr (Point { x = , y = y }) = x * x + y * y
+
-
 lengthSqr' :: Point -> Int
 lengthSqr' (Point { , 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 }
+
-
 translate :: Int -> Int -> Point -> Point
 translate x y p =
-        aux p
-    where
-        (, ) = (, )
-        aux ..} = p { x = x + , y = y + dy }
 
{-# LANGUAGE TypeFamilies #-}
-
-
 
+
+module Types where
-
-
 
+
+data Quux = Bar | Baz
+
-
 newtype Foo = Foo ()
+
-
 type FooQuux = (, )
 type QuuxFoo = (, )
+
-
-
 
+data family Norf a b
+
-
 data instance Norf Foo Quux = NFQ Foo Quux
 data instance Norf Quux Foo = NQF Quux Foo
-
-
 
+
+type family Norf' a b
-
 
+type instance Norf' Foo Quux = (, )
 type instance Norf' Quux Foo = (, )
+
+
-
-
 norf1 :: Norf Foo Quux -> Int
 norf1 (NFQ (Foo ()) ) = 0
 norf1 (NFQ (Foo ()) ) = 1
+
-
 norf2 :: Norf Quux Foo -> Int
 norf2 (NQF Bar (Foo ()) = 0
 norf2 (NQF Baz (Foo ()) = 1
+
-
-
 
+norf1' :: Norf' Foo Quux -> Int
 norf1' (Foo (), ) = 0
 norf1' (Foo (), ) = 1
+
-
 norf2' :: Norf' Quux Foo -> Int
 norf2' (, Foo ()) = 0
 norf2' (, Foo ()) = 1