changeset 1649:9253765d7724

Rename [Top.id] to avoid clash with [Basis.id]
author Adam Chlipala <adam@chlipala.net>
date Thu, 29 Dec 2011 14:12:03 -0500
parents bd7edca0aec1
children 1bfd793e7eb8
files demo/more/dbgrid.ur demo/more/grid.ur demo/more/versioned.ur lib/ur/top.ur lib/ur/top.urs
diffstat 5 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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)
--- 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}
 
             <dyn signal={rows <- Dlist.foldl (fn row : listT =>
-                                                 @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 <xml><tr>
                            <th colspan={3}>Aggregates</th>
-                           {@mapX2 [aggregateMeta M.row] [id] [_]
+                           {@mapX2 [aggregateMeta M.row] [ident] [_]
                              (fn [nm :: Name] [t :: Type] [rest :: {Type}] [[nm] ~ rest] meta acc =>
                                  <xml><td class={agg}>{meta.Display acc}</td></xml>)
                              M.aggFolder M.aggregates rows}
--- 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
--- 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
--- 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 *)