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

System.AbstractFilePath.Types

Synopsis

Documentation

type AbstractFilePath = OsString Source #

Type representing filenames/pathnames.

This type doesn't add any guarantees over OsString.

type PosixFilePath = PosixString Source #

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

type WindowsFilePath = WindowsString Source #

Filepaths are UTF16 data on windows as passed to syscalls.

unWW :: WindowsChar -> Word16 Source #

unPW :: PosixChar -> Word8 Source #

data WindowsString Source #

Commonly used windows string as UTF16 bytes.

Instances

Instances details
Eq WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Ord WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Read WindowsString Source #

Encodes as UTF-16LE.

Instance details

Defined in System.OsString.Internal.Types

Methods

readsPrec :: Int -> ReadS WindowsString

readList :: ReadS [WindowsString]

readPrec :: ReadPrec WindowsString

readListPrec :: ReadPrec [WindowsString]

Show WindowsString Source #

Decodes as UTF-16LE.

Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> WindowsString -> ShowS

show :: WindowsString -> String

showList :: [WindowsString] -> ShowS

IsString WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

fromString :: String -> WindowsString

Generic WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsString :: Type -> Type

Semigroup WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Monoid WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

NFData WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsString -> ()

Lift WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: WindowsString -> Q Exp

liftTyped :: WindowsString -> Q (TExp WindowsString)

type Rep WindowsString Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsString = D1 ('MetaData "WindowsString" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "WS" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWFP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

data PosixString Source #

Commonly used Posix string as uninterpreted char[] array.

Instances

Instances details
Eq PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

(==) :: PosixString -> PosixString -> Bool

(/=) :: PosixString -> PosixString -> Bool

Ord PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Read PosixString Source #

Encodes as UTF-8.

Instance details

Defined in System.OsString.Internal.Types

Methods

readsPrec :: Int -> ReadS PosixString

readList :: ReadS [PosixString]

readPrec :: ReadPrec PosixString

readListPrec :: ReadPrec [PosixString]

Show PosixString Source #

Decodes as UTF-8 and replaces invalid chars with unicode replacement char U+FFFD.

Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> PosixString -> ShowS

show :: PosixString -> String

showList :: [PosixString] -> ShowS

IsString PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

fromString :: String -> PosixString

Generic PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixString :: Type -> Type

Methods

from :: PosixString -> Rep PosixString x

to :: Rep PosixString x -> PosixString

Semigroup PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

(<>) :: PosixString -> PosixString -> PosixString

sconcat :: NonEmpty PosixString -> PosixString

stimes :: Integral b => b -> PosixString -> PosixString

Monoid PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

NFData PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixString -> ()

Lift PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: PosixString -> Q Exp

liftTyped :: PosixString -> Q (TExp PosixString)

type Rep PosixString Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "PS" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPFP") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString)))

data WindowsChar Source #

Instances

Instances details
Eq WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

(==) :: WindowsChar -> WindowsChar -> Bool

(/=) :: WindowsChar -> WindowsChar -> Bool

Ord WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Show WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> WindowsChar -> ShowS

show :: WindowsChar -> String

showList :: [WindowsChar] -> ShowS

Generic WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep WindowsChar :: Type -> Type

Methods

from :: WindowsChar -> Rep WindowsChar x

to :: Rep WindowsChar x -> WindowsChar

NFData WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: WindowsChar -> ()

type Rep WindowsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep WindowsChar = D1 ('MetaData "WindowsChar" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "WW" 'PrefixI 'True) (S1 ('MetaSel ('Just "unWW") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))

data PosixChar Source #

Instances

Instances details
Eq PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

(==) :: PosixChar -> PosixChar -> Bool

(/=) :: PosixChar -> PosixChar -> Bool

Ord PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

compare :: PosixChar -> PosixChar -> Ordering

(<) :: PosixChar -> PosixChar -> Bool

(<=) :: PosixChar -> PosixChar -> Bool

(>) :: PosixChar -> PosixChar -> Bool

(>=) :: PosixChar -> PosixChar -> Bool

max :: PosixChar -> PosixChar -> PosixChar

min :: PosixChar -> PosixChar -> PosixChar

Show PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> PosixChar -> ShowS

show :: PosixChar -> String

showList :: [PosixChar] -> ShowS

Generic PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep PosixChar :: Type -> Type

Methods

from :: PosixChar -> Rep PosixChar x

to :: Rep PosixChar x -> PosixChar

NFData PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: PosixChar -> ()

type Rep PosixChar Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep PosixChar = D1 ('MetaData "PosixChar" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "PW" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPW") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8)))

data OsString Source #

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
Eq OsString Source #

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

(==) :: OsString -> OsString -> Bool

(/=) :: OsString -> OsString -> Bool

Ord OsString Source #

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

compare :: OsString -> OsString -> Ordering

(<) :: OsString -> OsString -> Bool

(<=) :: OsString -> OsString -> Bool

(>) :: OsString -> OsString -> Bool

(>=) :: OsString -> OsString -> Bool

max :: OsString -> OsString -> OsString

min :: OsString -> OsString -> OsString

Read OsString Source #

Encodes as UTF-8 on unix and UTF-16LE on windows.

Instance details

Defined in System.OsString.Internal.Types

Methods

readsPrec :: Int -> ReadS OsString

readList :: ReadS [OsString]

readPrec :: ReadPrec OsString

readListPrec :: ReadPrec [OsString]

Show OsString Source #

Decodes as UTF-16 on windows.

Decodes as UTF-8 on unix and replaces invalid chars with unicode replacement char U+FFFD.

Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> OsString -> ShowS

show :: OsString -> String

showList :: [OsString] -> ShowS

IsString OsString Source #

Encodes as UTF16 on windows and UTF8 on unix.

Instance details

Defined in System.OsString.Internal.Types

Methods

fromString :: String -> OsString

Generic OsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsString :: Type -> Type

Methods

from :: OsString -> Rep OsString x

to :: Rep OsString x -> OsString

Semigroup OsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

(<>) :: OsString -> OsString -> OsString

sconcat :: NonEmpty OsString -> OsString

stimes :: Integral b => b -> OsString -> OsString

Monoid OsString Source #

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

Instance details

Defined in System.OsString.Internal.Types

NFData OsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsString -> ()

Lift OsString Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

lift :: OsString -> Q Exp

liftTyped :: OsString -> Q (TExp OsString)

type Rep OsString Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsString = D1 ('MetaData "OsString" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "OsString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString)))

data OsChar Source #

Newtype representing a code unit.

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

Instances

Instances details
Eq OsChar Source #

Byte equality of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

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

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

Ord OsChar Source #

Byte ordering of the internal representation.

Instance details

Defined in System.OsString.Internal.Types

Methods

compare :: OsChar -> OsChar -> Ordering

(<) :: OsChar -> OsChar -> Bool

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

(>) :: OsChar -> OsChar -> Bool

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

max :: OsChar -> OsChar -> OsChar

min :: OsChar -> OsChar -> OsChar

Show OsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

showsPrec :: Int -> OsChar -> ShowS

show :: OsChar -> String

showList :: [OsChar] -> ShowS

Generic OsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Associated Types

type Rep OsChar :: Type -> Type

Methods

from :: OsChar -> Rep OsChar x

to :: Rep OsChar x -> OsChar

NFData OsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsChar -> ()

type Rep OsChar Source # 
Instance details

Defined in System.OsString.Internal.Types

type Rep OsChar = D1 ('MetaData "OsChar" "System.OsString.Internal.Types" "filepath-2.0.0.2-inplace" 'True) (C1 ('MetaCons "OsChar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformChar)))