HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulefoundation-0.0.30Haskell2010

Foundation.VFS.FilePath

# Opaque implementation for FilePath

The underlying type of a FilePath is a Foundation.ByteArray. It is indeed like this because for some systems (Unix systems) a FilePath is a null terminated array of bytes.

# FilePath and FileName for type checking validation

In order to add some constraint at compile time, it is not possible to append (</>) a FilePath to another FilePath. You can only append (</>) a FileName to a given FilePath.

  • 3 types
  • 5 values
  • Packagefoundation-0.0.30
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceFilePath.hs
datadata FilePath
#

FilePath is a collection of FileName

TODO: Eq and Ord are implemented using Show This is not very efficient and would need to be improved Also, it is possible the ordering is not necessary what we want in this case.

A FilePath is one of the following:

  • An Absolute:

  • starts with one of the follwing "/"

  • A relative:

  • don't start with a "/"

  • authorised:

  • "/"

  • "filepath"

  • "."

  • ".."

  • "workhaskellhs-foundation"

  • unauthorised

  • "path//"

Instances8Eq, Ord, Show, IsString, Path, PathEnt, …
datadata FileName
#

A filename (or path entity) in the FilePath

  • Authorised

  • ""

  • "."

  • ".."

  • "foundation"

  • Unauthorised

  • "/"

  • "file/"

  • "/file"

  • "file/path"

Instances5Eq, Show, IsString, Semigroup, Monoid
  • Eq FileNameDefined in foundation-0.0.30 · Foundation.VFS.FilePath
  • Show FileNameDefined in foundation-0.0.30 · Foundation.VFS.FilePath
  • IsString FileNameDefined in foundation-0.0.30 · Foundation.VFS.FilePath
  • Semigroup FileNameDefined in foundation-0.0.30 · Foundation.VFS.FilePath
  • Monoid FileNameDefined in foundation-0.0.30 · Foundation.VFS.FilePath

conversion

2 declarations

unsafe