@@ -5,7 +5,10 @@
5%% + Provides a listings bindings:
5%% + Provides a listings bindings:
6%% + idris :: default ascii
6%% + idris :: default ascii
7%% + literateidris :: convert ascii maths to math symbols.
7%% + literateidris :: convert ascii maths to math symbols.
8−%% + Defines a `numbers' and `default' listings style.
8+%% + Defines a `numbers', `default', and `stdout' listings style.
9+%% + default :: default for Idris which is to use a tt font.
10+%% + numbers :: default but with numbers.
11+%% + stdout :: for formatting stdout.
9%% + Defines a `code' environment for typesetting idris.
12%% + Defines a `code' environment for typesetting idris.
10%% + \begin{code}[...] ... \end{code}
13%% + \begin{code}[...] ... \end{code}
11%% + Defines an input command for externally defined idris files.
14%% + Defines an input command for externally defined idris files.
@@ -67,7 +70,7 @@
68%% ------------------------------------------------------- [ Prelude Functions ]
71%% ------------------------------------------------------- [ Prelude Functions ]
69 morekeywords={%
72 morekeywords={%
70− class, data, instance, record, dsl, postulate, default,
73+ class, data, instance, record, dsl, postulate, default,
71 lambda, variable, index_first, index_next
74 lambda, variable, index_first, index_next
73%% ---------------------------------------------------------------- [ Comments ]
76%% ---------------------------------------------------------------- [ Comments ]
@@ -89,7 +92,7 @@
89 {>=}{{$\geq$}}2
92 {>=}{{$\geq$}}2
90 {<-}{{$\leftarrow$}}2
93 {<-}{{$\leftarrow$}}2
91 {<=}{{$\leq$}}2
94 {<=}{{$\leq$}}2
92− {=>}{{$\Rightarrow$}}2
95+ {=>}{{$\Rightarrow$}}2
93 {==}{{$\equiv$}}2
96 {==}{{$\equiv$}}2
94 {\ .}{{$\circ$}}2
97 {\ .}{{$\circ$}}2
95 {\ .\ }{{$\circ$}}2
98 {\ .\ }{{$\circ$}}2
@@ -100,8 +103,9 @@
100%% -------------------------------------------------- [ Default Listings Style ]
103%% -------------------------------------------------- [ Default Listings Style ]
102\lstdefinestyle{default}{%
105\lstdefinestyle{default}{%
103− basicstyle=\ttfamily
106+ basicstyle=\ttfamily\normalsize,
105\lstdefinestyle{numbers}{%
109\lstdefinestyle{numbers}{%
106 numbers=left,
110 numbers=left,
107 numbersep=10pt,
111 numbersep=10pt,
@@ -109,6 +113,14 @@
109 frame=leftline
113 frame=leftline
116+\lstdefinestyle{stdout}{%
117+ xleftmargin=\parindent,
119+ basicstyle=\ttfamily\normalsize,
120+ showstringspaces=false,
112%% ------------------------------------------------------ [ A Code Environment ]
124%% ------------------------------------------------------ [ A Code Environment ]
113%% Replicate the existence of literate haskell code environments,
125%% Replicate the existence of literate haskell code environments,
114%% option to make pretty with numbers.
126%% option to make pretty with numbers.