optparse-effectful
Safe HaskellNone
LanguageGHC2021

Effectful.Optparse.Static

Description

Provides a static effect for optparse-applicative.

Since: 0.1

Synopsis

Effect

data Optparse (a :: Type -> Type) b Source #

Static effect for optparse-applicative.

Since: 0.1

Instances

Instances details
type DispatchOf Optparse Source # 
Instance details

Defined in Effectful.Optparse.Static

data StaticRep Optparse Source # 
Instance details

Defined in Effectful.Optparse.Static

execParser :: forall (es :: [Effect]) a. (HasCallStack, Optparse :> es) => ParserInfo a -> Eff es a Source #

Lifted execParser.

Since: 0.1

customExecParser :: forall (es :: [Effect]) a. (HasCallStack, Optparse :> es) => ParserPrefs -> ParserInfo a -> Eff es a Source #

Lifted execParser.

Since: 0.1

handleParseResult :: forall (es :: [Effect]) a. (HasCallStack, Optparse :> es) => ParserResult a -> Eff es a Source #

Lifted execParser.

Since: 0.1

Handler

runOptparse :: forall (es :: [Effect]) a. (HasCallStack, IOE :> es) => Eff (Optparse ': es) a -> Eff es a Source #

Runs an Optparse effect.

Since: 0.1

OsPath

type OsPath = OsString #

Type representing filenames/pathnames.

This type doesn't add any guarantees over OsString.

osPath :: ReadM OsPath Source #

OsPath Option reader.

Since: 0.1

validOsPath :: ReadM OsPath Source #

OsPath Option reader. This includes validation i.e. fails if the path is considered invalid on the given platform.

Since: 0.1

OsString

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
NFData OsString # 
Instance details

Defined in System.OsString.Internal.Types

Methods

rnf :: OsString -> () #

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.8-ab1f" '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

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.8-ab1f" 'True) (C1 ('MetaCons "OsString" 'PrefixI 'True) (S1 ('MetaSel ('Just "getOsString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PlatformString)))