apiary-1.2.0: Simple and type safe web framework that can be automatically generate 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) 
Has a ((:) * a as) 

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) 
Monad m => MonadExts exts (ActionT exts prms m) 
Monad actM => MonadExts exts (ApiaryT exts prms actM m) 

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

Instances

data Extensions es Source

Instances

Monad m => MonadExts es (ReaderT (Extensions es) m) 

initializer constructor

data Initializer m i o Source

Instances

Monad m => Category [*] (Initializer m) 

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.