Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Since: 0.2.2.0
Synopsis
- newtype AsLabel a = AsLabel {}
- data SelectedMap a
- lookup :: AsLabel a -> SelectedMap b -> Maybe b
- lookupM :: MonadThrow m => AsLabel a -> SelectedMap b -> m b
- lookupAs :: FromGraphSON a => AsLabel a -> SelectedMap GValue -> Either AsLookupException a
- lookupAsM :: (MonadThrow m, FromGraphSON a) => AsLabel a -> SelectedMap GValue -> m a
- data AsLookupException
Documentation
AsLabel
a
represents a label string used in .as
step
pointing to the data of type a
.
Instances
Functor AsLabel Source # | Unsafely convert the phantom type. |
Eq (AsLabel a) Source # | |
Ord (AsLabel a) Source # | |
Defined in Data.Greskell.AsLabel | |
Show (AsLabel a) Source # | |
ToGreskell (AsLabel a) Source # | Returns the |
Defined in Data.Greskell.AsLabel type GreskellReturn (AsLabel a) :: Type # toGreskell :: AsLabel a -> Greskell (GreskellReturn (AsLabel a)) # | |
type GreskellReturn (AsLabel a) Source # | |
Defined in Data.Greskell.AsLabel |
data SelectedMap a Source #
A map keyed with AsLabel
. Obtained from .select
step, for
example.
Instances
lookup :: AsLabel a -> SelectedMap b -> Maybe b Source #
Get value from SelectedMap
.
lookupM :: MonadThrow m => AsLabel a -> SelectedMap b -> m b Source #
MonadThrow
version of lookup
. If there is no value for the
AsLabel
, it throws NoSuchAsLabel
.
lookupAs :: FromGraphSON a => AsLabel a -> SelectedMap GValue -> Either AsLookupException a Source #
Get value from SelectedMap
and parse the value into a
.
lookupAsM :: (MonadThrow m, FromGraphSON a) => AsLabel a -> SelectedMap GValue -> m a Source #
MonadThrow
version of lookupAs
.
data AsLookupException Source #
NoSuchAsLabel | The |
ParseError String | Failed to parse the value into the type
that the |
Instances
Eq AsLookupException Source # | |
Defined in Data.Greskell.AsLabel (==) :: AsLookupException -> AsLookupException -> Bool # (/=) :: AsLookupException -> AsLookupException -> Bool # | |
Ord AsLookupException Source # | |
Defined in Data.Greskell.AsLabel compare :: AsLookupException -> AsLookupException -> Ordering # (<) :: AsLookupException -> AsLookupException -> Bool # (<=) :: AsLookupException -> AsLookupException -> Bool # (>) :: AsLookupException -> AsLookupException -> Bool # (>=) :: AsLookupException -> AsLookupException -> Bool # max :: AsLookupException -> AsLookupException -> AsLookupException # min :: AsLookupException -> AsLookupException -> AsLookupException # | |
Show AsLookupException Source # | |
Defined in Data.Greskell.AsLabel showsPrec :: Int -> AsLookupException -> ShowS # show :: AsLookupException -> String # showList :: [AsLookupException] -> ShowS # | |
Exception AsLookupException Source # | |
Defined in Data.Greskell.AsLabel |