summaryrefslogtreecommitdiff
path: root/Generic.agda
diff options
context:
space:
mode:
authorHelmut Grohne <grohne@cs.uni-bonn.de>2014-01-27 09:31:56 +0100
committerHelmut Grohne <grohne@cs.uni-bonn.de>2014-01-27 09:31:56 +0100
commit71025b5f1d0a11b0cf373192210b293a77d45c04 (patch)
tree4b140916005f93b3f292a7e4daa123b37eea5825 /Generic.agda
parentd2521627834713a651be0ac22aab0a1cd78df920 (diff)
downloadbidiragda-71025b5f1d0a11b0cf373192210b293a77d45c04.tar.gz
cleanup unused functions and useless steps
Diffstat (limited to 'Generic.agda')
-rw-r--r--Generic.agda10
1 files changed, 0 insertions, 10 deletions
diff --git a/Generic.agda b/Generic.agda
index 2ef374c..4e55c21 100644
--- a/Generic.agda
+++ b/Generic.agda
@@ -15,10 +15,6 @@ open import Relation.Binary.PropositionalEquality using (_≗_ ; cong ; subst ;
open Category.Functor.RawFunctor {Level.zero} Data.Maybe.functor using (_<$>_)
open Category.Monad.RawMonad {Level.zero} Data.Maybe.monad using (_>>=_)
-∷-injective : {A : Set} {n : ℕ} {x y : A} {xs ys : Vec A n} →
- (x ∷V xs) ≡ (y ∷V ys) → x ≡ y × xs ≡ ys
-∷-injective refl = refl , refl
-
just-injective : {A : Set} → {x y : A} → Maybe.just x ≡ Maybe.just y → x ≡ y
just-injective refl = refl
@@ -26,12 +22,6 @@ length-replicate : {A : Set} {a : A} → (n : â„•) → length (replicate n a) â‰
length-replicate zero = refl
length-replicate (suc n) = cong suc (length-replicate n)
-map-just-injective : {A : Set} {n : ℕ} {xs ys : Vec A n} →
- map Maybe.just xs ≡ map Maybe.just ys → xs ≡ ys
-map-just-injective {xs = []V} {ys = []V} p = refl
-map-just-injective {xs = x ∷V xs′} {ys = y ∷V ys′} p with ∷-injective p
-map-just-injective {xs = x ∷V xs′} {ys = .x ∷V ys′} p | refl , p′ = cong (_∷V_ x) (map-just-injective p′)
-
mapMV : {A B : Set} {n : ℕ} → (A → Maybe B) → Vec A n → Maybe (Vec B n)
mapMV f []V = just []V
mapMV f (x ∷V xs) = (f x) >>= (λ y → (_∷V_ y) <$> (mapMV f xs))