- allow multiple names in infix, typesig, and dcon defs - align fixities with Idris
25 lines
487 B
Plaintext
25 lines
487 B
Plaintext
module Prelude
|
|
|
|
data Nat : U where
|
|
Z : Nat
|
|
S : Nat -> Nat
|
|
|
|
data Maybe : U -> U where
|
|
Just : {a : U} -> a -> Maybe a
|
|
Nothing : {a : U} -> Maybe a
|
|
|
|
data Either : U -> U -> U where
|
|
Left : {a b : U} -> a -> Either a b
|
|
Right : {a b : U} -> b -> Either a b
|
|
|
|
data List : U -> U where
|
|
Nil : {a : U} -> List a
|
|
Cons : {a : U} -> a -> List a -> List a
|
|
|
|
-- Currently if I say _::_ = Cons, it gets curried
|
|
|
|
infixr 7 _::_
|
|
_::_ : {a : U} -> a -> List a -> List a
|
|
_::_ x xs = Cons x xs
|
|
|