comparison lib/ur/top.urs @ 632:6c4643880df5

Demos compile again, with manual folders
author Adam Chlipala <adamc@hcoop.net>
date Tue, 24 Feb 2009 15:12:13 -0500
parents effa7d43aac3
children 24fd1edfcaa3
comparison
equal deleted inserted replaced
631:effa7d43aac3 632:6c4643880df5
44 44
45 val foldUR : tf :: Type -> tr :: ({Unit} -> Type) 45 val foldUR : tf :: Type -> tr :: ({Unit} -> Type)
46 -> (nm :: Name -> rest :: {Unit} 46 -> (nm :: Name -> rest :: {Unit}
47 -> [[nm] ~ rest] => 47 -> [[nm] ~ rest] =>
48 tf -> tr rest -> tr ([nm] ++ rest)) 48 tf -> tr rest -> tr ([nm] ++ rest))
49 -> tr [] -> r ::: {Unit} -> folder r -> $(mapUT tf r) -> tr r 49 -> tr [] -> r :: {Unit} -> folder r -> $(mapUT tf r) -> tr r
50 50
51 val foldUR2 : tf1 :: Type -> tf2 :: Type -> tr :: ({Unit} -> Type) 51 val foldUR2 : tf1 :: Type -> tf2 :: Type -> tr :: ({Unit} -> Type)
52 -> (nm :: Name -> rest :: {Unit} 52 -> (nm :: Name -> rest :: {Unit}
53 -> [[nm] ~ rest] => 53 -> [[nm] ~ rest] =>
54 tf1 -> tf2 -> tr rest -> tr ([nm] ++ rest)) 54 tf1 -> tf2 -> tr rest -> tr ([nm] ++ rest))
55 -> tr [] -> r ::: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> tr r 55 -> tr [] -> r :: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> tr r
56 56
57 val foldURX2: tf1 :: Type -> tf2 :: Type -> ctx :: {Unit} 57 val foldURX2: tf1 :: Type -> tf2 :: Type -> ctx :: {Unit}
58 -> (nm :: Name -> rest :: {Unit} 58 -> (nm :: Name -> rest :: {Unit}
59 -> [[nm] ~ rest] => 59 -> [[nm] ~ rest] =>
60 tf1 -> tf2 -> xml ctx [] []) 60 tf1 -> tf2 -> xml ctx [] [])
61 -> r ::: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> xml ctx [] [] 61 -> r :: {Unit} -> folder r -> $(mapUT tf1 r) -> $(mapUT tf2 r) -> xml ctx [] []
62 62
63 val foldR : K --> tf :: (K -> Type) -> tr :: ({K} -> Type) 63 val foldR : K --> tf :: (K -> Type) -> tr :: ({K} -> Type)
64 -> (nm :: Name -> t :: K -> rest :: {K} 64 -> (nm :: Name -> t :: K -> rest :: {K}
65 -> [[nm] ~ rest] => 65 -> [[nm] ~ rest] =>
66 tf t -> tr rest -> tr ([nm = t] ++ rest)) 66 tf t -> tr rest -> tr ([nm = t] ++ rest))
67 -> tr [] -> r ::: {K} -> folder r -> $(map tf r) -> tr r 67 -> tr [] -> r :: {K} -> folder r -> $(map tf r) -> tr r
68 68
69 val foldR2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) 69 val foldR2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type)
70 -> tr :: ({K} -> Type) 70 -> tr :: ({K} -> Type)
71 -> (nm :: Name -> t :: K -> rest :: {K} 71 -> (nm :: Name -> t :: K -> rest :: {K}
72 -> [[nm] ~ rest] => 72 -> [[nm] ~ rest] =>
73 tf1 t -> tf2 t -> tr rest -> tr ([nm = t] ++ rest)) 73 tf1 t -> tf2 t -> tr rest -> tr ([nm = t] ++ rest))
74 -> tr [] 74 -> tr []
75 -> r ::: {K} -> folder r -> $(map tf1 r) -> $(map tf2 r) -> tr r 75 -> r :: {K} -> folder r -> $(map tf1 r) -> $(map tf2 r) -> tr r
76 76
77 val foldRX : K --> tf :: (K -> Type) -> ctx :: {Unit} 77 val foldRX : K --> tf :: (K -> Type) -> ctx :: {Unit}
78 -> (nm :: Name -> t :: K -> rest :: {K} 78 -> (nm :: Name -> t :: K -> rest :: {K}
79 -> [[nm] ~ rest] => 79 -> [[nm] ~ rest] =>
80 tf t -> xml ctx [] []) 80 tf t -> xml ctx [] [])
81 -> r ::: {K} -> folder r -> $(map tf r) -> xml ctx [] [] 81 -> r :: {K} -> folder r -> $(map tf r) -> xml ctx [] []
82 82
83 val foldRX2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) -> ctx :: {Unit} 83 val foldRX2 : K --> tf1 :: (K -> Type) -> tf2 :: (K -> Type) -> ctx :: {Unit}
84 -> (nm :: Name -> t :: K -> rest :: {K} 84 -> (nm :: Name -> t :: K -> rest :: {K}
85 -> [[nm] ~ rest] => 85 -> [[nm] ~ rest] =>
86 tf1 t -> tf2 t -> xml ctx [] []) 86 tf1 t -> tf2 t -> xml ctx [] [])
87 -> r ::: {K} -> folder r 87 -> r :: {K} -> folder r
88 -> $(map tf1 r) -> $(map tf2 r) -> xml ctx [] [] 88 -> $(map tf1 r) -> $(map tf2 r) -> xml ctx [] []
89 89
90 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} 90 val queryX : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit}
91 -> sql_query tables exps
92 -> [tables ~ exps] => 91 -> [tables ~ exps] =>
93 ($(exps ++ map (fn fields :: {Type} => $fields) tables) 92 sql_query tables exps
94 -> xml ctx [] []) 93 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables)
95 -> transaction (xml ctx [] []) 94 -> xml ctx [] [])
95 -> transaction (xml ctx [] [])
96 96
97 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit} 97 val queryX' : tables ::: {{Type}} -> exps ::: {Type} -> ctx ::: {Unit}
98 -> sql_query tables exps
99 -> [tables ~ exps] => 98 -> [tables ~ exps] =>
100 ($(exps ++ map (fn fields :: {Type} => $fields) tables) 99 sql_query tables exps
101 -> transaction (xml ctx [] [])) 100 -> ($(exps ++ map (fn fields :: {Type} => $fields) tables)
102 -> transaction (xml ctx [] []) 101 -> transaction (xml ctx [] []))
102 -> transaction (xml ctx [] [])
103 103
104 val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type} 104 val oneOrNoRows : tables ::: {{Type}} -> exps ::: {Type}
105 -> [tables ~ exps] => 105 -> [tables ~ exps] =>
106 sql_query tables exps 106 sql_query tables exps
107 -> transaction 107 -> transaction