diff options
author | Joey Hess <joey@kitenet.net> | 2011-05-15 02:49:43 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-05-15 03:38:08 -0400 |
commit | cad0e1c8b7eb21f8dceca8dd9fa3bc1d1aa7eabd (patch) | |
tree | b6be12dc1cc83a35ca7d89a862d85e6d71c38572 /Dot.hs | |
parent | efa7f544050c0d5be6bc1b0fc0125278e475c213 (diff) |
simplified a bunch of Maybe handling
Diffstat (limited to 'Dot.hs')
-rw-r--r-- | Dot.hs | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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 |