Merge pull request #1571 from jlamothe/FormResult
Make FormResult instances of Eq and Monad
This commit is contained in:
commit
09c4587393
@ -1,5 +1,9 @@
|
|||||||
# ChangeLog for yesod-form
|
# ChangeLog for yesod-form
|
||||||
|
|
||||||
|
## 1.6.4
|
||||||
|
|
||||||
|
* Make FormResult an instance of Eq
|
||||||
|
|
||||||
## 1.6.3
|
## 1.6.3
|
||||||
|
|
||||||
* make sure a select field does not lose the selected value even if a validation on the
|
* make sure a select field does not lose the selected value even if a validation on the
|
||||||
|
|||||||
@ -50,7 +50,7 @@ import Data.Foldable
|
|||||||
data FormResult a = FormMissing
|
data FormResult a = FormMissing
|
||||||
| FormFailure [Text]
|
| FormFailure [Text]
|
||||||
| FormSuccess a
|
| FormSuccess a
|
||||||
deriving Show
|
deriving (Show, Eq)
|
||||||
instance Functor FormResult where
|
instance Functor FormResult where
|
||||||
fmap _ FormMissing = FormMissing
|
fmap _ FormMissing = FormMissing
|
||||||
fmap _ (FormFailure errs) = FormFailure errs
|
fmap _ (FormFailure errs) = FormFailure errs
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-form
|
name: yesod-form
|
||||||
version: 1.6.3
|
version: 1.6.4
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user