mirror of
https://github.com/ilyakooo0/Idris-dev.git
synced 2024-11-11 14:57:30 +03:00
Small documentation updates
This commit is contained in:
parent
5a08c2cdb7
commit
b6c9ef8334
@ -9,8 +9,13 @@ namespace Vect {
|
||||
|
||||
infixr 7 ::
|
||||
|
||||
%elim data Vect : Nat -> Type -> Type where
|
||||
||| Vectors: Generic lists with explicit length in the type
|
||||
%elim
|
||||
data Vect : Nat -> Type -> Type where
|
||||
||| Empty vector
|
||||
Nil : Vect Z a
|
||||
||| A non-empty vector of length `S n`, consisting of a head element and
|
||||
||| the rest of the list, of length `n`.
|
||||
(::) : (x : a) -> (xs : Vect n a) -> Vect (S n) a
|
||||
|
||||
-- Hints for interactive editing
|
||||
|
@ -18,11 +18,12 @@ import Prelude.Nat
|
||||
infix 5 \\
|
||||
infixr 7 ::,++
|
||||
|
||||
||| Linked lists
|
||||
||| Generic lists
|
||||
%elim data List elem =
|
||||
||| The empty list
|
||||
||| Empty list
|
||||
Nil |
|
||||
||| Cons cell
|
||||
||| A non-empty list, consisting of a head element and the rest of
|
||||
||| the list.
|
||||
(::) elem (List elem)
|
||||
|
||||
-- Name hints for interactive editing
|
||||
|
@ -12,7 +12,8 @@ import Prelude.Uninhabited
|
||||
%access public
|
||||
%default total
|
||||
|
||||
||| Unary natural numbers
|
||||
||| Natural numbers: unbounded, unsigned integers which can be pattern
|
||||
||| matched.
|
||||
%elim data Nat =
|
||||
||| Zero
|
||||
Z |
|
||||
|
Loading…
Reference in New Issue
Block a user