Skip to content

Instantly share code, notes, and snippets.

@jonathanjouty
Created July 23, 2016 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanjouty/a8b9f5cf19cea9ee4236aca7b390d791 to your computer and use it in GitHub Desktop.
Save jonathanjouty/a8b9f5cf19cea9ee4236aca7b390d791 to your computer and use it in GitHub Desktop.
Checking `Exception` type with `shakeArgs`
import Control.Exception
import Data.Typeable
import Development.Shake
import System.IO
main :: IO ()
main = do
print "Starting..."
shakeArgs shakeOptions myRules `catch` things
where
things (SomeException e) = hPutStrLn stderr $ show $ typeOf e
myRules :: Rules ()
myRules = do
want ["boogey-man"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment