filepath-1.5.3.0: Library for manipulating FilePaths in a cross platform way.
Safe HaskellNone
LanguageHaskell2010

System.OsPath.Types

Synopsis

FilePath types

type OsPath = OsString Source #

Type representing filenames/pathnames.

This type doesn't add any guarantees over OsString.

type WindowsPath = WindowsString Source #

Filepaths are wchar_t* data on windows as passed to syscalls.

type PosixPath = PosixString Source #

Filepaths are char[] data on unix as passed to syscalls.

type PlatformPath = PosixPath Source #

Ifdef around current platform (either WindowsPath or PosixPath).

OsString reexports

data WindowsString #

Commonly used windows string as wide character bytes.

Instances

Instances details
Monoid WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Semigroup WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Generic WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsString 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsString = D1 ('MetaData "WindowsString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "WindowsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))
Show WindowsString

Decodes as UCS-2.

Instance details

Defined in System.OsString.Internal.Types

NFData WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsString -> () #

Eq WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Ord WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Lift WindowsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: Quote m => WindowsString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => WindowsString -> Code m WindowsString #

type Rep WindowsString 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsString = D1 ('MetaData "WindowsString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "WindowsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

data PosixString #

Commonly used Posix string as uninterpreted char[] array.

Instances

Instances details
Monoid PosixString 
Instance details

Defined in System.OsString.Internal.Types

Semigroup PosixString 
Instance details

Defined in System.OsString.Internal.Types

Generic PosixString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixString 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "PosixString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))
Show PosixString

Prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types

NFData PosixString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixString -> () #

Eq PosixString 
Instance details

Defined in System.OsString.Internal.Types

Ord PosixString 
Instance details

Defined in System.OsString.Internal.Types

Lift PosixString 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: Quote m => PosixString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => PosixString -> Code m PosixString #

type Rep PosixString 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "PosixString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

data WindowsChar #

Instances

Instances details
Generic WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsChar = D1 ('MetaData "WindowsChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "WindowsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))
Show WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

NFData WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsChar -> () #

Eq WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

Ord WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsChar = D1 ('MetaData "WindowsChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "WindowsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

data PosixChar #

Instances

Instances details
Generic PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixChar = D1 ('MetaData "PosixChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "PosixChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))
Show PosixChar 
Instance details

Defined in System.OsString.Internal.Types

NFData PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixChar -> () #

Eq PosixChar 
Instance details

Defined in System.OsString.Internal.Types

Ord PosixChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixChar = D1 ('MetaData "PosixChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "PosixChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))

data 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.

Instances

Instances details
Monoid OsString

"String-Concatenation" for OsString. This is not the same as (</>).

Instance details

Defined in System.OsString.Internal.Types

Semigroup OsString 
Instance details

Defined in System.OsString.Internal.Types

Generic OsString 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsString 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsString = D1 ('MetaData "OsString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "OsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString)))

Methods

from :: OsString -> Rep OsString x #

to :: Rep OsString x -> OsString #

Show OsString

On windows, decodes as UCS-2. On unix prints the raw bytes without decoding.

Instance details

Defined in System.OsString.Internal.Types

NFData OsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsString -> () #

Eq OsString

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Ord OsString

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Lift OsString 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: Quote m => OsString -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => OsString -> Code m OsString #

type Rep OsString 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsString = D1 ('MetaData "OsString" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "OsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString)))

data OsChar #

Newtype representing a code unit.

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

Instances

Instances details
Generic OsChar 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsChar = D1 ('MetaData "OsChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "OsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformChar)))

Methods

from :: OsChar -> Rep OsChar x #

to :: Rep OsChar x -> OsChar #

Show OsChar 
Instance details

Defined in System.OsString.Internal.Types

NFData OsChar 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsChar -> () #

Eq OsChar

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

(==) :: OsChar -> OsChar -> Bool #

(/=) :: OsChar -> OsChar -> Bool #

Ord OsChar

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

type Rep OsChar 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsChar = D1 ('MetaData "OsChar" "System.OsString.Internal.Types" "os-string-2.0.4-ea6ae28dc9b3712b976bf1323571bc0315dcdcc7322fe276e2a2c12e62d6c267" 'True) (C1 ('MetaCons "OsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformChar)))