happs-tutorial-0.8: src/gentable.hs
import Text.StringTemplate.Helpers
import Happstack.Helpers
import HSH
n = 10
imgfiles = [[ (show x ) ++ (show y) ++ ".gif" | y <- [1..n] ] | x <- [1..n] ]
imgtags = ( map . map ) (\f -> render1 [("f",f)] "<img src=$f$>") imgfiles
t2 = paintTable Nothing imgtags Nothing
where t2show x y = render1 [("x",show x),("y",show y)] "<img src=$x$$y$.gif>"
iof dest = bracketCD "../static/Html2" $ runIO $ "cp icon.gif " ++ dest
mkfiles = mapM_ iof $ ( concat imgfiles)