Improved the error message when the graph building fails for QuickCheck

This commit is contained in:
Neil Brown 2007-11-10 23:18:21 +00:00
parent 089091d59b
commit 185f515cf7

View File

@ -446,7 +446,7 @@ genProcess n = nextIdT >>* makeMeta' >>= \m -> (flip oneofLS) n
-- TODO put this in proper error monad
genGraph :: A.Structured -> FlowGraph Identity ()
genGraph s = either (\e -> error $ "QuickCheck graph did not build properly: " ++ e) id $ runIdentity $ buildFlowGraph funcs s
genGraph s = either (\e -> error $ "QuickCheck graph did not build properly: " ++ e ++ ", from: " ++ pshow s) id $ runIdentity $ buildFlowGraph funcs s
where
empty = const (return ())
funcs = GLF empty empty empty empty empty empty