/
UseAT.hs
31 lines (24 loc) · 971 Bytes
/
UseAT.hs
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
import WASH.CGI.CGI
import Control.Monad
main =
run page1
page1 =
do at <- table_io $ return [["Ratio"], ["Complex"], ["Numeric"], ["Ix"], ["Array"], ["List"], ["Maybe"], ["Char"], ["Monad"], ["IO"], ["Directory"], ["System"], ["Time"], ["Locale"], ["CPUTime"], ["Random"]]
standardQuery "Haskell Library Modules" $
do sg <- selectionGroup
let makeRow row = tr (mapM (makeCol row) [0..(as_cols at -1)])
makeCol row col = td (getText at row col)
makeRow' row = selectionDisplay sg at row dispRow
dispRow button texts = tr (do td button
sequence (Prelude.map td texts))
p $ table (mapM makeRow' [0..(as_rows at -1)])
submit sg page2 empty
page2 sg =
let lib = unAR (value sg) in
standardQuery "Selected Haskell Library Module" $
do text "You selected "
text (show lib)
page2a lib =
standardQuery "Directly Selected Haskell Library Module" $
do text "You selected "
text (show lib)