hreader-1.0.2: Generalization of MonadReader and ReaderT using hset

Safe HaskellNone




class (Monad m, Applicative m) => MonadHReader m where Source

Monad which is a reader of HSet (or just can construct it).

Associated Types

type MHRElements m :: [*] Source


askHSet :: m (HSet (MHRElements m)) Source

type family MHRElemsConstraint m els :: Constraint Source

Easy generate constraint like (HGettable (MHRElements m) Int, HGettable (MHRElements m) Bool) from type list [Int, Bool]. Usable to reuse type lists for constraints and concrete HSet.

hask :: (MonadHReader m, HGettable (MHRElements m) e) => m e Source

Ask arbitrary element of hset inside HReader

haskTagged :: (MonadHReader m, HGettable (MHRElements m) (Tagged tag e)) => proxy tag -> m e Source

Ask arbitrary labeled element of hset in HReader