Skip to content

Instantly share code, notes, and snippets.

@rblaze
Created September 30, 2013 13:41
Show Gist options
  • Save rblaze/6763991 to your computer and use it in GitHub Desktop.
Save rblaze/6763991 to your computer and use it in GitHub Desktop.
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Exception
import System.Exit
main :: IO ()
main = do
r <- catch (do
let [r, _] = ['a']
return r)
(\(e :: PatternMatchFail) -> do
print "failed"
exitFailure
)
print r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment