You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
instanceHasHdbc (HandlerAppApp) Connectionwhere
getPool = with db $ gets hdbcPool
This doesn't
instanceHasHdbc (HandlerAppApp) ConnectionIOwhere
getConnSrc = with dbLens $ gets connSrc
The strange point is that the type class is defined as
class (IConnectionc, ConnSrcs, MonadControlIOm)
=>HasHdbcmcs|m->cswheregetConnSrc::m (sc)
I get getPool from the comment
-- | Instantiate this typeclass on 'Handler b YourSnapletState' so this snaplet
-- can find the resource pool. Typically you would instantiate it for Snap's
-- Handler type and use your snaplet's lens to this snaplet to access this
-- snaplet's state, which contains the pool. Suppose your snaplet state type is
-- defined as follows, where 'Connection' is the connection type from the HDBC
-- database adapter of your choosing:
--
-- > data App = App
-- > { _dbLens :: Snaplet (HdbcSnaplet Connection) }
--
-- Then a typical instance you will want to define in your own snaplet is the
-- following:
--
-- > instance HasHdbc (Handler b App) Connection where
-- > getPool = with dbLens $ gets hdbcPool
--
class (IConnection c, ConnSrc s, MonadControlIO m)
=> HasHdbc m c s | m -> c s where
getConnSrc :: m (s c)
Type error:
let n = fromMaybe 11 mnum
The text was updated successfully, but these errors were encountered: