Skip to content

Instantly share code, notes, and snippets.

@randrew
Created January 7, 2011 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save randrew/769218 to your computer and use it in GitHub Desktop.
Save randrew/769218 to your computer and use it in GitHub Desktop.
> hiddenFormlet :: (Read a, Show a) => Html -> Maybe a -> SnapForm Html BlazeFormHtml a
> hiddenFormlet err def = inputHidden (show <$> def) `transform` transformRead err
> listCounter :: Maybe Int -> SnapForm Html BlazeFormHtml Int
> listCounter = hiddenFormlet "Couldn't read list counter"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment