-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrae.fmt
More file actions
160 lines (147 loc) · 4.28 KB
/
rae.fmt
File metadata and controls
160 lines (147 loc) · 4.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
%include polycode.fmt
%format (at x) = "@" x
%if style == poly
%format ! = "\mathop{}\tick"
%format nil = "\tick" []
%format !: = "\mathop{\tick{:}}"
%format !:~> = "\mathop{\tick{{:}{\rightsquigarrow}}}"
%format !-> = "\mathop{\tick{\to}}"
%format !=> = "\mathop{\tick{\Rightarrow}}"
%format !++ = "\mathop{\tick{" ++ "}}"
%format :~> = "\mathop{{:}{\rightsquigarrow}}"
%format :~: = "\mathop{{:}{\sim}{:}}"
%format :~~: = "\mathop{{:}{\approx}{:}}"
%subst conid a = "\conid{" a "}"
%subst varid a = "\varid{" a "}"
%subst keyword a = "\keyword{" a "}"
%format ^^ = "\;"
%format ^^^ = "\,"
%format ## = "\!"
%format (FromNat x) = x
%format BOX = "\square"
%format ~ = "\,\sim\,"
%format qquad = "\qquad"
%format com = "\text{-}\text{-}"
%format bang = "!"
%format family = "\keyword{family}"
%format pattern = "\keyword{pattern}"
%format COMPLETE = "\keyword{complete}"
%format RULES = "\keyword{rules}"
%format NOINLINE = "\keyword{noinline}"
%format /~ = "\not\sim"
%format star = "\star"
%format * = "\star"
%format \* = "*"
%format =-> = "\mapsto"
%format dollar = $
%format ~> = "\twoheadrightarrow"
%format th_d_open = "[\id{d}|\;"
%format th_d_close = |]
% the above one is unnecessary, but included for completeness
%format ghci = "\lambda\!"
%format /\ = "\Lambda"
%format |> = "\triangleright"
%format pi = "\Pi"
%format tau = "\tau"
%format taus = "\overline\tau"
%format upsilon = "\upsilon"
%format upsilons = "\overline\upsilon"
%format sigma = "\sigma"
%format alpha = "\alpha"
%format alphas = "\overline\alpha"
%format beta = "\beta"
%format <$> = "\mathop{{\langle}{\$}{\rangle}}"
%format <*> = "\mathop{{\langle}{*}{\rangle}}"
%format ^ = "\string^"
%format bottom = "\bot"
%format prag_begin = "\{-{\#}"
%format prag_end = "{\#}{-}\}"
%format k1
%format k2
% suppress some built-in formatting of lhs2TeX:
%format not = "\varid{not}"
%format == = "\mathop{==}"
%format /= = "\mathop{{/}{=}}"
%format && = "\mathop{\&\&}"
%format undefined = "\varid{undefined}"
%else
%format KK = k
%format ^^ =
%format ^^^ =
%format ## =
%format qquad =
%format com = --
%format \* = *
%format ! = "TICK "
%format !: = TICK :
%format !:~> = TICK :~>
%format nil = TICK []
%format dollar = $
%format begin_comment = "{-"
%format end_comment = "-}"
%format th_d_open = "[d|"
%format prag_begin = "{-#"
%format prag_end = "#-}"
%endif
%if False
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% forall.fmt
%
% *EXPERIMENTAL*
% Semi-automatic formatting of the . as either function
% composition (normally) or a period (when used after a
% forall).
%
% Permission is granted to include this file (or parts of this file)
% literally into other documents, regardless of the conditions or
% license applying to these documents.
%
% Andres Loeh, November 2005, ver 1.1
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%endif
%if not lhs2tex_forall_fmt_read
%let lhs2tex_forall_fmt_read = True
%include lhs2TeX.fmt
%
%if style /= newcode
%
% First, let's redefine the forall, and the dot.
%
%format forall = forall_ "\hsforall "
%format exists = exists_ "\hsexists "
%format . = "\hsdot{" `comp_` "}{" period_ "}"
%format `comp_` = "\circ "
%format period_ = ".\,"
%format forall_ = "\keyword{$\forall$}\!\! "
%format exists_ = "\keyword{$\exists$}\!\! "
%
% This is made in such a way that after a forall, the next
% dot will be printed as a period, otherwise the formatting
% of `comp_` is used. By redefining `comp_`, as suitable
% composition operator can be chosen. Similarly, period_
% is used for the period.
%
\ReadOnlyOnce{forall.fmt}%
\makeatletter
% The HaskellResetHook is a list to which things can
% be added that reset the Haskell state to the beginning.
% This is to recover from states where the hacked intelligence
% is not sufficient.
\let\HaskellResetHook\empty
\newcommand*{\AtHaskellReset}[1]{%
\g@@addto@@macro\HaskellResetHook{#1}}
\newcommand*{\HaskellReset}{\HaskellResetHook}
\global\let\hsforallread\empty
\global\let\hsexistsread\empty
\newcommand\hsforall{\global\let\hsdot=\hsperiodonce}
\newcommand\hsexists{\global\let\hsdot=\hsperiodonce}
\newcommand*\hsperiodonce[2]{#2\global\let\hsdot=\hscompose}
\newcommand*\hscompose[2]{#1}
\AtHaskellReset{\global\let\hsdot=\hscompose}
% In the beginning, we should reset Haskell once.
\HaskellReset
\makeatother
\EndFmtInput
%endif
%endif