[Agda] Levels and Containers
Andreas Abel
abela at chalmers.se
Fri Jan 27 21:15:04 CET 2017
Don't know (but I am not a user of Container). Let's see if there is
strong arguments for the current situation, and if not, please submit a
pull request.
On 27.01.2017 20:50, Manuel Bärenz wrote:
> Dear Agda people, especially stdlib people,
>
> In the definition of Data.Container, is there a reason why the level of
> the container is the same as the level of the functor argument?
>
> The definition is:
>
> -- stdlib code
>
> record Container (ℓ : Level) : Set (suc ℓ) where
> constructor _▷_
> field
> Shape : Set ℓ
> Position : Shape → Set ℓ
>
> open Container public
>
> -- The semantics ("extension") of a container.
>
> ⟦_⟧ : ∀ {ℓ} → Container ℓ → Set ℓ → Set ℓ
> ⟦ C ⟧ X = Σ[ s ∈ Shape C ] (Position C s → X)
>
> -- stlib code ends
>
> It's possible to generalise the last two lines to:
>
> ⟦_⟧ : ∀ {ℓ₁ ℓ₂} → Container ℓ₁ → Set ℓ₂ → Set (ℓ₁ ⊔ ℓ₂)
> ⟦ C ⟧ X = Σ[ s ∈ Shape C ] (Position C s → X)
>
> For my project, this would be great. (I've done that change in my local
> copy.) You have to make some type signatures slightly more verbose,
> otherwise there are unsolved metas, but it's not a big deal.
>
> Is there any deeper reason why the stdlib type signature is so special?
>
> Manuel
>
> _______________________________________________
> Agda mailing list
> Agda at lists.chalmers.se
> https://lists.chalmers.se/mailman/listinfo/agda
>
--
Andreas Abel <>< Du bist der geliebte Mensch.
Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden
andreas.abel at gu.se
http://www.cse.chalmers.se/~abela/
More information about the Agda
mailing list