Debian Codegraph @

src/Data/Container/Morphism.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Container Morphisms
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Data.Container.Morphism where
10
11 open import Data.Container.Core using (Container; ⟦_⟧; _⇒_; shape; position)
12 import Function.Base as F using (id; _∘′_)
13
14 module _ {s p} (C : Container s p) where
15
16 id : C ⇒ C
17 id .shape = F.id
18 id .position = F.id
19
20 module _ {s₁ s₂ s₃ p₁ p₂ p₃}
21 {C₁ : Container s₁ p₁} {C₂ : Container s₂ p₂} {C₃ : Container s₃ p₃}
22 where
23
24 infixr 9 _∘_
25 _∘_ : C₂ ⇒ C₃ → C₁ ⇒ C₂ → C₁ ⇒ C₃
26 (f ∘ g) .shape = shape f F.∘′ shape g
27 (f ∘ g) .position = position g F.∘′ position f