# HG changeset patch # User Adam Chlipala # Date 1325185923 18000 # Node ID 9253765d772402d6847b7265cf079be469683471 # Parent bd7edca0aec1725c50f1522b8c9c16f72802c740 Rename [Top.id] to avoid clash with [Basis.id] diff -r bd7edca0aec1 -r 9253765d7724 demo/more/dbgrid.ur --- a/demo/more/dbgrid.ur Thu Dec 29 10:04:09 2011 -0500 +++ b/demo/more/dbgrid.ur Thu Dec 29 14:12:03 2011 -0500 @@ -385,19 +385,19 @@ val wholeRow = @Folder.concat ! M.keyFolder M.rowFolder fun ensql [env] (r : $(M.key ++ M.row)) = - @map2 [rawMeta] [id] [sql_exp env [] []] + @map2 [rawMeta] [ident] [sql_exp env [] []] (fn [t] meta v => @sql_inject meta.Inj v) wholeRow M.raw r val new = - row <- @Monad.mapR _ [rawMeta] [id] + row <- @Monad.mapR _ [rawMeta] [ident] (fn [nm :: Name] [t :: Type] meta => meta.New) wholeRow M.raw; dml (insert M.tab (ensql row)); return row fun selector (r : $M.key) : sql_exp [T = M.key ++ M.row] [] [] bool = - @foldR2 [rawMeta] [id] + @foldR2 [rawMeta] [ident] [fn key => rest :: {Type} -> [rest ~ key] => sql_exp [T = key ++ rest] [] [] bool] (fn [nm :: Name] [t :: Type] [key :: {Type}] [[nm] ~ key] (meta : rawMeta t) (v : t) diff -r bd7edca0aec1 -r 9253765d7724 demo/more/grid.ur --- a/demo/more/grid.ur Thu Dec 29 10:04:09 2011 -0500 +++ b/demo/more/grid.ur Thu Dec 29 14:12:03 2011 -0500 @@ -253,17 +253,17 @@ grid.Rows} - @Monad.mapR2 _ [aggregateMeta M.row] [id] [id] + @Monad.mapR2 _ [aggregateMeta M.row] [ident] [ident] (fn [nm :: Name] [t :: Type] meta acc => Monad.mp (fn v => meta.Step v acc) (signal row.Row)) M.aggFolder M.aggregates) - (@mp [aggregateMeta M.row] [id] + (@mp [aggregateMeta M.row] [ident] (fn [t] meta => meta.Initial) M.aggFolder M.aggregates) grid.Rows; return Aggregates - {@mapX2 [aggregateMeta M.row] [id] [_] + {@mapX2 [aggregateMeta M.row] [ident] [_] (fn [nm :: Name] [t :: Type] [rest :: {Type}] [[nm] ~ rest] meta acc => {meta.Display acc}) M.aggFolder M.aggregates rows} diff -r bd7edca0aec1 -r 9253765d7724 demo/more/versioned.ur --- a/demo/more/versioned.ur Thu Dec 29 10:04:09 2011 -0500 +++ b/demo/more/versioned.ur Thu Dec 29 14:12:03 2011 -0500 @@ -24,7 +24,7 @@ Eq : eq t} fun keyRecd (r : $(M.key ++ M.data)) = - @map2 [sql_injectable] [id] [sql_exp [] [] []] + @map2 [sql_injectable] [ident] [sql_exp [] [] []] (fn [t] => @sql_inject) M.keyFolder M.key (r --- M.data) @@ -33,14 +33,14 @@ dml (Basis.insert t ({Version = (SQL {[vr]}), When = (SQL CURRENT_TIMESTAMP)} ++ keyRecd r - ++ @map2 [dmeta] [id] + ++ @map2 [dmeta] [ident] [fn t => sql_exp [] [] [] (option t)] (fn [t] x v => @sql_inject (@sql_option_prim x.Inj) (Some v)) M.dataFolder M.data (r --- M.key))) fun keyExp (r : $M.key) : sql_exp [T = all] [] [] bool = - @foldR2 [sql_injectable] [id] [fn before => after :: {Type} -> [before ~ after] + @foldR2 [sql_injectable] [ident] [fn before => after :: {Type} -> [before ~ after] => sql_exp [T = before ++ after] [] [] bool] (fn [nm :: Name] [t :: Type] [before :: {Type}] [[nm] ~ before] (inj : sql_injectable t) (v : t) @@ -113,7 +113,7 @@ | Some cur => vr <- nextval s; let - val r' = @map3 [dmeta] [id] [id] [fn t => sql_exp [] [] [] (option t)] + val r' = @map3 [dmeta] [ident] [ident] [fn t => sql_exp [] [] [] (option t)] (fn [t] (meta : dmeta t) old new => @sql_inject (@sql_option_prim meta.Inj) (if @@eq [_] meta.Eq old new then diff -r bd7edca0aec1 -r 9253765d7724 lib/ur/top.ur --- a/lib/ur/top.ur Thu Dec 29 10:04:09 2011 -0500 +++ b/lib/ur/top.ur Thu Dec 29 14:12:03 2011 -0500 @@ -51,7 +51,7 @@ fun not b = if b then False else True -con id = K ==> fn t :: K => t +con ident = K ==> fn t :: K => t con record (t :: {Type}) = $t con fst = K1 ==> K2 ==> fn t :: (K1 * K2) => t.1 con snd = K1 ==> K2 ==> fn t :: (K1 * K2) => t.2 diff -r bd7edca0aec1 -r 9253765d7724 lib/ur/top.urs --- a/lib/ur/top.urs Thu Dec 29 10:04:09 2011 -0500 +++ b/lib/ur/top.urs Thu Dec 29 14:12:03 2011 -0500 @@ -22,7 +22,7 @@ val not : bool -> bool (* Type-level identity function *) -con id = K ==> fn t :: K => t +con ident = K ==> fn t :: K => t (* Type-level function which yields the value-level record described by the given type-level record *)