Created
January 21, 2019 04:34
-
-
Save appositum/98b4f2c12deb80da60b857a4c84b587e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open import Data.Nat | |
open import Data.Char | |
data Σ : (a : Set) → (P : a → Set) → Set where | |
Sigma : {a : Set} → {P : a → Set} → (x : a) → P x → Σ a P | |
data Vect : ℕ → Set → Set where | |
Nil : {a : Set} → Vect zero a | |
_∷_ : {a : Set} → {n : ℕ} → a → Vect n a → Vect (suc n) a | |
infixr 5 _∷_ | |
v : Vect 5 Char | |
v = 'h' ∷ 'e' ∷ 'l' ∷ 'l' ∷ 'o' ∷ Nil | |
vec : Σ ℕ (λ n → Vect n Char) | |
vec = Sigma 2 ('3' ∷ '4' ∷ Nil) | |
vec' : Σ ℕ (λ n → Vect n Char) | |
vec' = Sigma _ ('3' ∷ '4' ∷ Nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment