| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Typeclass instances for Vec |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Vec.Instances where |
| 10 |
|
| 11 |
open import Data.Vec.Base using (Vec) |
| 12 |
open import Data.Vec.Effectful using (functor; applicative) |
| 13 |
open import Data.Vec.Properties using (≡-dec) |
| 14 |
open import Level using (Level) |
| 15 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
| 16 |
open import Relation.Binary.PropositionalEquality.Properties |
| 17 |
using (isDecEquivalence) |
| 18 |
open import Relation.Binary.TypeClasses using (IsDecEquivalence; _≟_) |
| 19 |
|
| 20 |
private |
| 21 |
variable |
| 22 |
a : Level |
| 23 |
A : Set a |
| 24 |
|
| 25 |
instance |
| 26 |
vecFunctor = functor |
| 27 |
vecApplicative = applicative |
| 28 |
|
| 29 |
Vec-≡-isDecEquivalence : {{IsDecEquivalence {A = A} _≡_}} → ∀ {n} → IsDecEquivalence {A = Vec A n} _≡_ |
| 30 |
Vec-≡-isDecEquivalence = isDecEquivalence (≡-dec _≟_) |