Permalink
Browse files

bug fix in Graphviz.hs

  • Loading branch information...
1 parent 473b046 commit f518062e8ffe485be06c15ce2de07ffa35077b98 @rhz committed May 24, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 Graphviz.hs
  2. +1 −1 Types.hs
View
@@ -32,8 +32,8 @@ toDot env mix =
linkDot ((aId1, sId1), (aId2, sId2)) =
" " ++ (nodes Vec.! aId1) ++
" -- " ++ (nodes Vec.! aId2) ++
- " [ headlabel = \"" ++ siteName aId1 sId1 ++ "\"" ++
- " , taillabel = \"" ++ siteName aId2 sId2 ++ "\" ];\n"
+ " [ taillabel = \"" ++ siteName aId1 sId1 ++ "\"" ++
+ " , headlabel = \"" ++ siteName aId2 sId2 ++ "\" ];\n"
agentName agent = E.agentOfId env (M.agentName agent) ? "Matching.detailedDot: missing agent name id"
siteName aId sId = E.siteOfId env (M.agentName (M.agents mix Vec.! aId), sId) ? "Matching.detailedDot: missing site id"
View
@@ -40,7 +40,7 @@ check m@(Module{ contactMap = cm }) = mapM_ printErrors (ruleErrors ++ initError
checkExpr :: CM -> KExpr -> [Error]
-checkExpr cm kexpr = concatMap stateErrors kexpr ++ Map.foldr linkErrors [] lm
+checkExpr cm kexpr = concatMap stateErrors kexpr ++ Map.fold linkErrors [] lm -- TODO should be Map.foldr, but I'm leaving it as is for compatibility
where stateErrors :: Agent -> [Error]
stateErrors a@(Agent name intf) = mapMaybe stateError intf
where stateError :: Site -> Maybe Error

0 comments on commit f518062

Please sign in to comment.