Get working with newer mtl (and GHC 7)

This commit is contained in:
Bryan O'Sullivan 2011-02-08 13:44:01 -08:00
parent 3e57adf369
commit 72da48644f
2 changed files with 12 additions and 7 deletions

View File

@ -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

View File

@ -1,5 +1,5 @@
Name: filemanip
Version: 0.3.5.1
Version: 0.3.5.2
License: BSD3
License-File: LICENSE
Author: Bryan O'Sullivan <bos@serpentine.com>
@ -15,7 +15,7 @@ Build-type: Simple
Extra-Source-Files: README.markdown
Library
build-depends: base < 5, bytestring, directory, filepath, mtl == 1.1.*, unix-compat
build-depends: base < 5, bytestring, directory, filepath, mtl, unix-compat
if !os(windows)
build-depends: unix
if impl(ghc >= 6.10)
@ -28,3 +28,11 @@ Library
System.FilePath.Glob,
System.FilePath.GlobPattern,
System.FilePath.Manip
source-repository head
type: mercurial
location: http://bitbucket.org/bos/filemanip
source-repository head
type: git
location: http://github.com/bos/filemanip