Fix build with GHC 7.10
This commit is contained in:
parent
3404f214ac
commit
686e4fd75e
1 changed files with 9 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
{-# LANGUAGE GeneralizedNewtypeDeriving, ScopedTypeVariables #-}
|
{-# LANGUAGE CPP, GeneralizedNewtypeDeriving, ScopedTypeVariables #-}
|
||||||
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
{-# OPTIONS_GHC -fno-warn-orphans #-}
|
||||||
|
|
||||||
-- |
|
-- |
|
||||||
|
@ -115,6 +115,9 @@ module System.FilePath.Find (
|
||||||
, (||?)
|
, (||?)
|
||||||
) where
|
) where
|
||||||
|
|
||||||
|
#if !MIN_VERSION_base(4,8,0)
|
||||||
|
import Control.Applicative (Applicative)
|
||||||
|
#endif
|
||||||
import qualified Control.Exception as E
|
import qualified Control.Exception as E
|
||||||
import Control.Exception (IOException, handle)
|
import Control.Exception (IOException, handle)
|
||||||
import Control.Monad (foldM, forM, liftM, liftM2)
|
import Control.Monad (foldM, forM, liftM, liftM2)
|
||||||
|
@ -151,7 +154,7 @@ mkFI = FileInfo
|
||||||
-- construction of combinators. Wraps the 'State' monad, but doesn't
|
-- construction of combinators. Wraps the 'State' monad, but doesn't
|
||||||
-- allow 'get' or 'put'.
|
-- allow 'get' or 'put'.
|
||||||
newtype FindClause a = FC { runFC :: State FileInfo a }
|
newtype FindClause a = FC { runFC :: State FileInfo a }
|
||||||
deriving (Functor, Monad)
|
deriving (Functor, Applicative, Monad)
|
||||||
|
|
||||||
-- | Run the given 'FindClause' on the given 'FileInfo' and return its
|
-- | Run the given 'FindClause' on the given 'FileInfo' and return its
|
||||||
-- result. This can be useful if you are writing a function to pass
|
-- result. This can be useful if you are writing a function to pass
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue