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