Hoogle Search

Within LTS Haskell 24.25 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. replaceProperPrefix :: MonadThrow m => Path b Dir -> Path b' Dir -> Path b t -> m (Path b' t)

    path OsPath.Posix

    Change from one directory prefix to another. Throw NotAProperPrefix if the first argument is not a proper prefix of the path.

    >>> replaceProperPrefix $(mkRelDir "foo") $(mkRelDir "bar") $(mkRelFile "foo/file.txt") == $(mkRelFile "bar/file.txt")
    

  2. stripProperPrefix :: MonadThrow m => Path b Dir -> Path b t -> m (Path Rel t)

    path OsPath.Posix

    If the directory in the first argument is a proper prefix of the path in the second argument strip it from the second argument, generating a path relative to the directory. Throws NotAProperPrefix if the directory is not a proper prefix of the path. The following properties hold:

    stripProperPrefix x (x </> y) = y
    
    Cases which are proven not possible:
    stripProperPrefix (a :: Path Abs …) (b :: Path Rel …)
    
    stripProperPrefix (a :: Path Rel …) (b :: Path Abs …)
    
    In other words the bases must match.

  3. NotAProperPrefix :: WindowsPath -> WindowsPath -> PathException

    path OsPath.Windows

    No documentation available.

  4. isProperPrefixOf :: Path b Dir -> Path b t -> Bool

    path OsPath.Windows

    Determines if the path in the first parameter is a proper prefix of the path in the second parameter. The following properties hold:

    not (x `isProperPrefixOf` x)
    
    x `isProperPrefixOf` (x </> y)
    

  5. replaceProperPrefix :: MonadThrow m => Path b Dir -> Path b' Dir -> Path b t -> m (Path b' t)

    path OsPath.Windows

    Change from one directory prefix to another. Throw NotAProperPrefix if the first argument is not a proper prefix of the path.

    >>> replaceProperPrefix $(mkRelDir "foo") $(mkRelDir "bar") $(mkRelFile "foo/file.txt") == $(mkRelFile "bar/file.txt")
    

  6. stripProperPrefix :: MonadThrow m => Path b Dir -> Path b t -> m (Path Rel t)

    path OsPath.Windows

    If the directory in the first argument is a proper prefix of the path in the second argument strip it from the second argument, generating a path relative to the directory. Throws NotAProperPrefix if the directory is not a proper prefix of the path. The following properties hold:

    stripProperPrefix x (x </> y) = y
    
    Cases which are proven not possible:
    stripProperPrefix (a :: Path Abs …) (b :: Path Rel …)
    
    stripProperPrefix (a :: Path Rel …) (b :: Path Abs …)
    
    In other words the bases must match.

  7. module Path.Internal.Posix

    Internal types and functions.

  8. module Path.Posix

    This library provides a well-typed representation of paths in a filesystem directory tree. Note: This module is for working with Posix style paths. Importing Path is usually better. A path is represented by a number of path components separated by a path separator which is a / on POSIX systems and can be a / or \ on Windows. The root of the tree is represented by a / on POSIX and a drive letter followed by a / or \ on Windows (e.g. C:\). Paths can be absolute or relative. An absolute path always starts from the root of the tree (e.g. /x/y) whereas a relative path never starts with the root (e.g. x/y). Just like we represent the notion of an absolute root by "/", the same way we represent the notion of a relative root by ".". The relative root denotes the directory which contains the first component of a relative path.

  9. NotAProperPrefix :: FilePath -> FilePath -> PathException

    path Path.Posix

    No documentation available.

  10. isProperPrefixOf :: Path b Dir -> Path b t -> Bool

    path Path.Posix

    Determines if the path in the first parameter is a proper prefix of the path in the second parameter. The following properties hold:

    not (x `isProperPrefixOf` x)
    
    x `isProperPrefixOf` (x </> y)
    

Page 96 of many | Previous | Next