simple-form 0.4.1 → 0.4.2
raw patch · 3 files changed
+9/−3 lines, 3 files
Files
- SimpleForm/Digestive/Internal.hs +6/−1
- SimpleForm/Digestive/Validation.hs +2/−1
- simple-form.cabal +1/−1
SimpleForm/Digestive/Internal.hs view
@@ -6,7 +6,8 @@ input', getField, subView',- fieldInputChoiceGroup'+ fieldInputChoiceGroup',+ underRef ) where import Data.Monoid@@ -168,3 +169,7 @@ notFound :: FormTree Identity v Identity a notFound = error $ "Text.Digestive.View.subView: " ++ "No such subView: " ++ show path++underRef :: (Form v m a -> Form v m b) -> Form v m a -> Form v m b+underRef f (Ref r x) = Ref r (f x)+underRef f form = f form
SimpleForm/Digestive/Validation.hs view
@@ -1,4 +1,4 @@-module SimpleForm.Digestive.Validation where+module SimpleForm.Digestive.Validation (validationToForm, underRef) where import Data.Monoid import Control.Arrow (second)@@ -7,6 +7,7 @@ import Text.Digestive.Types (Result(..)) import Data.Text (Text) import SimpleForm.Validation (Validation(..))+import SimpleForm.Digestive.Internal (underRef) validationToForm :: (Eq a, Monad m) => Text -> Validation a -> Form Html m a validationToForm n (Check chk) = n .: validate (maybeErr . chk . (:[])) (text Nothing)
simple-form.cabal view
@@ -1,5 +1,5 @@ name: simple-form-version: 0.4.1+version: 0.4.2 cabal-version: >= 1.8 license: OtherLicense license-file: COPYING