quickcheck.lhs revision 3d3889e0cefcdce9b3f43c53aaa201943ac2e895
#!/ usr / bin / env runhaskell
$ Id $
--
system .
--
TODO :
do xs <- readFile file
let names = nub $ filter (\ x -> "prop_" `isPrefixOf` x)
(map (\ s -> case lex s of
(r, _) : _ -> r
_ -> error s) (lines xs))
if null names then
putStr (file ++ ": no properties to check\n")
else do writeFile "ghciin" $
unlines ((":l " ++ file) :
[(if namesOpt == "+names" then
"putStr \"" ++ p ++ ": \" >> "
else "") ++
"Test.QuickCheck.quickCheck " ++ p | p <- names])
system ("ghci -w " ++ options opts' ++ " <ghciin")
return ()
\ end {code}