diff options
| author | John MacFarlane <[email protected]> | 2015-04-15 09:17:35 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2015-04-15 09:17:35 -0700 |
| commit | 17e209debf1a5dce80b78ecf14405f8db7487f7b (patch) | |
| tree | 3247407a369fad20c123ed4603cad3d5f68fe65f | |
| parent | ca4cd715431fdd213cd33b5e83cd53065d1c80b7 (diff) | |
Adjusted lhs-test.* so highlighting is not used.
This way we can pass tests with several versions of highlighting-kate.
| -rw-r--r-- | tests/Tests/Old.hs | 2 | ||||
| -rw-r--r-- | tests/lhs-test.html | 25 | ||||
| -rw-r--r-- | tests/lhs-test.html+lhs | 26 | ||||
| -rw-r--r-- | tests/lhs-test.latex | 33 |
4 files changed, 13 insertions, 73 deletions
diff --git a/tests/Tests/Old.hs b/tests/Tests/Old.hs index 5bdf325b1..6ca213969 100644 --- a/tests/Tests/Old.hs +++ b/tests/Tests/Old.hs @@ -175,7 +175,7 @@ lhsWriterTests format , t "lhs to lhs" (format ++ "+lhs") ] where - t n f = test n ["--columns=78", "-r", "native", "-s", "-w", f] + t n f = test n ["--columns=78", "-r", "native", "-s", "--no-highlight", "-w", f] "lhs-test.native" ("lhs-test" <.> f) lhsReaderTest :: String -> Test diff --git a/tests/lhs-test.html b/tests/lhs-test.html index bde505a1e..5c1de870e 100644 --- a/tests/lhs-test.html +++ b/tests/lhs-test.html @@ -6,32 +6,13 @@ <meta name="generator" content="pandoc" /> <title></title> <style type="text/css">code{white-space: pre;}</style> - <style type="text/css"> -table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { - margin: 0; padding: 0; vertical-align: baseline; border: none; } -table.sourceCode { width: 100%; line-height: 100%; } -td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } -td.sourceCode { padding-left: 5px; } -code > span.kw { color: #007020; font-weight: bold; } -code > span.dt { color: #902000; } -code > span.dv { color: #40a070; } -code > span.bn { color: #40a070; } -code > span.fl { color: #40a070; } -code > span.ch { color: #4070a0; } -code > span.st { color: #4070a0; } -code > span.co { color: #60a0b0; font-style: italic; } -code > span.ot { color: #007020; } -code > span.al { color: #ff0000; font-weight: bold; } -code > span.fu { color: #06287e; } -code > span.er { color: #ff0000; font-weight: bold; } - </style> </head> <body> <h1 id="lhs-test">lhs test</h1> <p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p> -<pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=></span> (b <span class="ot">-></span> c <span class="ot">-></span> d) <span class="ot">-></span> a (b, c) d -unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry - <span class="co">-- arr (\op (x,y) -> x `op` y)</span></code></pre> +<pre class="sourceCode literate haskell"><code>unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d +unsplit = arr . uncurry + -- arr (\op (x,y) -> x `op` y)</code></pre> <p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p> <pre><code>f *** g = first f >>> second g</code></pre> <p>Block quote:</p> diff --git a/tests/lhs-test.html+lhs b/tests/lhs-test.html+lhs index fcdcad303..c5df6fc3d 100644 --- a/tests/lhs-test.html+lhs +++ b/tests/lhs-test.html+lhs @@ -6,32 +6,14 @@ <meta name="generator" content="pandoc" /> <title></title> <style type="text/css">code{white-space: pre;}</style> - <style type="text/css"> -table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode { - margin: 0; padding: 0; vertical-align: baseline; border: none; } -table.sourceCode { width: 100%; line-height: 100%; } -td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; } -td.sourceCode { padding-left: 5px; } -code > span.kw { color: #007020; font-weight: bold; } -code > span.dt { color: #902000; } -code > span.dv { color: #40a070; } -code > span.bn { color: #40a070; } -code > span.fl { color: #40a070; } -code > span.ch { color: #4070a0; } -code > span.st { color: #4070a0; } -code > span.co { color: #60a0b0; font-style: italic; } -code > span.ot { color: #007020; } -code > span.al { color: #ff0000; font-weight: bold; } -code > span.fu { color: #06287e; } -code > span.er { color: #ff0000; font-weight: bold; } - </style> </head> <body> <h1 id="lhs-test">lhs test</h1> <p><code>unsplit</code> is an arrow that takes a pair of values and combines them to return a single value:</p> -<pre class="sourceCode literate literatehaskell"><code class="sourceCode literatehaskell"><span class="ot">> unsplit ::</span> (<span class="dt">Arrow</span> a) <span class="ot">=></span> (b <span class="ot">-></span> c <span class="ot">-></span> d) <span class="ot">-></span> a (b, c) d -<span class="ot">></span> unsplit <span class="fu">=</span> arr <span class="fu">.</span> uncurry -<span class="ot">></span> <span class="co">-- arr (\op (x,y) -> x `op` y)</span></code></pre> +<pre class="sourceCode literate haskell"><code>> unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d +> unsplit = arr . uncurry +> -- arr (\op (x,y) -> x `op` y) +</code></pre> <p><code>(***)</code> combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on the second item of the pair).</p> <pre><code>f *** g = first f >>> second g</code></pre> <p>Block quote:</p> diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex index 6f2fdfb77..d5c2394da 100644 --- a/tests/lhs-test.latex +++ b/tests/lhs-test.latex @@ -23,27 +23,6 @@ \usepackage{microtype} \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts }{} -\usepackage{color} -\usepackage{fancyvrb} -\newcommand{\VerbBar}{|} -\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} -% Add ',fontsize=\small' for more characters per line -\newenvironment{Shaded}{}{} -\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}} -\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}} -\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}} -\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}} -\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}} -\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}} -\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}} -\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}} -\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}} -\newcommand{\RegionMarkerTok}[1]{{#1}} -\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}} -\newcommand{\NormalTok}[1]{{#1}} \ifxetex \usepackage[setpagesize=false, % page size defined by xetex unicode=false, % unicode breaks when used with xetex @@ -75,13 +54,11 @@ \texttt{unsplit} is an arrow that takes a pair of values and combines them to return a single value: -\begin{Shaded} -\begin{Highlighting}[] -\OtherTok{unsplit ::} \NormalTok{(}\DataTypeTok{Arrow} \NormalTok{a) }\OtherTok{=>} \NormalTok{(b }\OtherTok{->} \NormalTok{c }\OtherTok{->} \NormalTok{d) }\OtherTok{->} \NormalTok{a (b, c) d} -\NormalTok{unsplit }\FunctionTok{=} \NormalTok{arr }\FunctionTok{.} \NormalTok{uncurry} - \CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)} -\end{Highlighting} -\end{Shaded} +\begin{verbatim} +unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d +unsplit = arr . uncurry + -- arr (\op (x,y) -> x `op` y) +\end{verbatim} \texttt{(***)} combines two arrows into a new arrow by running the two arrows on a pair of values (one arrow on the first item of the pair and one arrow on |
