Permalink
Browse files

add bangs suggested by Andres

  • Loading branch information...
1 parent 24c8d9a commit 4b0472300adcf9886dd704bca1424f2a7062e7e2 @simonmar committed Feb 26, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 catch-mask.hs
View
@@ -1,3 +1,4 @@
+{-# LANGUAGE BangPatterns #-}
import System.IO
import System.IO.Error
import System.Environment
@@ -7,8 +8,8 @@ import Control.Exception as E
main = do
fs <- getArgs
let
- loop n [] = return n
- loop n (f:fs)
+ loop !n [] = return n
+ loop !n (f:fs)
= handle (\e -> if isDoesNotExistError e
then loop n fs
else throwIO e) $

0 comments on commit 4b04723

Please sign in to comment.