Open sstucki opened 3 years ago
I'll start: apparently, its a bad idea to inline long equational proofs in record definitions.
let-in
because that's just syntactic sugar, and it will get expanded out / duplicated everywhere. It might be ok for open
and giving short names meant for humans.open public
. This can be convenient at times, but can also really pollute the name space and make interoperability complicatedusing
qualifiers, both at the top and for local modules. These end up in the signature of the modules, and can have a knock-on effect on size.
(Prompted by the discussion in https://github.com/agda/agda-categories/pull/304#issuecomment-905410931.)
There are some guidelines in the README.md about what idioms to use and to avoid, but there are also a bunch of non-trivial patterns (like the use of the
sym-*
fields, or general strategies for avoiding bad performance) that don't seem to be documented in the repo. These should probably all go into a contributors guide.Until there's such a guide, we could maybe at least collect important points here.