In Agda, how can I define a parameterised module equivalent to the following?
data Sig : Set ℓ where
■ : Sort → Sig
ν : Sig → Sig
module SortedABT {ℓ} (Sort : Set ℓ) (Op : Sort → Set ℓ) (sig : (s : Sort) → Op s → List Sig) where
Of course the above doesn't work because ℓ and Sort appear in the definition of Sig, but are parameters of the module, so not yet defined where they appear. I've looked at the Agda manual and tried various web searches, but not found a workaround. Help, please!
Not sure what kind of UX you're looking for, but you could try
That adds
to the current scope together with the expected
SortedABT.Alternatively you may want to give the outer
modulea name like this:so that it always needs to be
opened explicitly at a specificSort, e.g.which adds
to the current scope as well as your original
SortedABTinstantiated like this: