Safe Haskell | None |
---|
- class Parameters a where
- params :: Lens' a SimpleQuery
- readShow :: (Read a, Show a) => Prism' ByteString a
- booleanQuery :: Prism' ByteString Bool
- integerArrayQuery :: Prism' ByteString [Integer]
- wrappedParam :: Parameters p => ByteString -> Prism' ByteString a -> Lens' p (Maybe a)
Documentation
class Parameters a whereSource
params :: Lens' a SimpleQuerySource
Parameters (APIRequest apiName responseType) |
integerArrayQuery :: Prism' ByteString [Integer]Source
This Prism
convert from a ByteString
to the array of Integer
value.
This is not a valid Prism, for example:
1, 2 ^? integerArrayQuery == Just [1,2] integerArrayQuery # [1,2] != 1, 2
>>>
integerArrayQuery # [1]
"1">>>
integerArrayQuery # [1,2234,3]
"1,2234,3">>>
"1,2234,3" ^? integerArrayQuery
Just [1,2234,3]>>>
"" ^? integerArrayQuery
Just []>>>
"hoge,2" ^? integerArrayQuery
Nothing
wrappedParam :: Parameters p => ByteString -> Prism' ByteString a -> Lens' p (Maybe a)Source