apiary-2.0.2: Simple and type safe web framework that generate web API documentation.

Safe HaskellNone
LanguageHaskell2010

Data.Apiary.Extension

Contents

Synopsis

Documentation

class Has a as where Source

Methods

getExtension :: proxy a -> Extensions as -> a Source

Instances

Has a as => Has a ((:) * a' as) Source 
Has a ((:) * a as) Source 

class Monad m => MonadExts es m | m -> es where Source

Methods

getExts :: m (Extensions es) Source

Instances

Monad m => MonadExts es (ReaderT (Extensions es) m) Source 
Monad m => MonadExts exts (ActionT exts prms m) Source 
Monad actM => MonadExts exts (ApiaryT exts prms actM m) Source 

getExt :: (MonadExts es m, Has e es) => proxy e -> m e Source

type Middleware' = forall exts. ActionT exts `[]` IO () -> ActionT exts `[]` IO () Source

class Extension e where Source

Minimal complete definition

Nothing

data Extensions es Source

Instances

initializer constructor

data Initializer m i o Source

Instances

initializer :: (Extension e, Monad m) => (Extensions es -> m e) -> Initializer m es (e : es) Source

type Initializer' m a = forall i. Initializer m i (a : i) Source

initializerBracket :: Extension e => (forall a. Extensions es -> (e -> m a) -> m a) -> Initializer m es (e : es) Source

initializerBracket' :: Extension e => (forall a. (e -> m a) -> m a) -> Initializer m es (e : es) Source

combine initializer

(+>) :: Monad m => Initializer m i x -> Initializer m x o -> Initializer m i o Source

combine two Initializer. since 0.16.0.