]> 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 de19e0470deb3f4951080895998939df1e5294c1..06fed17dd13c7d52af6d49e7f65ca3adcc164fb8 100644 (file)
@@ -199,10 +199,10 @@ runResource def itr
                              driftTo Done
                         ) itr
                )
-             $ \ exc -> processException exc
+               processException
     where
       fork :: IO () -> IO ThreadId
-      fork = if (resUsesNativeThread def)
+      fork = if resUsesNativeThread def
              then forkOS
              else forkIO
       
@@ -223,12 +223,12 @@ runResource def itr
                       setHeader (C8.pack "Allow") (C8.pack $ joinWith ", " allowedMethods)
 
       allowedMethods :: [String]
-      allowedMethods = nub $ foldr (++) [] [ methods resGet    ["GET"]
-                                           , methods resHead   ["GET", "HEAD"]
-                                           , methods resPost   ["POST"]
-                                           , methods resPut    ["PUT"]
-                                           , methods resDelete ["DELETE"]
-                                           ]
+      allowedMethods = nub $ concat [ methods resGet    ["GET"]
+                                    , methods resHead   ["GET", "HEAD"]
+                                    , methods resPost   ["POST"]
+                                    , methods resPut    ["PUT"]
+                                    , methods resDelete ["DELETE"]
+                                    ]
 
       methods :: (ResourceDef -> Maybe a) -> [String] -> [String]
       methods f xs = case f def of
@@ -253,7 +253,7 @@ runResource def itr
                if state <= DecidingHeader then
                    flip runRes itr
                       $ do setStatus $ aboStatus abo
-                           mapM_ (\ (name, value) -> setHeader name value) $ fromHeaders $ aboHeaders abo
+                           mapM_ (uncurry setHeader) $ fromHeaders $ aboHeaders abo
                            output $ abortPage conf reqM res abo
                  else
                    when (cnfDumpTooLateAbortionToStderr $ itrConfig itr)