Skip to content

Commit

Permalink
Add Notes to style guide.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Apr 9, 2021
1 parent 55fe83d commit 2435cf8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions STYLE.md
Expand Up @@ -314,6 +314,29 @@ Design Rules
partial functions. E.g, if a list must never be empty, represent
it as a pair of an element and a list instead of just a list.

Notes
=====

For long comments, we (try to) use the Notes convention from GHC,
[explained here](https://www.stackbuilders.com/news/the-notes-of-ghc).
Essentially, instead of writing very long in-line comments that break
the flow of the code, we write

```
-- See Note [Foo Bar]
```

and then somewhere else in the file (perhaps at the bottom), we put

```
-- Note [Foo Bar]
--
-- Here is how you foo the bar...
```

There is no automation around this or a hard rule for what a "long
comment" is. It's just a convention.

Credits
=======

Expand Down

0 comments on commit 2435cf8

Please sign in to comment.