From 92b5c479a964af8ee4ec50bba9ba8364e06156e9 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 16 Dec 2014 18:25:18 +1100 Subject: Bugfixes to monad construction checks --- src/Grasp/Monad.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Grasp') diff --git a/src/Grasp/Monad.hs b/src/Grasp/Monad.hs index 0bab4c8..e35cc34 100644 --- a/src/Grasp/Monad.hs +++ b/src/Grasp/Monad.hs @@ -133,7 +133,7 @@ getNamedNodes ns es = map fst (nameNodeList ns es) multiNodes :: [GNode] -> Bool -multiNodes ns = (ns == (List.nubBy (\x y -> GN.toNode x == GN.toNode y) ns)) +multiNodes ns = (ns /= (List.nubBy (\x y -> GN.toNode x == GN.toNode y) ns)) @@ -148,7 +148,7 @@ unconnected ns es = multiNames :: [GNode] -> [GEdge] -> Bool multiNames ns es = let named = map fst (nameNodeList ns es) - in named == (List.nub named) + in named /= (List.nub named) @@ -163,7 +163,7 @@ noMain :: [GNode] -> [GEdge] -> Bool noMain ns es = let names = map snd (nameNodeList ns es) mains = filter ((== (IN.mk "grasp:main")) . GN.toInst) names - in length mains /= 0 + in length mains == 0 -- cgit