haskell - Quickcheck specification DSL -


i want create human readable dsl non-haskell programmer understand creating specifications black-box testing of external systems.

and wonder if possible in haskell.

action = readprocess "sleep 1; print success"  prop_action = monadicio $     within 100000 >>=     replieswith (== "success")  within :: int -> io -> io within t = frommaybe false $ timeout t  replieswith :: (a -> bool) -> io -> io bool replieswith v = liftm v 

here i'm giving pseudo code checking action return value "success" within 0.1 seconds. seems need kind of monad short-circuit on false values chain multiple checks pass values 1 another.

feel should exist. maybe can suggest library or how implement idea in haskell.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -