@hackage snaplet-amqp0.1.2.0

Snap framework snaplet for the AMQP library

`snaplet-amqp` is a snaplet for the Snap web framework providing convenience functions and state management for the Haskell AMQP package.

Below is an incomplete example.

@ import Control.Lens import Snap import Snap.Snaplet import Snap.Snaplet.AMQP data App = App { _amqp :: Snaplet AmqpState } makeLenses ''App instance HasAmqpConn (Handler b App) where getAmqpConn = with amqp getAmqpConn app :: SnapletInit App App app = makeSnaplet "app" "An snaplet example application." Nothing $ do a <- nestSnaplet "amqp" amqp initAMQP addRoutes appRoutes -- Your routes, I haven't defined any here return $ App a