summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-23 18:45:10 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-23 18:45:10 -0400
commit9569ae99c75cb74aeeb6fa02e6eec9eff2c7669f (patch)
tree6d1b3b0450e7d90ffb86bc43ce2c479ba9b7c78f /lib
parentfbde7928c43149e02806949343783dc6e885ab0f (diff)
Crud2 demo
Diffstat (limited to 'lib')
-rw-r--r--lib/basis.urs3
-rw-r--r--lib/top.ur2
-rw-r--r--lib/top.urs2
3 files changed, 6 insertions, 1 deletions
diff --git a/lib/basis.urs b/lib/basis.urs
index a8c81353..fce29ff9 100644
--- a/lib/basis.urs
+++ b/lib/basis.urs
@@ -18,6 +18,7 @@ val eq_int : eq int
val eq_float : eq float
val eq_string : eq string
val eq_bool : eq bool
+val mkEq : t ::: Type -> (t -> t -> bool) -> eq t
class num
val zero : t ::: Type -> num t -> t
@@ -365,7 +366,7 @@ val radioOption : unit -> tag [Value = string] radio [] [] []
con select = [Select]
val select : formTag string select []
-val option : unit -> tag [Value = string] select [] [] []
+val option : unit -> tag [Value = string, Selected = bool] select [] [] []
val submit : ctx ::: {Unit} -> use ::: {Type}
-> fn [[Form] ~ ctx] =>
diff --git a/lib/top.ur b/lib/top.ur
index 91cab991..0bc345de 100644
--- a/lib/top.ur
+++ b/lib/top.ur
@@ -1,3 +1,5 @@
+fun not b = if b then False else True
+
con idT (t :: Type) = t
con record (t :: {Type}) = $t
con fstTT (t :: (Type * Type)) = t.1
diff --git a/lib/top.urs b/lib/top.urs
index 29a1acf1..22cebb16 100644
--- a/lib/top.urs
+++ b/lib/top.urs
@@ -1,3 +1,5 @@
+val not : bool -> bool
+
con idT = fn t :: Type => t
con record = fn t :: {Type} => $t
con fstTT = fn t :: (Type * Type) => t.1