Mercurial > urweb
diff demo/more/orm.ur @ 991:b132f8620a66
Initial Orm1 demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 06 Oct 2009 10:34:27 -0400 |
parents | 46803e668a89 |
children | bb3fc575cfe7 |
line wrap: on
line diff
--- a/demo/more/orm.ur Tue Oct 06 10:15:26 2009 -0400 +++ b/demo/more/orm.ur Tue Oct 06 10:34:27 2009 -0400 @@ -1,11 +1,14 @@ con link = fn col_parent :: (Type * Type) => col_parent.1 -> transaction (option col_parent.2) -fun noParent [t ::: Type] _ = return None +fun noParent [t ::: Type] (_ : t) = return None con meta = fn col_parent :: (Type * Type) => { Link : link col_parent, Inj : sql_injectable col_parent.1 } +fun local [t :: Type] (inj : sql_injectable t) = {Link = noParent, + Inj = inj} + functor Table(M : sig con cols :: {(Type * Type)} val cols : $(map meta cols)