> The `case () of` can be removed, the patter guards can go directly
> to the function definition.
> 
> Rest LGTM, thanks, no need to resend.

    Interdiff [PATCH master 1/2] Add a utility function to get command of an 
incident

diff --git a/src/Ganeti/MaintD/Utils.hs b/src/Ganeti/MaintD/Utils.hs
index 950dad4..b74d2de 100644
--- a/src/Ganeti/MaintD/Utils.hs
+++ b/src/Ganeti/MaintD/Utils.hs
@@ -57,8 +57,8 @@ annotateOpCode reason ts =
 
 -- | Get the name of the repair command from a live-repair incident.
 getRepairCommand :: Incident -> Maybe String
-getRepairCommand incident = case () of
- _ | J.JSObject obj <- incidentOriginal incident,
-     Just (J.JSString cmd) <- lookup "command" $ J.fromJSObject obj ->
-         return $ J.fromJSString cmd
- _ -> Nothing
+getRepairCommand incident
+  | J.JSObject obj <- incidentOriginal incident,
+    Just (J.JSString cmd) <- lookup "command" $ J.fromJSObject obj
+      = return $ J.fromJSString cmd
+getRepairCommand _ = Nothing



-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to