Skip to content

Commit e435b32

Browse files
committed
Document Vatras.Lang.All(.Fixed)
1 parent 804a59a commit e435b32

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/Vatras/Lang/All.agda

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{-|
22
This module reexports all our language definitions as new modules.
3-
If you intend to work with more than one language in a file
4-
we recommend using this module to easily import the languages you need.
3+
Instead of directly importing the language modules,
4+
we recommend importing this module if you do not want to apply the module parameters.
5+
6+
For convenience, we change explicit module parameters to implicit ones where useful.
7+
The rule of thumb is:
8+
Types use explicit arguments whereas functions use implicit arguments.
9+
In case you want to instantiate these module parameters with a fixed value,
10+
you can use `Vatras.Lang.All.Fixed` instead of this module.
511
-}
612
module Vatras.Lang.All where
713

@@ -21,6 +27,12 @@ open import Size using (∞)
2127
open import Vatras.Framework.Definitions using (𝔽; 𝔸; 𝕍)
2228
open import Vatras.Framework.Variants using (Rose)
2329

30+
{-
31+
Some definitions do not make use of the module parameter.
32+
In such cases explicit arguments would be confusing and implicit paramters would lead to unsolved metas.
33+
Hence, we assert that these parameters are unused by passing `⊥` for `𝔽` or `λ _ → ⊥` for `𝔸`.
34+
-}
35+
2436
module VariantList where
2537
open Vatras.Lang.VariantList using (VariantList; VariantListL; Clone-and-Own) public
2638
open Vatras.Lang.VariantList (λ _ ⊥) using (Configuration) public

src/Vatras/Lang/All/Fixed.agda

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Vatras.Lang.Gruler
1717
module VariantList = Vatras.Lang.VariantList V
1818
module CCC = Vatras.Lang.CCC F
1919
module NCC where
20+
-- Similar as in `Vatras.Lang.All`, we make the arity argument implicit for usablity.
2021
open Vatras.Lang.NCC F using (NCC; NCCL; Configuration) public
2122
module _ {n : ℕ≥ 2} where
2223
open Vatras.Lang.NCC F n hiding (NCC; NCCL; Configuration) public

0 commit comments

Comments
 (0)