hunk ./HSP/Formlets.hs 12
+import Data.Monoid
hunk ./HSP/Formlets.hs 22
-instance Plus [a] where
- zero = []
- plus = (++)
-
hunk ./HSP/Formlets.hs 27
-dv = Just ""
+dv = ""
hunk ./HSP/Formlets.hs 31
-input True = input' (\n v -> []) dv
-input False = input' (\n v -> []) dv
+input True = defaultResultInput (\n v -> []) dv
+input False = defaultResultInput (\n v -> []) dv
hunk ./HSP/Formlets.hs 36
-textarea True = input' (\n v -> []) Nothing
-textarea False = input' (\n v -> []) dv
+textarea True = input' (\n v -> [])
+textarea False = defaultResultInput (\n v -> []) dv
hunk ./HSP/Formlets.hs 41
-password True = input' (\n v -> []) dv
-password False = input' (\n v -> []) dv
+password True = defaultResultInput (\n v -> []) dv
+password False = defaultResultInput (\n v -> []) dv
hunk ./HSP/Formlets.hs 46
-hidden s = input' (\n v -> []) dv (Just s)
+hidden s = defaultResultInput (\n v -> []) dv (Just s)
hunk ./HSP/Formlets.hs 54
-submit True value = input' (\n v -> []) dv (Just value)
-submit False value = input' (\n v -> []) dv (Just value)
+submit True value = defaultResultInput (\n v -> []) dv (Just value)
+submit False value = defaultResultInput (\n v -> []) dv (Just value)
hunk ./HSP/Formlets.hs 64
-radio e choices = input' mkRadios (Just "0") -- todo: validate that the result was in the choices
+radio e choices = defaultResultInput mkRadios "0" -- todo: validate that the result was in the choices
hunk ./HSP/Formlets.hs 101
-selectRaw e choices = input' (mkChoices e) dv -- todo: validate that the result was in the choices
+selectRaw e choices = defaultResultInput (mkChoices e) dv -- todo: validate that the result was in the choices
hunk ./HSP/Formlets.hs 128
--- provide a default result here as the second argument to input'
--- which we can turn to a False value.
+-- provide a default result here as the second argument to
+-- defaultResultInput which we can turn to a False value.
hunk ./HSP/Formlets.hs 132
- input' xml (Just "") (Just "t") `check` (\ s' -> Success $ s' == "t")
+ defaultResultInput xml "" (Just "t") `check` (\ s' -> Success $ s' == "t")
hunk ./HSP/Formlets.hs 144
-div :: (EmbedAsChild m xml, EmbedAsAttr m (Attr [Char] a), Plus xml) => a -> Form xml m1 b -> Form [XMLGenT m (HSX.XML m)] m1 b
+div :: (Monad m1, EmbedAsChild m xml, EmbedAsAttr m (Attr [Char] a), Monoid xml) => a -> Form xml m1 b -> Form [XMLGenT m (HSX.XML m)] m1 b
hunk ./HSP/Formlets.hs 148
-span :: (EmbedAsChild m xml, EmbedAsAttr m (Attr [Char] a), Plus xml) => a -> Form xml m1 b -> Form [XMLGenT m (HSX.XML m)] m1 b
+span :: (Monad m1, EmbedAsChild m xml, EmbedAsAttr m (Attr [Char] a), Monoid xml) => a -> Form xml m1 b -> Form [XMLGenT m (HSX.XML m)] m1 b