module Main where import Prelude hiding (head, span, div, map) import CGI main :: IO () main = run (f questions) f :: [(String, Maybe String, Maybe String)] -> CGI () f [] = ask $ standardPage qtitle (p (text "Error")) f ((question, yes, no) : xs) = standardQuery qtitle $ do p (text question) submit0 (g yes) (fieldVALUE "Yes") submit0 (g no) (fieldVALUE "No") where g (Just licence) = ask $ standardPage (qtitle ++ "\x7d50\x679c") $ p $ text (licence ++ "\x304c\x304a\x3059\x3059\x3081") g Nothing = f xs qtitle = "\x30d5\x30ea\x30fc\x30bd\x30d5\x30c8\x30a6\x30a7\x30a2\x30e9\x30a4\x30bb\x30f3\x30b9\x8a3a\x65ad" questions = [ ( "\x3042\x306a\x305f\x306e\x30b3\x30fc\x30c9\x3092\x5546\x7528\x30bd\x30d5\x30c8\x30a6\x30a7\x30a2\x306b\x7d44\x307f\x8fbc\x307e\x308c\x3066\x8ca9\x58f2\x3055\x308c\x3066\x3082\x304b\x307e\x308f\x306a\x3044\x304b\xff1f" , Nothing, Just "GPL\x30e9\x30a4\x30bb\x30f3\x30b9" ) , ( "\x3042\x306a\x305f\x306f\x30b9\x30c8\x30fc\x30eb\x30de\x30f3\x306e\x30d5\x30ea\x30fc\x30bd\x30d5\x30c8\x30a6\x30a7\x30a2\x904b\x52d5\x306b\x5fc3\x304b\x3089\x8cdb\x540c\x3057\x3066\x3044\x308b\x304b\xff1f" , Just "GPL\x30e9\x30a4\x30bb\x30f3\x30b9", Nothing ) , ( "\x3042\x306a\x305f\x306f\x305d\x306e\x30bd\x30d5\x30c8\x30a6\x30a7\x30a2\x3092\x5c06\x6765\x0052\x0075\x0062\x0079\x306e\x4e00\x90e8\x3068\x3057\x3066\x914d\x5e03\x3057\x305f\x3044\x304b\xff1f" , Just "Ruby\x30e9\x30a4\x30bb\x30f3\x30b9", Just "BSD\x307e\x305f\x306fMIT\x30e9\x30a4\x30bb\x30f3\x30b9" ) ]