4de9edb8e8
Load the iftex package directly rather than via the ifxetex and ifluatex compatibility
wrappers, which have been merged into a single package that is part of the LaTeX core.
The capitalization of the commands has been changed for compatibility with older
versions of TeX Live that have the version of iftex by the Persian TeX Group. This had
been removed in
<2845794c0c
>
for compatibility with BasicTeX, but that is no longer an issue.
86 lines
2.4 KiB
Text
86 lines
2.4 KiB
Text
% Options for packages loaded elsewhere
|
|
\PassOptionsToPackage{unicode}{hyperref}
|
|
\PassOptionsToPackage{hyphens}{url}
|
|
%
|
|
\documentclass[
|
|
]{article}
|
|
\usepackage{amsmath,amssymb}
|
|
\usepackage{lmodern}
|
|
\usepackage{iftex}
|
|
\ifPDFTeX
|
|
\usepackage[T1]{fontenc}
|
|
\usepackage[utf8]{inputenc}
|
|
\usepackage{textcomp} % provide euro and other symbols
|
|
\else % if luatex or xetex
|
|
\usepackage{unicode-math}
|
|
\defaultfontfeatures{Scale=MatchLowercase}
|
|
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
|
\fi
|
|
% Use upquote if available, for straight quotes in verbatim environments
|
|
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
|
\IfFileExists{microtype.sty}{% use microtype if available
|
|
\usepackage[]{microtype}
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
|
}{}
|
|
\makeatletter
|
|
\@ifundefined{KOMAClassName}{% if non-KOMA class
|
|
\IfFileExists{parskip.sty}{%
|
|
\usepackage{parskip}
|
|
}{% else
|
|
\setlength{\parindent}{0pt}
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
|
|
}{% if KOMA class
|
|
\KOMAoptions{parskip=half}}
|
|
\makeatother
|
|
\usepackage{xcolor}
|
|
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
|
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
|
|
\hypersetup{
|
|
hidelinks,
|
|
pdfcreator={LaTeX via pandoc}}
|
|
\urlstyle{same} % disable monospaced font for URLs
|
|
\usepackage{listings}
|
|
\newcommand{\passthrough}[1]{#1}
|
|
\lstset{defaultdialect=[5.3]Lua}
|
|
\lstset{defaultdialect=[x86masm]Assembler}
|
|
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
|
\providecommand{\tightlist}{%
|
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
|
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering
|
|
\ifLuaTeX
|
|
\usepackage{selnolig} % disable illegal ligatures
|
|
\fi
|
|
|
|
\author{}
|
|
\date{}
|
|
|
|
\begin{document}
|
|
|
|
\hypertarget{lhs-test}{%
|
|
\section{lhs test}\label{lhs-test}}
|
|
|
|
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
|
return a single value:
|
|
|
|
\begin{code}
|
|
unsplit :: (Arrow a) => (b -> c -> d) -> a (b, c) d
|
|
unsplit = arr . uncurry
|
|
-- arr (\op (x,y) -> x `op` y)
|
|
\end{code}
|
|
|
|
\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).
|
|
|
|
\begin{verbatim}
|
|
f *** g = first f >>> second g
|
|
\end{verbatim}
|
|
|
|
Block quote:
|
|
|
|
\begin{quote}
|
|
foo bar
|
|
\end{quote}
|
|
|
|
\end{document}
|