annotate gui.ur @ 24:d314d2ec3300
Be able to obtain the name from a navItem
author |
Ron de Bruijn <rmbruijn@gmail.com> |
date |
Sun, 04 Dec 2011 16:45:31 +0100 |
parents |
554e342665fe |
children |
5905b56e0cd9 |
rev |
line source |
adam@20
|
1 class gui = fn (t :: Type) (ctx :: {Unit}) => [body ~ ctx] => t -> xml (body ++ ctx) [] []
|
kkallio@8
|
2
|
adam@20
|
3 fun gui_xbody [body ~ []] x = x
|
adam@20
|
4 fun gui_xtable [body ~ _] x = x
|
kkallio@8
|
5
|
adam@20
|
6 fun mkGui [t ::: Type] [ctx ::: {Unit}] (toXml : [body ~ ctx] => t -> xml (body ++ ctx) [] []) = @toXml
|
kkallio@8
|
7
|
adam@20
|
8 fun toXml [t ::: Type] [ctx ::: {Unit}] [body ~ ctx] (toXml : gui t ctx) = toXml
|