aboutsummaryrefslogtreecommitdiff
path: root/Utility/Dot.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-07-15 12:47:14 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-07-15 12:47:14 -0400
commit6c396a256c93464d726c66a95132536941871ee8 (patch)
tree7f934c9eae22a9cfd3fb1672ebd7bf6870439c81 /Utility/Dot.hs
parent185f0b687081f47d059cc0503f4f6b671868f753 (diff)
finished hlint pass
Diffstat (limited to 'Utility/Dot.hs')
-rw-r--r--Utility/Dot.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Utility/Dot.hs b/Utility/Dot.hs
index 869684996..83f52a3cc 100644
--- a/Utility/Dot.hs
+++ b/Utility/Dot.hs
@@ -20,13 +20,13 @@ graphNode nodeid desc = label desc $ quote nodeid
{- an edge between two nodes -}
graphEdge :: String -> String -> Maybe String -> String
-graphEdge fromid toid desc = indent $ maybe edge (\d -> label d edge) desc
+graphEdge fromid toid desc = indent $ maybe edge (`label` edge) desc
where
edge = quote fromid ++ " -> " ++ quote toid
{- adds a label to a node or edge -}
label :: String -> String -> String
-label l s = attr "label" l s
+label = attr "label"
{- adds an attribute to a node or edge
- (can be called multiple times for multiple attributes) -}
@@ -35,7 +35,7 @@ attr a v s = s ++ " [ " ++ a ++ "=" ++ quote v ++ " ]"
{- fills a node with a color -}
fillColor :: String -> String -> String
-fillColor color s = attr "fillcolor" color $ attr "style" "filled" $ s
+fillColor color s = attr "fillcolor" color $ attr "style" "filled" s
{- apply to graphNode to put the node in a labeled box -}
subGraph :: String -> String -> String -> String -> String
@@ -52,10 +52,10 @@ subGraph subid l color s =
setlabel = "label=" ++ quote l
setfilled = "style=" ++ quote "filled"
setcolor = "fillcolor=" ++ quote color
- ii x = (indent $ indent x) ++ "\n"
+ ii x = indent (indent x) ++ "\n"
indent ::String -> String
-indent s = "\t" ++ s
+indent s = '\t' : s
quote :: String -> String
quote s = "\"" ++ s' ++ "\""