Skip to content

Instantly share code, notes, and snippets.

@lkuper
Created February 3, 2014 18:21
Show Gist options
  • Select an option

  • Save lkuper/8789334 to your computer and use it in GitHub Desktop.

Select an option

Save lkuper/8789334 to your computer and use it in GitHub Desktop.

Revisions

  1. lkuper created this gist Feb 3, 2014.
    48 changes: 48 additions & 0 deletions gistfile1.tex
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    %====Set up Listings===============================================================

    \definecolor{darkgreen}{rgb}{0,0.5,0}
    \definecolor{darkred}{rgb}{0.5,0,0}
    \lstloadlanguages{Haskell}
    \lstnewenvironment{code}
    { % \centering
    \lstset{}%
    \csname lst@SetFirstLabel\endcsname}
    { %\centering
    \csname lst@SaveFirstLabel\endcsname}
    \lstset{
    language=Haskell,
    % basicstyle=\small\ttfamily,
    basicstyle=\footnotesize\ttfamily,
    % basicstyle=\tiny\ttfamily, % Testing that it works.
    flexiblecolumns=false,
    basewidth={0.5em,0.45em},
    aboveskip={3pt},
    belowskip={3pt},
    keywordstyle=\color{blue},
    commentstyle=\color{darkgreen},
    % Ugh, it keywords map/sort/zipWith. Should do this for
    % consistency or figure out how to DISABLE those other keywords:
    morekeywords={fold,foldSeg,permute,scan,scanl},
    deletekeywords={read,Monad,insert,length,find},
    literate={+}{{$+$}}1 {/}{{$/$}}1 {*}{{$*$}}1 % {=}{{$=$}}1
    {>}{{$>$}}1 {<}{{$<$}}1 {\\}{{$\lambda$}}1
    {\\\\}{{\char`\\\char`\\}}1
    {->}{{$\rightarrow$}}2 {>=}{{$\geq$}}2 {<-}{{$\leftarrow$}}2
    {<=}{{$\leq$}}2 {=>}{{$\Rightarrow$}}2
    {\ .}{{$\circ$}}2 {\ .\ }{{$\circ$}}2
    {>>}{{>>}}2 {>>=}{{>>=}}2 {=<<}{{=<<}}2
    {|}{{$\mid$}}1
    {`member`}{{$\in$}}1
    {S.empty}{{\{\}}}1
    {leftBrace}{\{}1
    {rightBrace}{\}}1
    {forall}{$\forall$}1
    {...}{$\dots$}2
    {2DOT}{..}2
    {ellipses}{$\dots$}2
    {DOT}{.}1
    {profile0Sing}{{ \{{\tt profile0}\}}}1
    {\$singleton\$startV}{{ \hspace{2.4em} \{{\tt startV}\}}}1
    {\$singleton\$n}{{ \{{\tt n}\}}}1
    {dotdotdot}{{$\ldots$}}3
    }