| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
System.OsString.Internal.Types.Compat
Synopsis
- newtype WindowsString = WindowsString {}
- pattern WS :: ShortByteString -> WindowsString
- unWS :: WindowsString -> ShortByteString
- newtype PosixString = PosixString {}
- unPS :: PosixString -> ShortByteString
- pattern PS :: ShortByteString -> PosixString
- type PlatformString = WindowsString
- newtype WindowsChar = WindowsChar {
- getWindowsChar :: Word16
- unWW :: WindowsChar -> Word16
- pattern WW :: Word16 -> WindowsChar
- newtype PosixChar = PosixChar {
- getPosixChar :: Word8
- unPW :: PosixChar -> Word8
- pattern PW :: Word8 -> PosixChar
- type PlatformChar = WindowsChar
- newtype OsString = OsString {}
- newtype OsChar = OsChar {}
- coercionToPlatformTypes :: Either (Coercion OsChar WindowsChar, Coercion OsString WindowsString) (Coercion OsChar PosixChar, Coercion OsString PosixString)
Documentation
newtype WindowsString #
Constructors
| WindowsString | |
Fields | |
Instances
| Monoid WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods mappend :: WindowsString -> WindowsString -> WindowsString mconcat :: [WindowsString] -> WindowsString | |||||
| Semigroup WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods (<>) :: WindowsString -> WindowsString -> WindowsString sconcat :: NonEmpty WindowsString -> WindowsString stimes :: Integral b => b -> WindowsString -> WindowsString | |||||
| Generic WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods showsPrec :: Int -> WindowsString -> ShowS show :: WindowsString -> String showList :: [WindowsString] -> ShowS | |||||
| NFData WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods rnf :: WindowsString -> () | |||||
| Eq WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Ord WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods compare :: WindowsString -> WindowsString -> Ordering (<) :: WindowsString -> WindowsString -> Bool (<=) :: WindowsString -> WindowsString -> Bool (>) :: WindowsString -> WindowsString -> Bool (>=) :: WindowsString -> WindowsString -> Bool max :: WindowsString -> WindowsString -> WindowsString min :: WindowsString -> WindowsString -> WindowsString | |||||
| Lift WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods lift :: Quote m => WindowsString -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => WindowsString -> Code m WindowsString | |||||
| type Rep WindowsString | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep WindowsString = D1 ('MetaData "WindowsString" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "WindowsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString))) | |||||
pattern WS :: ShortByteString -> WindowsString #
unWS :: WindowsString -> ShortByteString #
newtype PosixString #
Constructors
| PosixString | |
Fields | |
Instances
| Monoid PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Semigroup PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods (<>) :: PosixString -> PosixString -> PosixString sconcat :: NonEmpty PosixString -> PosixString stimes :: Integral b => b -> PosixString -> PosixString | |||||
| Generic PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods showsPrec :: Int -> PosixString -> ShowS show :: PosixString -> String showList :: [PosixString] -> ShowS | |||||
| NFData PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods rnf :: PosixString -> () | |||||
| Eq PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Ord PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods compare :: PosixString -> PosixString -> Ordering (<) :: PosixString -> PosixString -> Bool (<=) :: PosixString -> PosixString -> Bool (>) :: PosixString -> PosixString -> Bool (>=) :: PosixString -> PosixString -> Bool max :: PosixString -> PosixString -> PosixString min :: PosixString -> PosixString -> PosixString | |||||
| Lift PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden Methods lift :: Quote m => PosixString -> m Exp liftTyped :: forall (m :: Type -> Type). Quote m => PosixString -> Code m PosixString | |||||
| type Rep PosixString | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep PosixString = D1 ('MetaData "PosixString" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "PosixString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ShortByteString))) | |||||
unPS :: PosixString -> ShortByteString #
pattern PS :: ShortByteString -> PosixString #
type PlatformString = WindowsString #
newtype WindowsChar #
Constructors
| WindowsChar | |
Fields
| |
Instances
| Generic WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden Methods showsPrec :: Int -> WindowsChar -> ShowS show :: WindowsChar -> String showList :: [WindowsChar] -> ShowS | |||||
| NFData WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden Methods rnf :: WindowsChar -> () | |||||
| Eq WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Ord WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden Methods compare :: WindowsChar -> WindowsChar -> Ordering (<) :: WindowsChar -> WindowsChar -> Bool (<=) :: WindowsChar -> WindowsChar -> Bool (>) :: WindowsChar -> WindowsChar -> Bool (>=) :: WindowsChar -> WindowsChar -> Bool max :: WindowsChar -> WindowsChar -> WindowsChar min :: WindowsChar -> WindowsChar -> WindowsChar | |||||
| type Rep WindowsChar | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep WindowsChar = D1 ('MetaData "WindowsChar" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "WindowsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getWindowsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) | |||||
unWW :: WindowsChar -> Word16 #
pattern WW :: Word16 -> WindowsChar #
Constructors
| PosixChar | |
Fields
| |
Instances
| Generic PosixChar | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show PosixChar | |||||
| NFData PosixChar | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Eq PosixChar | |||||
| Ord PosixChar | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| type Rep PosixChar | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep PosixChar = D1 ('MetaData "PosixChar" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "PosixChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPosixChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word8))) | |||||
type PlatformChar = WindowsChar #
Constructors
| OsString | |
Fields | |
Instances
| Monoid OsString | |||||
| Semigroup OsString | |||||
| Generic OsString | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show OsString | |||||
| NFData OsString | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Eq OsString | |||||
| Ord OsString | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Lift OsString | |||||
| type Rep OsString | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep OsString = D1 ('MetaData "OsString" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "OsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString))) | |||||
Constructors
| OsChar | |
Fields | |
Instances
| Generic OsChar | |||||
Defined in System.OsString.Internal.Types.Hidden Associated Types
| |||||
| Show OsChar | |||||
| NFData OsChar | |||||
Defined in System.OsString.Internal.Types.Hidden | |||||
| Eq OsChar | |||||
| Ord OsChar | |||||
| type Rep OsChar | |||||
Defined in System.OsString.Internal.Types.Hidden type Rep OsChar = D1 ('MetaData "OsChar" "System.OsString.Internal.Types.Hidden" "filepath-1.4.301.0-c27c" 'True) (C1 ('MetaCons "OsChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsChar") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformChar))) | |||||
coercionToPlatformTypes :: Either (Coercion OsChar WindowsChar, Coercion OsString WindowsString) (Coercion OsChar PosixChar, Coercion OsString PosixString) Source #
This is a type-level evidence that OsChar is a newtype wrapper
over WindowsChar or PosixChar and OsString is a newtype wrapper
over WindowsString or PosixString. If you pattern match on
coercionToPlatformTypes, GHC will know that relevant types
are coercible to each other. This helps to avoid CPP in certain scenarios.
Note: normally, this requires os-string >= 2.0.2, but since it's required in the test suite, I've defined it here for os-string-2.0.1 and for older versions of filepath.