0 | module Prelude.Basics
23 | public export %inline
24 | the : (0 a : Type) -> (1 x : a) -> a
28 | public export %inline
38 | public export %inline
40 | const x = \value => x
43 | public export %inline %tcinline
44 | (.) : (b -> c) -> (a -> b) -> a -> c
45 | (.) f g = \x => f (g x)
50 | public export %inline %tcinline
51 | (.:) : (c -> d) -> (a -> b -> c) -> a -> b -> d
67 | public export %tcinline
68 | on : (b -> b -> c) -> (a -> b) -> a -> a -> c
69 | on f g = \x, y => g x `f` g y
71 | export infixl 0 `on`
75 | public export %tcinline
76 | flip : (f : a -> b -> c) -> b -> a -> c
77 | flip f = \x, y => f y x
80 | public export %tcinline
81 | apply : (a -> b) -> a -> b
85 | curry : ((a, b) -> c) -> a -> b -> c
86 | curry f a b = f (a, b)
89 | uncurry : (a -> b -> c) -> (a, b) -> c
90 | uncurry f (a, b) = f a b
96 | ($) : forall a, b . ((x : a) -> b x) -> (x : a) -> b x
107 | (|>) : a -> (a -> b) -> b
116 | (<|) : (a -> b) -> a -> b
125 | cong : (0 f : t -> u) -> (0 p : a = b) -> f a = f b
131 | cong2 : (0 f : t1 -> t2 -> u) -> (0 p1 : a = b) -> (0 p2 : c = d) -> f a c = f b d
132 | cong2 f Refl Refl = Refl
136 | depCong : {0 p : a -> Type} ->
137 | (0 f : (x : a) -> p x) ->
141 | depCong f Refl = Refl
145 | depCong2 : {0 p : a -> Type} ->
146 | {0 q : (x : a) -> (y : p x) -> Type} ->
147 | (0 f : (x : a) -> (y : p x) -> q x y) ->
148 | {0 x1, x2 : a} -> (prfX : x1 = x2) ->
149 | {0 y1 : p x1} -> {y2 : p x2} ->
150 | (prfY : y1 = y2) -> f x1 y1 = f x2 y2
151 | depCong2 f Refl Refl = Refl
155 | irrelevantEq : (0 _ : a ~=~ b) -> a ~=~ b
156 | irrelevantEq Refl = Refl
164 | data Bool = False | True
169 | not : (b : Bool) -> Bool
176 | (&&) : (b : Bool) -> Lazy Bool -> Bool
178 | (&&) False x = False
183 | (||) : (b : Bool) -> Lazy Bool -> Bool
190 | ifThenElse : (b : Bool) -> Lazy a -> Lazy a -> a
191 | ifThenElse True l r = l
192 | ifThenElse False l r = r
196 | intToBool : Int -> Bool
197 | intToBool 0 = False
213 | %name List
xs, ys, zs
222 | (:<) (SnocList a) a
224 | %name SnocList
sx, sy, sz