HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulefilepath-1.5.5.0Haskell2010

System.OsPath.Types

  • 10 types
  • Packagefilepath-1.5.5.0
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceTypes.hs

FilePath types

4 declarations
typetype OsPath = OsString
#

Type representing filenames/pathnames.

This type doesn't add any guarantees over OsString.

OsString reexports

6 declarations
newtypenewtype WindowsString
#

Commonly used windows string as wide character bytes.

Instances9Eq, Ord, Show, Generic, Semigroup, Monoid, …
newtypenewtype PosixString
#

Commonly used Posix string as uninterpreted char[] array.

Instances9Eq, Ord, Show, Generic, Semigroup, Monoid, …
newtypenewtype WindowsChar
#

This represents a "wide char" on windows.

A better name would maybe have been WindowsWord, since this is just Word16 in a UCS-2 sequence.

Instances7Eq, Ord, Show, Generic, NFData, Lift, …
newtypenewtype PosixChar
#

This represents a byte.

A better name would maybe have been PosixWord, since it is just Word8 in an encoded byte sequence.

Instances7Eq, Ord, Show, Generic, NFData, Lift, …
newtypenewtype OsString
#

Newtype representing short operating system specific strings.

Internally this is either WindowsString or PosixString, depending on the platform. Both use unpinned ShortByteString for efficiency.

The constructor is only exported via System.OsString.Internal.Types, since dealing with the internals isn't generally recommended, but supported in case you need to write platform specific code.

Instances9Eq, Ord, Show, Generic, Semigroup, Monoid, …
newtypenewtype OsChar
#

Newtype representing a code unit.

On Windows, this is restricted to two-octet codepoints Word16, on POSIX one-octet (Word8).

This should maybe have been worded OsWord, since it is not a unicode code point by any means. It represents a byte in a

Instances7Eq, Ord, Show, Generic, NFData, Lift, …