@@ -131,7 +131,7 @@ automate most of this.
131
131
open SetoidEquality S
132
132
```
133
133
134
- * If importing a parametrised module, qualified or otherwise, with its
134
+ * If importing a parameterised module, qualified or otherwise, with its
135
135
parameters instantiated, then such 'instantiated imports' should be placed
136
136
* after* the main block of ` import ` s, and * before* any ` variable ` declarations.
137
137
@@ -314,6 +314,41 @@ line of code, indented by two spaces.
314
314
where open ≤-Reasoning
315
315
```
316
316
317
+ #### Layout of deprecation blocks
318
+
319
+ * There is standard boilerplate text which should go at the end of a
320
+ file, separated by two blank lines from the main module body:
321
+ ``` agda
322
+ ------------------------------------------------------------------------
323
+ -- DEPRECATED NAMES
324
+ ------------------------------------------------------------------------
325
+ -- Please use the new names as continuing support for the old names is
326
+ -- not guaranteed.
327
+ ```
328
+
329
+ * For each (new) version with deprecations, there should be a single
330
+ line comment, separated by one blank line from the preceding
331
+ deprecation block:
332
+ ``` agda
333
+ -- Version X.Y
334
+ ```
335
+
336
+ * There is standard boilerplate text for deprecating ` old-name ` in
337
+ favour of a definition in terms of ` new-name ` : the actual definition
338
+ (which need not have a type signature if this is a simple matter of
339
+ aliasing, or simple function composition), followed by:
340
+ ``` agda
341
+ {-# WARNING_ON_USAGE <old-name>
342
+ "Warning: <old-name> was deprecated in vX.Y.
343
+ Please use <newname> instead."
344
+ #-}
345
+ ```
346
+ where the advice on what to use instead may also contain additional
347
+ information regarding eg. location, or usage patterns.
348
+
349
+ * Each entry in the block should be correlated with a suitable
350
+ ` CHANGELOG ` entry for the associated release version.
351
+
317
352
#### Mutual and private blocks
318
353
319
354
* Non-trivial proofs in ` private ` blocks are generally discouraged. If it is
@@ -399,7 +434,7 @@ line of code, indented by two spaces.
399
434
syntax in preference to the Unicode ` ⦃_⦄ ` syntax (written using ` \{{ ` /` \}} ` ),
400
435
which moreover requires additional whitespace to parse correctly.
401
436
NB. Even for irrelevant instances, such as typically for ` NonZero ` arguments,
402
- neverthelesss it is necessary to supply an underscore binding ` {{_ : NonZero n}} `
437
+ nevertheless it is necessary to supply an underscore binding ` {{_ : NonZero n}} `
403
438
if subsequent terms occurring in the type rely on that argument to be well-formed:
404
439
eg in ` Data.Nat.DivMod ` , in the use of ` _/ n ` and ` _% n `
405
440
``` agda
@@ -611,7 +646,7 @@ Type formers:
611
646
612
647
* sum-like ` infixr 1 _⊎_ `
613
648
614
- * binary properties ` infix 4 _Absorbs_ `
649
+ * binary properties ` infix 4 _Absorbs_ `
615
650
616
651
#### Functions and relations over specific datatypes
617
652
0 commit comments