Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
- Methods
- getMajorVersion
- getMicroVersion
- getMinorVersion
- optionsForeach
- optionsGetBoolean
- optionsGetDouble
- optionsGetInt
- optionsGetOptionGroup
- optionsGetRangeString
- optionsGetSize
- optionsGetString
- optionsGetUint
- optionsSetBoolean
- optionsSetDouble
- optionsSetInt
- optionsSetRangeString
- optionsSetSize
- optionsSetString
- optionsSetUint
Synopsis
- getMajorVersion :: (HasCallStack, MonadIO m) => m Word32
- getMicroVersion :: (HasCallStack, MonadIO m) => m Word32
- getMinorVersion :: (HasCallStack, MonadIO m) => m Word32
- optionsForeach :: (HasCallStack, MonadIO m) => OptionsFunc -> m ()
- optionsGetBoolean :: (HasCallStack, MonadIO m) => Text -> m (Bool, Bool)
- optionsGetDouble :: (HasCallStack, MonadIO m) => Text -> m (Bool, Double)
- optionsGetInt :: (HasCallStack, MonadIO m) => Text -> m (Bool, Int32)
- optionsGetOptionGroup :: (HasCallStack, MonadIO m) => m OptionGroup
- optionsGetRangeString :: (HasCallStack, MonadIO m) => Text -> m (Bool, Text)
- optionsGetSize :: (HasCallStack, MonadIO m) => Text -> m (Bool, CSize)
- optionsGetString :: (HasCallStack, MonadIO m) => Text -> m (Bool, Text)
- optionsGetUint :: (HasCallStack, MonadIO m) => Text -> m (Bool, Word32)
- optionsSetBoolean :: (HasCallStack, MonadIO m) => Text -> Bool -> m Bool
- optionsSetDouble :: (HasCallStack, MonadIO m) => Text -> Double -> m Bool
- optionsSetInt :: (HasCallStack, MonadIO m) => Text -> Int32 -> m Bool
- optionsSetRangeString :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool
- optionsSetSize :: (HasCallStack, MonadIO m) => Text -> CSize -> m Bool
- optionsSetString :: (HasCallStack, MonadIO m) => Text -> Text -> m Bool
- optionsSetUint :: (HasCallStack, MonadIO m) => Text -> Word32 -> m Bool
Methods
getMajorVersion
:: (HasCallStack, MonadIO m) | |
=> m Word32 | Returns: the major version number of the JavaScriptCore library |
Returns the major version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 1.)
This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the MAJOR_VERSION
macro, which represents the major version of the JavaScriptCore headers you
have included when compiling your code.
getMicroVersion
:: (HasCallStack, MonadIO m) | |
=> m Word32 | Returns: the micro version number of the JavaScriptCore library |
Returns the micro version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 3.)
This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the MICRO_VERSION
macro, which represents the micro version of the JavaScriptCore headers you
have included when compiling your code.
getMinorVersion
:: (HasCallStack, MonadIO m) | |
=> m Word32 | Returns: the minor version number of the JavaScriptCore library |
Returns the minor version number of the JavaScriptCore library. (e.g. in JavaScriptCore version 1.8.3 this is 8.)
This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the MINOR_VERSION
macro, which represents the minor version of the JavaScriptCore headers you
have included when compiling your code.
optionsForeach
:: (HasCallStack, MonadIO m) | |
=> OptionsFunc |
|
-> m () |
Iterates all available options calling function
for each one. Iteration can
stop early if function
returns False
.
Since: 2.24
optionsGetBoolean
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Bool) | Returns: |
Get option
as a Bool
value.
Since: 2.24
optionsGetDouble
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Double) | Returns: |
Get option
as a gdouble
value.
Since: 2.24
optionsGetInt
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Int32) | Returns: |
Get option
as a gint
value.
Since: 2.24
optionsGetOptionGroup
optionsGetOptionGroup Source #
:: (HasCallStack, MonadIO m) | |
=> m OptionGroup | Returns: a |
Create a OptionGroup
to handle JSCOptions as command line arguments.
The options will be exposed as command line arguments with the form
<emphasis>--jsc-<option>=<value></emphasis>.
Each entry in the returned OptionGroup
is configured to apply the
corresponding option during command line parsing. Applications only need to
pass the returned group to optionContextAddGroup
, and the rest will
be taken care for automatically.
Since: 2.24
optionsGetRangeString
optionsGetRangeString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Text) | Returns: |
Get option
as a range string. The string must be in the
format <emphasis>[!]<low>[:<high>]</emphasis> where low and high are guint
values.
Values between low and high (both included) will be considered in
the range, unless <emphasis>!</emphasis> is used to invert the range.
Since: 2.24
optionsGetSize
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, CSize) | Returns: |
Get option
as a gsize
value.
Since: 2.24
optionsGetString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Text) | Returns: |
Get option
as a string.
Since: 2.24
optionsGetUint
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Bool, Word32) | Returns: |
Get option
as a guint
value.
Since: 2.24
optionsSetBoolean
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Bool |
|
-> m Bool | Returns: |
Set option
as a Bool
value.
Since: 2.24
optionsSetDouble
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Double |
|
-> m Bool | Returns: |
Set option
as a gdouble
value.
Since: 2.24
optionsSetInt
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Int32 |
|
-> m Bool | Returns: |
Set option
as a gint
value.
Since: 2.24
optionsSetRangeString
optionsSetRangeString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Bool | Returns: |
Set option
as a range string. The string must be in the
format <emphasis>[!]<low>[:<high>]</emphasis> where low and high are guint
values.
Values between low and high (both included) will be considered in
the range, unless <emphasis>!</emphasis> is used to invert the range.
Since: 2.24
optionsSetSize
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> CSize |
|
-> m Bool | Returns: |
Set option
as a gsize
value.
Since: 2.24
optionsSetString
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Text |
|
-> m Bool | Returns: |
Set option
as a string.
Since: 2.24