summaryrefslogtreecommitdiff
path: root/demo/more
diff options
context:
space:
mode:
Diffstat (limited to 'demo/more')
-rw-r--r--demo/more/grid.ur8
-rw-r--r--demo/more/grid.urs6
-rw-r--r--demo/more/orm.ur14
-rw-r--r--demo/more/orm.urs12
4 files changed, 20 insertions, 20 deletions
diff --git a/demo/more/grid.ur b/demo/more/grid.ur
index f2b9681c..170c6f2c 100644
--- a/demo/more/grid.ur
+++ b/demo/more/grid.ur
@@ -9,10 +9,10 @@ con colMeta' = fn (row :: Type) (input :: Type) (filter :: Type) =>
DisplayFilter : filter -> xbody,
Filter : filter -> row -> signal bool,
Sort : option (row -> row -> bool)}
-
-con colMeta = fn (row :: Type) (global_input_filter :: (Type * Type * Type)) =>
- {Initialize : transaction global_input_filter.1,
- Handlers : global_input_filter.1 -> colMeta' row global_input_filter.2 global_input_filter.3}
+
+con colMeta = fn (row :: Type) (global :: Type, input :: Type, filter :: Type) =>
+ {Initialize : transaction global,
+ Handlers : global -> colMeta' row input filter}
con aggregateMeta = fn (row :: Type) (acc :: Type) =>
{Initial : acc,
diff --git a/demo/more/grid.urs b/demo/more/grid.urs
index a918c67b..e47e4139 100644
--- a/demo/more/grid.urs
+++ b/demo/more/grid.urs
@@ -10,9 +10,9 @@ con colMeta' = fn (row :: Type) (input :: Type) (filter :: Type) =>
Filter : filter -> row -> signal bool,
Sort : option (row -> row -> bool)}
-con colMeta = fn (row :: Type) (global_input_filter :: (Type * Type * Type)) =>
- {Initialize : transaction global_input_filter.1,
- Handlers : global_input_filter.1 -> colMeta' row global_input_filter.2 global_input_filter.3}
+con colMeta = fn (row :: Type) (global :: Type, input :: Type, filter :: Type) =>
+ {Initialize : transaction global,
+ Handlers : global -> colMeta' row input filter}
con aggregateMeta = fn (row :: Type) (acc :: Type) =>
{Initial : acc,
diff --git a/demo/more/orm.ur b/demo/more/orm.ur
index 24ccac67..620db9ad 100644
--- a/demo/more/orm.ur
+++ b/demo/more/orm.ur
@@ -1,9 +1,9 @@
con link = fn col_parent :: (Type * Type) => col_parent.1 -> transaction (option col_parent.2)
fun noParent [t ::: Type] (_ : t) = return None
-con meta = fn col_parent :: (Type * Type) => {
- Link : link col_parent,
- Inj : sql_injectable col_parent.1
+con meta = fn (col :: Type, parent :: Type) => {
+ Link : link (col, parent),
+ Inj : sql_injectable col
}
fun local [t :: Type] (inj : sql_injectable t) = {Link = noParent,
@@ -55,10 +55,10 @@ functor Table(M : sig
con col = fn t => {Exp : sql_exp [T = fs] [] [] t,
Inj : sql_injectable t}
val idCol = {Exp = sql_field [#T] [#Id], Inj = _}
- con meta' = fn (fs :: {Type}) (col_parent :: (Type * Type)) =>
- {Col : {Exp : sql_exp [T = fs] [] [] col_parent.1,
- Inj : sql_injectable col_parent.1},
- Parent : $fs -> transaction (option col_parent.2)}
+ con meta' = fn (fs :: {Type}) (col :: Type, parent :: Type) =>
+ {Col : {Exp : sql_exp [T = fs] [] [] col,
+ Inj : sql_injectable col},
+ Parent : $fs -> transaction (option parent)}
val cols = foldR [meta] [fn before => after :: {(Type * Type)} -> [before ~ after] =>
$(map (meta' (map fst (before ++ after))) before)]
(fn [nm :: Name] [ts :: (Type * Type)] [before :: {(Type * Type)}]
diff --git a/demo/more/orm.urs b/demo/more/orm.urs
index b173d203..63f4ffc9 100644
--- a/demo/more/orm.urs
+++ b/demo/more/orm.urs
@@ -1,9 +1,9 @@
con link :: (Type * Type) -> Type
val noParent : t ::: Type -> link (t, unit)
-con meta = fn col_parent :: (Type * Type) => {
- Link : link col_parent,
- Inj : sql_injectable col_parent.1
+con meta = fn (col :: Type, parent :: Type) => {
+ Link : link (col, parent),
+ Inj : sql_injectable col
}
val local : t :: Type -> sql_injectable t -> meta (t, unit)
@@ -29,9 +29,9 @@ functor Table(M : sig
con col :: Type -> Type
val idCol : col id
- val cols : $(map (fn col_parent :: (Type * Type) =>
- {Col : col col_parent.1,
- Parent : row -> transaction (option col_parent.2)}) M.cols)
+ val cols : $(map (fn (colm :: Type, parent :: Type) =>
+ {Col : col colm,
+ Parent : row -> transaction (option parent)}) M.cols)
type filter
val find : filter -> transaction (option row)