trasa-form 0.3.1.0 → 0.3.2.0
raw patch · 2 files changed
+8/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Trasa.Form: instance Ditto.Backend.FormInput Trasa.Url.QueryParam
Files
- src/Trasa/Form.hs +7/−0
- trasa-form.cabal +1/−1
src/Trasa/Form.hs view
@@ -40,6 +40,13 @@ encQP (QueryParamSingle x) = x encQP (QueryParamList xs) = tshow xs +instance FormInput QueryParam where+ type FileType QueryParam = ()+ getInputStrings (QueryParamSingle x) = [T.unpack x]+ getInputStrings (QueryParamList xs) = fmap T.unpack xs+ getInputStrings (QueryParamFlag) = []+ getInputFile _ = Left $ commonFormError $ (NoFileFound (QueryParamSingle "No support for file uploads") :: CommonFormError QueryParam)+ liftParser :: (Text -> Either Text a) -> (QueryParam -> Either Text a) liftParser f q = case q of QueryParamSingle x -> f x
trasa-form.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.0 name: trasa-form-version: 0.3.1.0+version: 0.3.2.0 synopsis: generate forms using lucid, ditto and trasa description: Formlets library for trasa using ditto as its backend. Although trasa already has machinery for creating