{-#LANGUAGE ScopedTypeVariables, QuasiQuotes, OverloadedStrings #-} module Web.Horse.Forms.Basic where import Control.Arrow import Data.Monoid textField :: String -> Maybe String -> String -> String -> String textField label err val name = mconcat $ [ maybe "" (\x -> mconcat ["", x, "
"]) err, "" ] link :: String -> String -> String link linkName name = mconcat ["", linkName, "
"] select :: String -> [String] -> Int -> String -> String select label options val name = mconcat [ "" ] where opts = mconcat $ map renderOpt (zip [0..] options) renderOpt (n, opt) = mconcat $ [ "" ] wrapForm :: String -> String wrapForm f = mconcat ["
", f, "
"]