]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Resource/Tree.hs
Cosmetic changes suggested by hlint
[Lucu.git] / Network / HTTP / Lucu / Resource / Tree.hs
index 660d8ff735bdc3f2fab18f7d42ab8a1f8951a091..4cb493274859cd7aa4fb56ca4664123dff0d5867 100644 (file)
@@ -15,6 +15,7 @@ module Network.HTTP.Lucu.Resource.Tree
     )
     where
 
+import           Control.Arrow
 import           Control.Concurrent
 import           Control.Concurrent.STM
 import           Control.Exception
@@ -140,13 +141,10 @@ data ResNode    = ResNode (Maybe ResourceDef) ResSubtree
 --             ]
 -- @
 mkResTree :: [ ([String], ResourceDef) ] -> ResTree
-mkResTree = processRoot . mapFirst canonicalisePath
+mkResTree = processRoot . map (first canonicalisePath)
     where
-      mapFirst :: (a -> a') -> [(a, b)] -> [(a', b)]
-      mapFirst f = map (\ (a, b) -> (f a, b))
-
       canonicalisePath :: [String] -> [String]
-      canonicalisePath = filter (\ x -> x /= "")
+      canonicalisePath = filter (/= "")
 
       processRoot :: [ ([String], ResourceDef) ] -> ResTree
       processRoot list