summaryrefslogtreecommitdiff
path: root/GetTypes.agda
diff options
context:
space:
mode:
authorHelmut Grohne <grohne@cs.uni-bonn.de>2014-01-30 09:13:11 +0100
committerHelmut Grohne <grohne@cs.uni-bonn.de>2014-01-30 09:13:11 +0100
commit19670abeff9895de593ef26ad2da247ae590ce90 (patch)
treea8ab321a315b27abf5f15fc30701ac481e54ab04 /GetTypes.agda
parentc63ff4179147ab237afe7d21d9e3740737c9b942 (diff)
downloadbidiragda-19670abeff9895de593ef26ad2da247ae590ce90.tar.gz
allow importing of Bidir without any postulates
Diffstat (limited to 'GetTypes.agda')
-rw-r--r--GetTypes.agda20
1 files changed, 20 insertions, 0 deletions
diff --git a/GetTypes.agda b/GetTypes.agda
new file mode 100644
index 0000000..99675f9
--- /dev/null
+++ b/GetTypes.agda
@@ -0,0 +1,20 @@
+module GetTypes where
+
+open import Data.Nat using (ℕ)
+open import Data.List using (List ; map)
+open import Data.Vec using (Vec) renaming (map to mapV)
+open import Function using (_∘_)
+open import Relation.Binary.PropositionalEquality using (_≗_)
+
+module ListList where
+ record Get : Set₁ where
+ field
+ get : {A : Set} → List A → List A
+ free-theorem : {α β : Set} → (f : α → β) → get ∘ map f ≗ map f ∘ get
+
+module VecVec where
+ record Get : Set₁ where
+ field
+ getlen : ℕ → ℕ
+ get : {A : Set} {n : ℕ} → Vec A n → Vec A (getlen n)
+ free-theorem : {α β : Set} (f : α → β) {n : ℕ} → get {_} {n} ∘ mapV f ≗ mapV f ∘ get