Get working with newer mtl (and GHC 7)
This commit is contained in:
parent
d9162f14f8
commit
39fb1fd3cc
2 changed files with 12 additions and 7 deletions
|
@ -113,7 +113,7 @@ module System.FilePath.Find (
|
|||
|
||||
import Control.Exception
|
||||
import Control.Monad (foldM, forM, liftM, liftM2)
|
||||
import Control.Monad.State (State(..), evalState)
|
||||
import Control.Monad.State (State, evalState, get)
|
||||
import Data.Bits (Bits, (.&.))
|
||||
import Data.List (sort)
|
||||
import System.Directory (getDirectoryContents)
|
||||
|
@ -172,13 +172,10 @@ evalFI :: FindClause a
|
|||
-> a
|
||||
evalFI m p d s = evalClause m (mkFI p d s)
|
||||
|
||||
mkFindClause :: (FileInfo -> (a, FileInfo)) -> FindClause a
|
||||
mkFindClause = FC . State
|
||||
|
||||
-- | Return the current 'FileInfo'.
|
||||
fileInfo :: FindClause FileInfo
|
||||
|
||||
fileInfo = mkFindClause $ \st -> (st, st)
|
||||
fileInfo = FC $ get
|
||||
|
||||
-- | Return the name of the file being visited.
|
||||
filePath :: FindClause FilePath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue