Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities, mainly for internal use.
- cleanPath :: FilePath -> FilePath
- commonDirectory :: Pattern -> FilePath
- compilePatterns :: [Pattern] -> [Pattern]
- compileParentPath :: FilePath -> Maybe FilePath
- compilePathToRoot :: FilePath -> FilePath
- globDir :: FilePath -> [Pattern] -> IO [[FilePath]]
- io :: ([Definition] -> [IO Definition]) -> Dictionary -> IO Dictionary
- mapIO :: (Definition -> IO Definition) -> Dictionary -> IO Dictionary
- replaceSingleDot :: String -> String
- stripPrefix :: String -> String -> String
- takeDirName :: FilePath -> FilePath
Documentation
cleanPath :: FilePath -> FilePath Source #
"Clean up" a path.
`/directory/./nested/` -> `directory/nested` `./` -> `` `.` -> ``
commonDirectory :: Pattern -> FilePath Source #
Get the common directory from a Pattern.
compileParentPath :: FilePath -> Maybe FilePath Source #
Path to parent, when there is one.
Just "../" or Nothing
compilePathToRoot :: FilePath -> FilePath Source #
globDir :: FilePath -> [Pattern] -> IO [[FilePath]] Source #
List contents of a directory using a glob pattern. Returns a relative path, based on the given rootDirname.
io :: ([Definition] -> [IO Definition]) -> Dictionary -> IO Dictionary Source #
IO Sequence helpers
mapIO :: (Definition -> IO Definition) -> Dictionary -> IO Dictionary Source #
replaceSingleDot :: String -> String Source #
If the path is a single dot, return an empty string. Otherwise return the path.
takeDirName :: FilePath -> FilePath Source #
Take dirname.