-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathproduct.urs
More file actions
33 lines (24 loc) · 973 Bytes
/
Copy pathproduct.urs
File metadata and controls
33 lines (24 loc) · 973 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
con colMeta = fn t :: Type =>
{Nam : string,
Show : t -> xbody}
con colsMeta = fn cols :: {Type} => $(map colMeta cols)
val prodName : string -> colMeta string
val prodDesc : string -> colMeta string
val prodPrice : string -> colMeta float
val prodStock : string -> colMeta int
val prodAttr : string -> colMeta string
functor Make(M : sig
con cols :: {Type}
constraint [Id] ~ cols
val fl : folder cols
table tab : ([Id = int] ++ cols)
val cols : colsMeta cols
cookie cartCookie : list int
val formatting : {Head : string -> page, BodyStart : string -> xbody, BodyEnd : unit -> xbody}
val display_container : css_class
end) : sig
val displayProd : int -> bool -> transaction xbody
val displayProds : unit -> transaction page
val cart : unit -> transaction page
val cartAdd : int -> transaction page
end