Haddock fixes
This commit is contained in:
parent
a598846bd3
commit
a35161cf6e
@ -202,7 +202,7 @@ $newline never
|
||||
FormFailure [renderMessage m langs MsgCsrfWarning]
|
||||
_ -> res
|
||||
where (Just [t1]) === (Just t2) = TE.encodeUtf8 t1 `constTimeEq` TE.encodeUtf8 t2
|
||||
Nothing === Nothing = True -- ^ It's important to use constTimeEq
|
||||
Nothing === Nothing = True -- It's important to use constTimeEq
|
||||
_ === _ = False -- in order to avoid timing attacks.
|
||||
return ((res', xml), enctype)
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@ module Yesod.Form.Types
|
||||
, Field (..)
|
||||
, FieldSettings (..)
|
||||
, FieldView (..)
|
||||
, FieldViewFunc
|
||||
) where
|
||||
|
||||
import Control.Monad.Trans.RWS (RWST)
|
||||
@ -123,14 +124,17 @@ data FieldView sub master = FieldView
|
||||
, fvRequired :: Bool
|
||||
}
|
||||
|
||||
type FieldViewFunc sub master a
|
||||
= Text -- ^ ID
|
||||
-> Text -- ^ Name
|
||||
-> [(Text, Text)] -- ^ Attributes
|
||||
-> Either Text a -- ^ Either (invalid text) or (legitimate result)
|
||||
-> Bool -- ^ Required?
|
||||
-> GWidget sub master ()
|
||||
|
||||
data Field sub master a = Field
|
||||
{ fieldParse :: [Text] -> GHandler sub master (Either (SomeMessage master) (Maybe a))
|
||||
, fieldView :: Text -- ^ ID
|
||||
-> Text -- ^ Name
|
||||
-> [(Text, Text)] -- ^ Attributes
|
||||
-> Either Text a -- ^ Either (invalid text) or (legitimate result)
|
||||
-> Bool -- ^ Required?
|
||||
-> GWidget sub master ()
|
||||
, fieldView :: FieldViewFunc sub master a
|
||||
}
|
||||
|
||||
data FormMessage = MsgInvalidInteger Text
|
||||
|
||||
Loading…
Reference in New Issue
Block a user