summaryrefslogtreecommitdiff
path: root/Dot.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-05-15 02:49:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-05-15 03:38:08 -0400
commitcad0e1c8b7eb21f8dceca8dd9fa3bc1d1aa7eabd (patch)
treeb6be12dc1cc83a35ca7d89a862d85e6d71c38572 /Dot.hs
parentefa7f544050c0d5be6bc1b0fc0125278e475c213 (diff)
simplified a bunch of Maybe handling
Diffstat (limited to 'Dot.hs')
-rw-r--r--Dot.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Dot.hs b/Dot.hs
index 592b21f69..deba10201 100644
--- a/Dot.hs
+++ b/Dot.hs
@@ -20,10 +20,7 @@ graphNode nodeid desc = label desc $ quote nodeid
{- an edge between two nodes -}
graphEdge :: String -> String -> Maybe String -> String
-graphEdge fromid toid desc = indent $
- case desc of
- Nothing -> edge
- Just d -> label d edge
+graphEdge fromid toid desc = indent $ maybe edge (\d -> label d edge) desc
where
edge = quote fromid ++ " -> " ++ quote toid