[commit: haddock] master: Add test case for operator hyperlinking. (15ac1a8)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:41:46 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/15ac1a816a9875591febcf678bbf914a11e5068f

>---------------------------------------------------------------

commit 15ac1a816a9875591febcf678bbf914a11e5068f
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Tue Jun 30 20:00:32 2015 +0200

    Add test case for operator hyperlinking.


>---------------------------------------------------------------

15ac1a816a9875591febcf678bbf914a11e5068f
 hypsrc-test/src/Operators.hs | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/hypsrc-test/src/Operators.hs b/hypsrc-test/src/Operators.hs
new file mode 100644
index 0000000..bc76c2d
--- /dev/null
+++ b/hypsrc-test/src/Operators.hs
@@ -0,0 +1,18 @@
+module Operators where
+
+
+(+++) :: [a] -> [a] -> [a]
+a +++ b = a ++ b ++ a
+
+($$$) :: [a] -> [a] -> [a]
+a $$$ b = b +++ a
+
+(***) :: [a] -> [a] -> [a]
+(***) a [] = a
+(***) a (_:b) = a +++ (a *** b)
+
+(*/\*) :: [[a]] -> [a] -> [a]
+a */\* b = concatMap (*** b) a
+
+(**/\**) :: [[a]] -> [[a]] -> [[a]]
+a **/\** b = zipWith (*/\*) [a +++ b] (a $$$ b)



More information about the ghc-commits mailing list