|
124 | 124 | \newenvironment{commentary}[1]{{\color{commentaryColor}\sf{#1}}}{}
|
125 | 125 |
|
126 | 126 | % Auxiliary functions.
|
127 |
| -\newcommand{\flattenName}{\mbox{\it flatten}} |
128 |
| -\newcommand{\flatten}[1]{\ensuremath{\flattenName({#1})}} |
129 |
| -\newcommand{\futureOrBase}[1]{\ensuremath{\mbox{\it futureOrBase}({#1})}} |
130 |
| -\newcommand{\overrides}[1]{\ensuremath{\mbox{\it overrides}({#1})}} |
131 |
| -\newcommand{\inherited}[1]{\ensuremath{\mbox{\it inherited}({#1})}} |
| 127 | +\newcommand{\futureOrBase}[1]{\ensuremath{\metavar{futureOrBase}({#1})}} |
| 128 | +\newcommand{\overrides}[1]{\ensuremath{\metavar{overrides}({#1})}} |
| 129 | +\newcommand{\inherited}[1]{\ensuremath{\metavar{inherited}({#1})}} |
132 | 130 |
|
133 | 131 | % Used as a mini-section marker, indicating visibly that a range of
|
134 | 132 | % text (usually just a couple of paragraphs) are concerned with one
|
|
386 | 384 | \newcommand{\FunctionTypePositionalStdCr}[1]{%
|
387 | 385 | \FunctionTypePositional{#1}{\\}{X}{B}{s}{T}{n}{k}}
|
388 | 386 |
|
| 387 | +% Used to specify function type parameter lists with named optionals. |
| 388 | +% Arguments: Parameter type, number of required parameters, |
| 389 | +% name of optional parameters, number of optional parameters, |
| 390 | +% name of `required` symbol. |
| 391 | +\newcommand{\FunctionTypeNamedArguments}[5]{% |
| 392 | + \List{#1}{1}{#2},\ \{\TripleList{#5}{#1}{#3}{{#2}+1}{{#2}+{#4}}\}} |
| 393 | + |
| 394 | +\newcommand{\FunctionTypeNamedArgumentsStd}{% |
| 395 | + \FunctionTypeNamedArguments{T}{n}{x}{k}{r}} |
| 396 | + |
389 | 397 | % Used to specify function types with named parameters:
|
390 | 398 | % Arguments: Return type, spacer, type parameter name, bound name,
|
391 | 399 | % number of type parameters, parameter type, number of required parameters,
|
|
402 | 410 |
|
403 | 411 | % Same as \FunctionTypeNamed except suitable for inline usage, hence omitting
|
404 | 412 | % the spacer argument.
|
405 |
| -\newcommand{\RawFunctionTypeNamed}[8]{% |
| 413 | +\newcommand{\RawFunctionTypeNamed}[9]{% |
406 | 414 | \RawFunctionType{#1}{#2}{#3}{#4}{%
|
407 | 415 | \FunctionTypeNamedParameters{#5}{#6}{#7}{#8}{r}}}
|
408 | 416 |
|
|
447 | 455 | \newcommand{\FunctionTypeAllRequiredStd}[1]{%
|
448 | 456 | \FunctionTypeAllRequired{#1}{ }{X}{B}{s}{T}{n}}
|
449 | 457 |
|
| 458 | +\newcommand{\FunctionTypeNamedStdArgCr}[1]{% |
| 459 | + \FunctionTypeNamedArgCr{#1}{ }{X}{B}{s}{T}{n}{x}{k}{r}} |
| 460 | + |
450 | 461 | % Same as \FunctionTypeAllRequiredStd except that it includes a newline, hence
|
451 | 462 | % suitable for function types that are too long to fit in one line.
|
452 | 463 | \newcommand{\FunctionTypeAllRequiredStdCr}[1]{%
|
|
0 commit comments