Popularity
2.9
Stable
Activity
0.0
Stable
3
2
0

Monthly Downloads: 11
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags: Web    
Latest version: v0.0.2

menshen alternatives and similar packages

Based on the "Web" category.
Alternatively, view menshen alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of menshen or a related project?

Add another 'Web' Package

README

menshen

Hackage stackage LTS package stackage Nightly package Build Status


{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.Menshen
data Body = Body
  { name :: String
  , age  :: Int
  } deriving Show

verifyBody :: Validator Body
verifyBody = vcvt $ Body{..} -> Body
  <$> name ?: mark "name" . pattern "^[a-z]{3,6}$"
  <*> age  ?: mark "age"  . minInt 1 . maxInt 150

makeBody :: String -> Int -> Either String Body
makeBody name age = Body{..} ?: verifyBody

main = do
  print $ makeBody "daniel" 15