git.iko.soy/typeable/pandoc
on 2.12 help sign in
typeable/pandoc/test/lhs-test.latex+lhs
86 lines 2.5 kB history raw
1% Options for packages loaded elsewhere
2\PassOptionsToPackage{unicode}{hyperref}
3\PassOptionsToPackage{hyphens}{url}
4%
5\documentclass[
6]{article}
7\usepackage{amsmath,amssymb}
8\usepackage{lmodern}
9\usepackage{iftex}
10\ifPDFTeX
11 \usepackage[T1]{fontenc}
12 \usepackage[utf8]{inputenc}
13 \usepackage{textcomp} % provide euro and other symbols
14\else % if luatex or xetex
15 \usepackage{unicode-math}
16 \defaultfontfeatures{Scale=MatchLowercase}
17 \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
18\fi
19% Use upquote if available, for straight quotes in verbatim environments
20\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
21\IfFileExists{microtype.sty}{% use microtype if available
22 \usepackage[]{microtype}
23 \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
24}{}
25\makeatletter
26\@ifundefined{KOMAClassName}{% if non-KOMA class
27 \IfFileExists{parskip.sty}{%
28 \usepackage{parskip}
29 }{% else
30 \setlength{\parindent}{0pt}
31 \setlength{\parskip}{6pt plus 2pt minus 1pt}}
32}{% if KOMA class
33 \KOMAoptions{parskip=half}}
34\makeatother
35\usepackage{xcolor}
36\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
37\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
38\hypersetup{
39 hidelinks,
40 pdfcreator={LaTeX via pandoc}}
41\urlstyle{same} % disable monospaced font for URLs
42\usepackage{listings}
43\newcommand{\passthrough}[1]{#1}
44\lstset{defaultdialect=[5.3]Lua}
45\lstset{defaultdialect=[x86masm]Assembler}
46\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
47\setlength{\emergencystretch}{3em} % prevent overfull lines
48\providecommand{\tightlist}{%
49 \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
50\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
51\ifLuaTeX
52 \usepackage{selnolig} % disable illegal ligatures
53\fi
55\author{}
56\date{}
58\begin{document}
60\hypertarget{lhs-test}{%
61\section{lhs test}\label{lhs-test}}
63\texttt{unsplit} is an arrow that takes a pair of values and combines them to
64return a single value:
66\begin{code}
67unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
68unsplit = arr . uncurry
69 -- arr (\op (x,y) -> x `op` y)
70\end{code}
72\texttt{(***)} combines two arrows into a new arrow by running the two arrows on a
73pair of values (one arrow on the first item of the pair and one arrow on the
74second item of the pair).
76\begin{verbatim}
77f *** g = first f >>> second g
78\end{verbatim}
80Block quote:
82\begin{quote}
83foo bar
84\end{quote}
86\end{document}