2019-03-14 01:22:28 +01:00
|
|
|
% Options for packages loaded elsewhere
|
2019-03-23 05:35:55 +01:00
|
|
|
\PassOptionsToPackage{unicode}{hyperref}
|
2017-08-14 22:19:54 +02:00
|
|
|
\PassOptionsToPackage{hyphens}{url}
|
|
|
|
%
|
2019-01-01 23:47:02 +01:00
|
|
|
\documentclass[
|
|
|
|
]{article}
|
2012-06-05 20:52:57 +02:00
|
|
|
\usepackage{lmodern}
|
2010-07-21 06:06:32 +02:00
|
|
|
\usepackage{amssymb,amsmath}
|
2012-06-06 07:25:54 +02:00
|
|
|
\usepackage{ifxetex,ifluatex}
|
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
2014-02-20 18:43:02 +01:00
|
|
|
\usepackage[T1]{fontenc}
|
2012-06-05 20:52:57 +02:00
|
|
|
\usepackage[utf8]{inputenc}
|
2019-04-03 02:18:36 +02:00
|
|
|
\usepackage{textcomp} % provide euro and other symbols
|
2019-03-23 05:35:55 +01:00
|
|
|
\else % if luatex or xetex
|
2017-02-06 10:50:36 +01:00
|
|
|
\usepackage{unicode-math}
|
2019-01-13 02:39:47 +01:00
|
|
|
\defaultfontfeatures{Scale=MatchLowercase}
|
|
|
|
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
2011-07-22 22:56:04 +02:00
|
|
|
\fi
|
2019-03-14 01:22:28 +01:00
|
|
|
% Use upquote if available, for straight quotes in verbatim environments
|
2014-05-07 05:20:28 +02:00
|
|
|
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
2019-01-01 23:47:02 +01:00
|
|
|
\IfFileExists{microtype.sty}{% use microtype if available
|
|
|
|
\usepackage[]{microtype}
|
|
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
2014-08-20 18:47:47 +02:00
|
|
|
}{}
|
2018-12-11 22:21:45 +01:00
|
|
|
\makeatletter
|
2019-01-01 23:47:02 +01:00
|
|
|
\@ifundefined{KOMAClassName}{% if non-KOMA class
|
2018-12-11 19:22:31 +01:00
|
|
|
\IfFileExists{parskip.sty}{%
|
2018-12-11 22:21:45 +01:00
|
|
|
\usepackage{parskip}
|
2018-12-11 19:22:31 +01:00
|
|
|
}{% else
|
2018-12-11 22:21:45 +01:00
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
|
2019-01-01 23:47:02 +01:00
|
|
|
}{% if KOMA class
|
2018-12-11 22:21:45 +01:00
|
|
|
\KOMAoptions{parskip=half}}
|
|
|
|
\makeatother
|
2019-01-03 04:34:17 +01:00
|
|
|
\usepackage{xcolor}
|
2019-01-01 23:47:02 +01:00
|
|
|
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
|
|
|
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
|
2016-06-07 19:08:49 +02:00
|
|
|
\hypersetup{
|
2019-03-14 01:22:28 +01:00
|
|
|
hidelinks,
|
2019-03-26 05:36:14 +01:00
|
|
|
pdfcreator={LaTeX via pandoc}}
|
2019-03-14 01:22:28 +01:00
|
|
|
\urlstyle{same} % disable monospaced font for URLs
|
2015-05-27 21:23:45 +02:00
|
|
|
\usepackage{listings}
|
2017-04-29 11:05:44 +02:00
|
|
|
\newcommand{\passthrough}[1]{#1}
|
2019-01-26 01:22:56 +01:00
|
|
|
\lstset{defaultdialect=[5.3]Lua}
|
|
|
|
\lstset{defaultdialect=[x86masm]Assembler}
|
2015-05-27 21:23:45 +02:00
|
|
|
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
2019-03-14 01:22:28 +01:00
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
2015-05-02 19:16:26 +02:00
|
|
|
\providecommand{\tightlist}{%
|
2014-08-27 22:35:57 +02:00
|
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
2019-03-05 00:58:20 +01:00
|
|
|
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
|
2016-09-28 12:01:42 +02:00
|
|
|
|
2019-12-05 19:22:31 +01:00
|
|
|
\author{}
|
latex template changes.
* Removed setting of `subject` in PDF metadata.
This used to be set to the subtitle, but really the subtitle
need not give the subject. Also, `subtitle` can contain formatting,
so we'd need, at least, a plain text version for this.
* Moved `header-includes` before setting of `\title`, `\author`,
etc. This allows these macros to be redefined.
* Use `\subtitle` command for `subtitle`, instead of tacking it
on to the title as before. We give a no-op fallback definition if it is
not defined. This change should produce much better results
in classes that support `\subtitle`. With the default article
class, which does not define `\subtitle`, subtitles will no
longer be printed unless the user defines `\subtitle` and
redefines `\maketitle`.
* Moved redefinitions of `\paragraph` and `\subparagraph` to
before header-includes.
2015-11-20 23:36:47 +01:00
|
|
|
\date{}
|
|
|
|
|
2009-02-07 20:20:49 +01:00
|
|
|
\begin{document}
|
|
|
|
|
2017-03-01 21:38:28 +01:00
|
|
|
\hypertarget{lhs-test}{%
|
|
|
|
\section{lhs test}\label{lhs-test}}
|
2009-02-07 20:20:49 +01:00
|
|
|
|
2011-07-22 21:19:34 +02:00
|
|
|
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
2011-01-07 06:04:57 +01:00
|
|
|
return a single value:
|
2009-02-07 20:20:49 +01:00
|
|
|
|
|
|
|
\begin{code}
|
|
|
|
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
|
2013-01-27 01:09:41 +01:00
|
|
|
unsplit = arr . uncurry
|
|
|
|
-- arr (\op (x,y) -> x `op` y)
|
2009-02-07 20:20:49 +01:00
|
|
|
\end{code}
|
2012-05-14 16:04:07 +02:00
|
|
|
|
2015-12-13 01:22:31 +01:00
|
|
|
\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 the
|
|
|
|
second item of the pair).
|
2009-02-07 20:20:49 +01:00
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
f *** g = first f >>> second g
|
|
|
|
\end{verbatim}
|
2012-04-30 18:26:15 +02:00
|
|
|
|
2009-02-14 05:08:18 +01:00
|
|
|
Block quote:
|
|
|
|
|
2009-02-07 20:20:49 +01:00
|
|
|
\begin{quote}
|
2009-02-14 05:08:18 +01:00
|
|
|
foo bar
|
2009-02-07 20:20:49 +01:00
|
|
|
\end{quote}
|
2009-12-31 02:18:35 +01:00
|
|
|
|
2009-02-07 20:20:49 +01:00
|
|
|
\end{document}
|