This repository was archived by the owner on Feb 3, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
name : pugs-DrIFT
2
- version : 2.2.3.20120717
2
+ version : 2.2.3.20120717.1
3
3
synopsis : DrIFT with pugs-specific rules.
4
4
description : DrIFT is a type sensitive preprocessor for Haskell. It extracts type declarations
5
5
and directives from modules. The directives cause rules to be fired on the parsed
Original file line number Diff line number Diff line change @@ -29,8 +29,9 @@ import Data.List
29
29
import qualified Unlit
30
30
import Control.Monad
31
31
import GenUtil
32
+ import Control.Exception (catch , SomeException )
32
33
33
- try x = catch (x >>= return . Right ) (return . Left )
34
+ try x = catch (x >>= return . Right ) (\ e -> return $ Left (e :: SomeException ) )
34
35
35
36
--- Split up input ---------------------------------------------------------
36
37
splitString :: String -> String -> (String ,String )
Original file line number Diff line number Diff line change
1
+ {-# LANGUAGE ScopedTypeVariables #-}
1
2
2
3
-- $Id: GenUtil.hs,v 1.30 2004/12/01 23:58:27 john Exp $
3
4
-- arch-tag: 835e46b7-8ffd-40a0-aaf9-326b7e347760
@@ -101,6 +102,7 @@ import qualified System.Environment as System
101
102
import qualified System.Exit as System
102
103
import System.Random (StdGen , newStdGen , Random (randomR ))
103
104
import System.Time
105
+ import Control.Exception
104
106
105
107
{-# SPECIALIZE snub :: [String] -> [String] #-}
106
108
{-# SPECIALIZE snub :: [Int] -> [Int] #-}
@@ -286,10 +288,10 @@ lefts :: [Either a b] -> [a]
286
288
lefts xs = [x | Left x <- xs]
287
289
288
290
ioM :: Monad m => IO a -> IO (m a )
289
- ioM action = catch (fmap return action) (\ e -> return (fail (show e)))
291
+ ioM action = catch (fmap return action) (\ (e :: SomeException ) -> return (fail (show e)))
290
292
291
293
ioMp :: MonadPlus m => IO a -> IO (m a )
292
- ioMp action = catch (fmap return action) (\ _ -> return mzero)
294
+ ioMp action = catch (fmap return action) (\ (_ :: SomeException ) -> return mzero)
293
295
294
296
-- | reformat a string to not be wider than a given width, breaking it up
295
297
-- between words.
Original file line number Diff line number Diff line change 1
1
Name : pugs-compat
2
- Version : 0.0.6.20130209.0
2
+ Version : 0.0.6.20130209.0.1
3
3
Build-type : Simple
4
4
Category : Pugs
5
5
License : PublicDomain
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ import Foreign.C.Types
67
67
import Foreign.C.String
68
68
import Data.Typeable
69
69
import qualified System.Posix.Signals
70
+ import Control.Exception
70
71
71
72
_PUGS_HAVE_POSIX :: Bool
72
73
_PUGS_HAVE_POSIX = True
@@ -75,7 +76,8 @@ doesExist :: FilePath -> IO Bool
75
76
doesExist = fileExist
76
77
77
78
testStatusWith :: (FileStatus -> Bool ) -> FilePath -> IO Bool
78
- testStatusWith t f = fmap t (getFileStatus f) `catch` const (return False )
79
+ testStatusWith t f = fmap t (getFileStatus f) `catch`
80
+ (const (return False ) :: SomeException -> IO Bool )
79
81
80
82
doesFileExist :: FilePath -> IO Bool
81
83
doesFileExist = testStatusWith isRegularFile
You can’t perform that action at this time.
0 commit comments