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.Exception
|
||||||
import Control.Monad (foldM, forM, liftM, liftM2)
|
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.Bits (Bits, (.&.))
|
||||||
import Data.List (sort)
|
import Data.List (sort)
|
||||||
import System.Directory (getDirectoryContents)
|
import System.Directory (getDirectoryContents)
|
||||||
|
@ -172,13 +172,10 @@ evalFI :: FindClause a
|
||||||
-> a
|
-> a
|
||||||
evalFI m p d s = evalClause m (mkFI p d s)
|
evalFI m p d s = evalClause m (mkFI p d s)
|
||||||
|
|
||||||
mkFindClause :: (FileInfo -> (a, FileInfo)) -> FindClause a
|
|
||||||
mkFindClause = FC . State
|
|
||||||
|
|
||||||
-- | Return the current 'FileInfo'.
|
-- | Return the current 'FileInfo'.
|
||||||
fileInfo :: FindClause FileInfo
|
fileInfo :: FindClause FileInfo
|
||||||
|
|
||||||
fileInfo = mkFindClause $ \st -> (st, st)
|
fileInfo = FC $ get
|
||||||
|
|
||||||
-- | Return the name of the file being visited.
|
-- | Return the name of the file being visited.
|
||||||
filePath :: FindClause FilePath
|
filePath :: FindClause FilePath
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Name: filemanip
|
Name: filemanip
|
||||||
Version: 0.3.5.1
|
Version: 0.3.5.2
|
||||||
License: BSD3
|
License: BSD3
|
||||||
License-File: LICENSE
|
License-File: LICENSE
|
||||||
Author: Bryan O'Sullivan <bos@serpentine.com>
|
Author: Bryan O'Sullivan <bos@serpentine.com>
|
||||||
|
@ -15,7 +15,7 @@ Build-type: Simple
|
||||||
Extra-Source-Files: README.markdown
|
Extra-Source-Files: README.markdown
|
||||||
|
|
||||||
Library
|
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)
|
if !os(windows)
|
||||||
build-depends: unix
|
build-depends: unix
|
||||||
if impl(ghc >= 6.10)
|
if impl(ghc >= 6.10)
|
||||||
|
@ -28,3 +28,11 @@ Library
|
||||||
System.FilePath.Glob,
|
System.FilePath.Glob,
|
||||||
System.FilePath.GlobPattern,
|
System.FilePath.GlobPattern,
|
||||||
System.FilePath.Manip
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue