git.iko.soy/typeable/pandoc
on 2.0.1 help sign in
typeable/pandoc/test/lhs-test.html+lhs
87 lines 4.6 kB history raw
1<!DOCTYPE html>
2<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3<head>
4 <meta charset="utf-8" />
5 <meta name="generator" content="pandoc" />
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
7 <title>lhs-test</title>
8 <style type="text/css">
9 code{white-space: pre-wrap;}
10 .smallcaps{font-variant: small-caps;}
11 .line-block{white-space: pre-line;}
12 .column{display: inline-block;}
13 </style>
14 <style type="text/css">
15div.sourceLine, a.sourceLine { display: inline-block; min-height: 1.25em; }
16a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
17.sourceCode { overflow: visible; }
18code.sourceCode { white-space: pre; }
19@media print {
20code.sourceCode { white-space: pre-wrap; }
21div.sourceLine, a.sourceLine { text-indent: -1em; padding-left: 1em; }
23pre.numberSource div.sourceLine, .numberSource a.sourceLine
24 { position: relative; }
25pre.numberSource div.sourceLine::before, .numberSource a.sourceLine::before
26 { content: attr(data-line-number);
27 position: absolute; left: -5em; text-align: right; vertical-align: baseline;
28 border: none; pointer-events: all;
29 -webkit-touch-callout: none; -webkit-user-select: none;
30 -khtml-user-select: none; -moz-user-select: none;
31 -ms-user-select: none; user-select: none;
32 padding: 0 4px; width: 4em; }
33pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; color: #aaaaaa; padding-left: 4px; }
34@media screen {
35a.sourceLine::before { text-decoration: underline; color = initial; }
37code span.kw { color: #007020; font-weight: bold; } /* Keyword */
38code span.dt { color: #902000; } /* DataType */
39code span.dv { color: #40a070; } /* DecVal */
40code span.bn { color: #40a070; } /* BaseN */
41code span.fl { color: #40a070; } /* Float */
42code span.ch { color: #4070a0; } /* Char */
43code span.st { color: #4070a0; } /* String */
44code span.co { color: #60a0b0; font-style: italic; } /* Comment */
45code span.ot { color: #007020; } /* Other */
46code span.al { color: #ff0000; font-weight: bold; } /* Alert */
47code span.fu { color: #06287e; } /* Function */
48code span.er { color: #ff0000; font-weight: bold; } /* Error */
49code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
50code span.cn { color: #880000; } /* Constant */
51code span.sc { color: #4070a0; } /* SpecialChar */
52code span.vs { color: #4070a0; } /* VerbatimString */
53code span.ss { color: #bb6688; } /* SpecialString */
54code span.im { } /* Import */
55code span.va { color: #19177c; } /* Variable */
56code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
57code span.op { color: #666666; } /* Operator */
58code span.bu { } /* BuiltIn */
59code span.ex { } /* Extension */
60code span.pp { color: #bc7a00; } /* Preprocessor */
61code span.at { color: #7d9029; } /* Attribute */
62code span.do { color: #ba2121; font-style: italic; } /* Documentation */
63code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
64code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
65code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
66 </style>
67 <!--[if lt IE 9]>
68 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
69 <![endif]-->
70</head>
71<body>
72<h1 id="lhs-test">lhs test</h1>
73<p><code>unsplit</code> is an arrow that takes a pair of values and combines them to
74return a single value:</p>
75<pre class="sourceCode literate literatehaskell"><code class="sourceCode literatehaskell"><div class="sourceLine" id="1" href="#1" data-line-number="1"><span class="ot">&gt; unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=&gt;</span> (b <span class="ot">-&gt;</span> c <span class="ot">-&gt;</span> d) <span class="ot">-&gt;</span> a (b, c) d</div>
76<div class="sourceLine" id="2" href="#2" data-line-number="2"><span class="ot">&gt;</span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry</div>
77<div class="sourceLine" id="3" href="#3" data-line-number="3"><span class="ot">&gt;</span> <span class="co">-- arr (\op (x,y) -&gt; x `op` y)</span></div></code></pre>
78<p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a
79pair of values (one arrow on the first item of the pair and one arrow on the
80second item of the pair).</p>
81<pre><code>f *** g = first f &gt;&gt;&gt; second g</code></pre>
82<p>Block quote:</p>
83<blockquote>
84<p>foo bar</p>
85</blockquote>
86</body>
87</html>