realworld-hs-0.1.0.0: Scotty impl of https://github.com/gothinkster/realworld
Safe HaskellSafe-Inferred
LanguageGHC2021

Conduit.Utils

Synopsis

Documentation

(.-) :: (a -> b) -> (b -> c) -> a -> c Source #

A flipped (.) for L->R function composition.

uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d Source #

Like uncurry, but for ternary functions.

(>->) :: Monad m => (a -> m b) -> m c -> a -> m c infixl 5 Source #

Like L->R Kleisli composition, but ignores result of the first operation.

panic :: Text -> IO a
-- panic msg = putTextLn msg >>= const exitFailure
panic = putTextLn >-> exitFailure

data InObj obj Source #

An easy method of generating a containing JSON object as the API Spec often requires.

inObj "key" 123

generates

{ "key": 123 }

Constructors

InObj 

Fields

Instances

Instances details
FromJSON obj => FromJSON (InObj obj) Source # 
Instance details

Defined in Conduit.Utils

ToJSON obj => ToJSON (InObj obj) Source # 
Instance details

Defined in Conduit.Utils

Methods

toJSON :: InObj obj -> Value #

toEncoding :: InObj obj -> Encoding #

toJSONList :: [InObj obj] -> Value #

toEncodingList :: [InObj obj] -> Encoding #

omitField :: InObj obj -> Bool #

Show obj => Show (InObj obj) Source # 
Instance details

Defined in Conduit.Utils

Methods

showsPrec :: Int -> InObj obj -> ShowS #

show :: InObj obj -> String #

showList :: [InObj obj] -> ShowS #