2011-12-29 22:24:05 +01:00
|
|
|
\documentclass[]{article}
|
2010-07-21 06:06:32 +02:00
|
|
|
\usepackage{amssymb,amsmath}
|
2011-07-31 02:02:49 +02:00
|
|
|
\usepackage{ifxetex,ifluatex}
|
|
|
|
\ifxetex
|
2011-07-22 22:56:04 +02:00
|
|
|
\usepackage{fontspec,xltxtra,xunicode}
|
|
|
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
2012-03-07 22:29:03 +01:00
|
|
|
\newcommand{\euro}{€}
|
2011-07-22 22:56:04 +02:00
|
|
|
\else
|
2011-07-31 02:02:49 +02:00
|
|
|
\ifluatex
|
2011-07-22 22:56:04 +02:00
|
|
|
\usepackage{fontspec}
|
|
|
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
2012-03-07 22:29:03 +01:00
|
|
|
\newcommand{\euro}{€}
|
2011-07-22 22:56:04 +02:00
|
|
|
\else
|
2011-07-31 02:02:49 +02:00
|
|
|
\usepackage[utf8]{inputenc}
|
2011-07-22 22:56:04 +02:00
|
|
|
\fi
|
|
|
|
\fi
|
2009-02-07 20:20:49 +01:00
|
|
|
\usepackage{listings}
|
|
|
|
\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
|
2011-07-31 02:02:49 +02:00
|
|
|
\ifxetex
|
2011-07-23 18:54:42 +02:00
|
|
|
\usepackage[setpagesize=false, % page size defined by xetex
|
|
|
|
unicode=false, % unicode breaks when used with xetex
|
2011-12-31 01:28:33 +01:00
|
|
|
xetex,
|
2012-03-25 21:09:59 +02:00
|
|
|
bookmarks=true,
|
|
|
|
pdfauthor={},
|
|
|
|
pdftitle={},
|
2011-12-31 01:28:33 +01:00
|
|
|
colorlinks=true,
|
|
|
|
linkcolor=blue]{hyperref}
|
2011-07-23 18:54:42 +02:00
|
|
|
\else
|
2011-12-31 01:28:33 +01:00
|
|
|
\usepackage[unicode=true,
|
2012-03-25 21:09:59 +02:00
|
|
|
bookmarks=true,
|
|
|
|
pdfauthor={},
|
|
|
|
pdftitle={},
|
2011-12-31 01:28:33 +01:00
|
|
|
colorlinks=true,
|
|
|
|
linkcolor=blue]{hyperref}
|
2011-07-23 18:54:42 +02:00
|
|
|
\fi
|
|
|
|
\hypersetup{breaklinks=true, pdfborder={0 0 0}}
|
2009-02-07 20:20:49 +01:00
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
2011-07-22 22:56:04 +02:00
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
2009-02-07 20:20:49 +01:00
|
|
|
\setcounter{secnumdepth}{0}
|
2009-12-31 02:18:35 +01:00
|
|
|
|
|
|
|
|
2009-02-07 20:20:49 +01:00
|
|
|
\begin{document}
|
|
|
|
|
|
|
|
\section{lhs test}
|
|
|
|
|
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
|
|
|
|
unsplit = arr . uncurry
|
|
|
|
-- arr (\op (x,y) -> x `op` y)
|
|
|
|
\end{code}
|
2011-07-22 21:19:34 +02: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}
|
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}
|