%-----------------------------------------------------------------------------% % html.li.m % Ralph Becket % Tue Oct 15 15:12:14 EST 2002 % vim: ft=mercury ff=unix ts=4 sw=4 et wm=0 tw=0 % %-----------------------------------------------------------------------------% :- module html__li. :- interface. :- type list_items. % Type of list items. :- instance html(list_items). % Attributes: % - type - the bullet point symbol % :- func li(M) = list_items <= html(M). :- func attr >> list_items = list_items. :- func list_items ++ list_items = list_items. :- func nil = list_items. %-----------------------------------------------------------------------------% %-----------------------------------------------------------------------------% :- implementation. :- type list_items ---> list_items(html). :- instance html(list_items) where [ html(list_items(M)) = M ]. %-----------------------------------------------------------------------------% li(M) = list_items(opentag("li", html(M))). A >> list_items(M) = list_items(A >> M). list_items(M1) ++ list_items(M2) = list_items(M1 ++ M2). nil = list_items(text("")). %-----------------------------------------------------------------------------% %-----------------------------------------------------------------------------%