Haskell program to turn off computer
The code is short and nicely done, so I don't have much comment

In branch, you could use void instead of return ()

branch cmd 'y' = system cmd &gt;&gt; void
branch cmd 'n' = putStrLn "Command Cancelled" &gt;&gt; getChar &gt;&gt; void


In your 'n' match, you use "getChar". I think it's to prevent the console from closing, right? Be aware that there is other ways, but it really depend on how you want to use your program.

Haskell use camelCase, so shutdown_path and rundll32_path should be shutdownPath and rundll32Path

Check

Your actual check functions are fine. But if you have more case like this, you should really consider this:

You could make the check function a top level one like this

check :: String -&gt; Maybe a -&gt; a
check _ (Just s) = s
check errorMsg Nothing   = error errorMsg


The check call from findCmdOrFail will remain practically unchanged, you just have to add your error message

The interesting part is the one from extractCmdOrFail, you have to use an helper function that I didn't find on hackage

whenMaybe :: (a -&gt; Bool) -&gt; a -&gt; Maybe a
whenMaybe predicate x = if predicate x then Just x else Nothing


then your extractCmdOrFail will looks like this

extractCmdOrFail = getArgs &gt;&gt;= check (whenMaybe  $ {-your predicate-}) "Wrong Number of arguments"