diff options
author | 2009-09-15 15:48:53 -0400 | |
---|---|---|
committer | 2009-09-15 15:48:53 -0400 | |
commit | 1b7715d8fbe242f8069f2d3ed061f47ec5749fff (patch) | |
tree | 47760017bfc37999184289878129fd3e64115e52 /lib | |
parent | 29beb826759d72be61a60c820272bf99831a7083 (diff) |
Filters implementation type-checking
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ur/option.ur | 5 | ||||
-rw-r--r-- | lib/ur/option.urs | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/ur/option.ur b/lib/ur/option.ur index 1f044002..a22cf5b5 100644 --- a/lib/ur/option.ur +++ b/lib/ur/option.ur @@ -7,6 +7,11 @@ fun eq [a] (_ : eq a) = | (Some x, Some y) => x = y | _ => False) +fun isNone [a] x = + case x of + None => True + | Some _ => False + fun isSome [a] x = case x of None => False diff --git a/lib/ur/option.urs b/lib/ur/option.urs index 984bc681..f4570768 100644 --- a/lib/ur/option.urs +++ b/lib/ur/option.urs @@ -2,6 +2,7 @@ datatype t = datatype Basis.option val eq : a ::: Type -> eq a -> eq (t a) +val isNone : a ::: Type -> t a -> bool val isSome : a ::: Type -> t a -> bool val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b |