on master help sign in
either.idr
commitda5e25ede1f9f9ba1af0a9af8257c601c257454d authorEdwin Brady <eb@cs.st-andrews.ac.uk> dateThu 17 Nov 2011, 16:05 (15 years ago) parent8d83d07
2 files changed+9
lib/either.idr+8 lib/prelude.idr+1
lib/either.idrnew file+8
@@ -0,0 +1,8 @@
1+import builtins;
2+
3+data Either a b = Left a | Right b;
4+
5+choose : (b : Bool) -> Either (so b) (so (not b));
6+choose True = Left oh;
7+choose False = Right oh;
8+
lib/prelude.idr+1
@@ -2,6 +2,7 @@ import builtins;
22import nat;
33import list;
44import maybe;
5+import either;
56import vect;
67import io;
78