File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,34 @@ automate most of this.
229229 }
230230 ```
231231
232+ #### Layout of initial ` private ` block
233+
234+ * Since the introduction of generalizable ` variable ` s (see below),
235+ this block provides a very useful way to 'fix'/standardise notation
236+ for the rest of the module, as well as introducing local
237+ instantiations of parameterised ` module ` definitions, again for the
238+ sake of fixing notation via qualified names.
239+
240+ * It should typically follow the ` import ` and ` open ` declarations, as
241+ above, separated by one blankline, and be followed by * two* blank
242+ lines ahead of the main module body.
243+
244+ * The current preferred layout is to use successive indentation by two spaces, eg.
245+ ``` agda
246+ private
247+ variable
248+ a : Level
249+ A : Set a
250+ ```
251+ rather than to use the more permissive 'stacked' style, available
252+ since [ agda/agda #5319 ] ( https://github.com/agda/agda/pull/5319 ) .
253+
254+ * A possible exception to the above rule is when a * single* declaration
255+ is made, such as eg.
256+ ``` agda
257+ private open module M = ...
258+ ```
259+
232260#### Layout of ` where ` blocks
233261
234262* ` where ` blocks are preferred rather than the ` let ` construction.
You can’t perform that action at this time.
0 commit comments