summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-07 11:13:18 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-07 11:13:18 -0400
commit6994a00f608335fc2e835538dfd84b70aa486d0f (patch)
tree025a2cfb12b5075c231a663b21c6df3b979848ef /lib
parent555b6a066f6a4a2396ead20e673b363c3706e713 (diff)
Start of Option; Basis.current; fix missed cases in Jscomp.isNullable
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js3
-rw-r--r--lib/ur/basis.urs1
-rw-r--r--lib/ur/option.ur6
-rw-r--r--lib/ur/option.urs3
4 files changed, 13 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 6c974948..efd94bb9 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -210,6 +210,9 @@ function sb(x,y) {
return {sources : union(xr.sources, yr.sources), data : yr.data};
};
}
+function scur(s) {
+ return s().data;
+}
function lastParent() {
var pos = document;
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index d3fbe037..50909804 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -107,6 +107,7 @@ val get : t ::: Type -> source t -> transaction t
con signal :: Type -> Type
val signal_monad : monad signal
val signal : t ::: Type -> source t -> signal t
+val current : t ::: Type -> signal t -> transaction t
(** HTTP operations *)
diff --git a/lib/ur/option.ur b/lib/ur/option.ur
new file mode 100644
index 00000000..cb2a6b57
--- /dev/null
+++ b/lib/ur/option.ur
@@ -0,0 +1,6 @@
+datatype t = datatype Basis.option
+
+fun isSome [a] x =
+ case x of
+ None => False
+ | Some _ => True
diff --git a/lib/ur/option.urs b/lib/ur/option.urs
new file mode 100644
index 00000000..97e52fda
--- /dev/null
+++ b/lib/ur/option.urs
@@ -0,0 +1,3 @@
+datatype t = datatype Basis.option
+
+val isSome : a ::: Type -> t a -> bool