Agda-2.5.2: A dependently typed functional programming language and proof assistant

Safe Haskell | None
Language | Haskell2010

Agda.Utils.FileName

Description

Operations on file names.

Synopsis

- newtype AbsolutePath = AbsolutePath Text
- filePath :: AbsolutePath -> FilePath
- mkAbsolute :: FilePath -> AbsolutePath
- absolute :: FilePath -> IO AbsolutePath
- (===) :: AbsolutePath -> AbsolutePath -> Bool
- doesFileExistCaseSensitive :: FilePath -> IO Bool
- rootPath :: FilePath

# Documentation

newtype AbsolutePath #

Paths which are known to be absolute.

Note that the `Eq` and `Ord` instances do not check if different paths point to the same files or directories.

Constructors

AbsolutePath Text |

Instances

Eq AbsolutePath # |
Methods (==) :: AbsolutePath -> AbsolutePath -> Bool # (/=) :: AbsolutePath -> AbsolutePath -> Bool #
Ord AbsolutePath # |
Methods compare :: AbsolutePath -> AbsolutePath -> Ordering # (<) :: AbsolutePath -> AbsolutePath -> Bool # (<=) :: AbsolutePath -> AbsolutePath -> Bool # (>) :: AbsolutePath -> AbsolutePath -> Bool # (>=) :: AbsolutePath -> AbsolutePath -> Bool # max :: AbsolutePath -> AbsolutePath -> AbsolutePath # min :: AbsolutePath -> AbsolutePath -> AbsolutePath #
Show AbsolutePath # |
Methods showsPrec :: Int -> AbsolutePath -> ShowS # show :: AbsolutePath -> String # showList :: [AbsolutePath] -> ShowS #
Hashable AbsolutePath # |
Methods hashWithSalt :: Int -> AbsolutePath -> Int # hash :: AbsolutePath -> Int #
Pretty AbsolutePath # |
Methods pretty :: AbsolutePath -> Doc # prettyPrec :: Int -> AbsolutePath -> Doc #
KillRange Range # |
Methods killRange :: KillRangeT Range #
SetRange Range # |
Methods setRange :: Range -> Range -> Range #
HasRange Range # |
Methods getRange :: Range -> Range #
HasRange Interval # |
Methods getRange :: Interval -> Range #
FreshName Range # |
Methods freshName_ :: (MonadState TCState m, HasFresh NameId) => Range -> m Name #
PrettyTCM Range # |
Methods prettyTCM :: Range -> TCM Doc #
FreshName (Range, String) # |
Methods freshName_ :: (MonadState TCState m, HasFresh NameId) => (Range, String) -> m Name #

filePath :: AbsolutePath -> FilePath #

Extract the `AbsolutePath` to be used as `FilePath`.

mkAbsolute :: FilePath -> AbsolutePath #

Constructs `AbsolutePath`s.

Precondition: The path must be absolute and valid.

absolute :: FilePath -> IO AbsolutePath #

Makes the path absolute.

This function may raise an `__IMPOSSIBLE__` error if `canonicalizePath` does not return an absolute path.

(===) :: AbsolutePath -> AbsolutePath -> Bool infix 4 #

Tries to establish if the two file paths point to the same file (or directory).

doesFileExistCaseSensitive :: FilePath -> IO Bool #

Case-sensitive `doesFileExist` for Windows.

This is case-sensitive only on the file name part, not on the directory part. (Ideally, path components coming from module name components should be checked case-sensitively and the other path components should be checked case insensitively.)

rootPath :: FilePath #