mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-11 08:37:35 +03:00
support older directory
without CPP
This commit is contained in:
parent
3168bef3fa
commit
dfea6365f9
@ -50,7 +50,7 @@ library
|
||||
async >= 2.0,
|
||||
containers >= 0.5,
|
||||
deepseq >= 1.3,
|
||||
directory >= 1.2.2,
|
||||
directory >= 1.2,
|
||||
filepath >= 1.3,
|
||||
gitrev >= 1.0,
|
||||
generic-trie >= 0.3.0.1,
|
||||
|
@ -37,7 +37,16 @@ import System.FilePath (takeDirectory,(</>),isAbsolute)
|
||||
import GHC.Generics (Generic)
|
||||
import Control.DeepSeq
|
||||
|
||||
import System.Directory (makeAbsolute)
|
||||
import System.Directory (getCurrentDirectory)
|
||||
import System.FilePath (isRelative, normalise)
|
||||
|
||||
-- from the source of directory-1.2.2.1; included to maintain
|
||||
-- backwards compatibility
|
||||
makeAbsolute :: FilePath -> IO FilePath
|
||||
makeAbsolute = fmap normalise . absolutize
|
||||
where absolutize path
|
||||
| isRelative path = fmap (</> path) getCurrentDirectory
|
||||
| otherwise = return path
|
||||
|
||||
removeIncludesModule :: FilePath -> Module PName -> IO (Either [IncludeError] (Module PName))
|
||||
removeIncludesModule modPath m = runNoIncM modPath (noIncludeModule m)
|
||||
|
Loading…
Reference in New Issue
Block a user