2011-12-29 13:24:05 -08:00
|
|
|
\documentclass[]{article}
|
2012-06-05 11:52:57 -07:00
|
|
|
\usepackage{lmodern}
|
2010-07-20 21:06:32 -07:00
|
|
|
\usepackage{amssymb,amsmath}
|
2012-06-05 22:25:54 -07:00
|
|
|
\usepackage{ifxetex,ifluatex}
|
2012-04-21 09:59:36 -07:00
|
|
|
\usepackage{fixltx2e} % provides \textsubscript
|
2012-06-05 22:25:54 -07:00
|
|
|
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
|
2014-02-20 09:43:02 -08:00
|
|
|
\usepackage[T1]{fontenc}
|
2012-06-05 11:52:57 -07:00
|
|
|
\usepackage[utf8]{inputenc}
|
2012-06-05 22:25:54 -07:00
|
|
|
\else % if luatex or xelatex
|
|
|
|
\ifxetex
|
2013-04-26 08:59:18 -07:00
|
|
|
\usepackage{mathspec}
|
2012-06-05 11:52:57 -07:00
|
|
|
\usepackage{xltxtra,xunicode}
|
2013-04-26 08:59:18 -07:00
|
|
|
\else
|
|
|
|
\usepackage{fontspec}
|
2011-07-22 13:56:04 -07:00
|
|
|
\fi
|
2012-06-05 11:52:57 -07:00
|
|
|
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
|
|
|
|
\newcommand{\euro}{€}
|
2011-07-22 13:56:04 -07:00
|
|
|
\fi
|
2014-05-06 20:20:28 -07:00
|
|
|
% use upquote if available, for straight quotes in verbatim environments
|
|
|
|
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
2013-02-27 19:42:54 -08:00
|
|
|
% use microtype if available
|
2014-08-20 09:47:47 -07:00
|
|
|
\IfFileExists{microtype.sty}{%
|
|
|
|
\usepackage{microtype}
|
|
|
|
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
|
|
|
|
}{}
|
2011-12-27 18:08:06 -08:00
|
|
|
\usepackage{color}
|
|
|
|
\usepackage{fancyvrb}
|
2013-05-07 20:22:09 -07:00
|
|
|
\newcommand{\VerbBar}{|}
|
2013-06-26 20:54:31 -07:00
|
|
|
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
|
2011-12-27 18:08:06 -08:00
|
|
|
\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}}
|
2012-06-05 22:25:54 -07:00
|
|
|
\ifxetex
|
2011-07-23 09:54:42 -07:00
|
|
|
\usepackage[setpagesize=false, % page size defined by xetex
|
|
|
|
unicode=false, % unicode breaks when used with xetex
|
2012-06-03 11:08:57 -07:00
|
|
|
xetex]{hyperref}
|
2011-07-23 09:54:42 -07:00
|
|
|
\else
|
2012-06-03 11:08:57 -07:00
|
|
|
\usepackage[unicode=true]{hyperref}
|
2011-07-23 09:54:42 -07:00
|
|
|
\fi
|
2012-06-03 11:08:57 -07:00
|
|
|
\hypersetup{breaklinks=true,
|
|
|
|
bookmarks=true,
|
|
|
|
pdfauthor={},
|
|
|
|
pdftitle={},
|
|
|
|
colorlinks=true,
|
2013-06-24 20:56:35 -07:00
|
|
|
citecolor=blue,
|
2012-06-03 11:08:57 -07:00
|
|
|
urlcolor=blue,
|
2012-06-08 11:00:27 -07:00
|
|
|
linkcolor=magenta,
|
2012-06-03 11:08:57 -07:00
|
|
|
pdfborder={0 0 0}}
|
2013-01-21 11:52:00 -08:00
|
|
|
\urlstyle{same} % don't use monospace font for urls
|
2009-02-07 19:20:49 +00:00
|
|
|
\setlength{\parindent}{0pt}
|
|
|
|
\setlength{\parskip}{6pt plus 2pt minus 1pt}
|
2011-07-22 13:56:04 -07:00
|
|
|
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
2009-02-07 19:20:49 +00:00
|
|
|
\setcounter{secnumdepth}{0}
|
2009-12-31 01:18:35 +00:00
|
|
|
|
2014-06-01 23:39:15 -07:00
|
|
|
\date{}
|
2009-12-31 01:18:35 +00:00
|
|
|
|
2009-02-07 19:20:49 +00:00
|
|
|
\begin{document}
|
|
|
|
|
2014-12-15 10:03:19 -08:00
|
|
|
\section{lhs test}\label{lhs-test}
|
2009-02-07 19:20:49 +00:00
|
|
|
|
2011-07-22 12:19:34 -07:00
|
|
|
\texttt{unsplit} is an arrow that takes a pair of values and combines them to
|
2011-01-06 21:04:57 -08:00
|
|
|
return a single value:
|
2009-02-07 19:20:49 +00:00
|
|
|
|
2011-12-27 18:08:06 -08:00
|
|
|
\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}
|
2013-07-23 20:31:49 -07:00
|
|
|
\NormalTok{unsplit }\FunctionTok{=} \NormalTok{arr }\FunctionTok{.} \NormalTok{uncurry}
|
2013-01-26 16:09:41 -08:00
|
|
|
\CommentTok{-- arr (\textbackslash{}op (x,y) -> x `op` y)}
|
2011-12-27 18:08:06 -08:00
|
|
|
\end{Highlighting}
|
|
|
|
\end{Shaded}
|
2012-05-14 07:04:07 -07:00
|
|
|
|
2011-07-22 12:19:34 -07: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 19:20:49 +00:00
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
f *** g = first f >>> second g
|
|
|
|
\end{verbatim}
|
2012-04-30 09:26:15 -07:00
|
|
|
|
2009-02-14 04:08:18 +00:00
|
|
|
Block quote:
|
|
|
|
|
2009-02-07 19:20:49 +00:00
|
|
|
\begin{quote}
|
2009-02-14 04:08:18 +00:00
|
|
|
foo bar
|
2009-02-07 19:20:49 +00:00
|
|
|
\end{quote}
|
2009-12-31 01:18:35 +00:00
|
|
|
|
2009-02-07 19:20:49 +00:00
|
|
|
\end{document}
|