timetable

This commit is contained in:
aarne
2004-04-28 09:08:31 +00:00
parent e5c60c9cfd
commit 1bd3dc8433
3 changed files with 77 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
--# -path=.:../prelude
concrete TimetableHTML of Timetable = open Prelude in {
lin
MkTable cs ts =
ss ("<table>" ++ "<tr><td></td>"++ cs.s ++ </tr> ++ ts.s ++ "</table>") ;
NilTrain _ = ss [] ;
ConsTrain cs n t ts =
ss ("<tr>" ++ n.s ++ t.s ++ "</tr>") ;
OneCity c = ss ("<td>" ++ c ++ "</td>") ;
ConsCity c cs = ss (c.s ++ "to" ++ cs.s) ;
StopTime t = t ;
NoStop = ss ["no stop"] ;
LocTrain c s = cc2 c s ;
CityTrain c s cs t = ss (c.s ++ s.s ++ "," ++ t.s) ;
T i = prefixSS "at" i ;
N n = prefixSS "train" n ;
C s = s ;
}