Copyright | (c) Fumiaki Kinoshita 2015 |
---|---|
License | BSD3 |
Maintainer | Fumiaki Kinoshita <fumiexcel@gmail.com> |
Stability | provisional |
Portability | GADTs, Rank2Types |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- type Instance f g = MVar (Object f g)
- new :: MonadIO m => Object f g -> m (Instance f g)
- newSettle :: MonadIO m => Object f m -> m (Instance f m)
- invokeOnUsing :: (MonadIO m, MonadMask m) => (Object f g -> t a -> g (a, Object f g)) -> (forall x. g x -> m x) -> Instance f g -> t a -> m a
- invokeOn :: (MonadIO m, MonadMask m) => (forall x. g x -> m x) -> Instance f g -> f a -> m a
- (.-) :: (MonadIO m, MonadMask m) => Instance f m -> f a -> m a
- (..-) :: (MonadIO m, MonadMask m) => Instance t m -> Skeleton t a -> m a
- (?-) :: (MonadIO m, MonadMask m) => Instance f m -> f a -> m (Maybe a)
Instantiation
new :: MonadIO m => Object f g -> m (Instance f g) Source #
Create a new instance. This can be used inside unsafePerformIO
to create top-level instances.
newSettle :: MonadIO m => Object f m -> m (Instance f m) Source #
Create a new instance, having it sitting on the current environment.
Invocation
invokeOnUsing :: (MonadIO m, MonadMask m) => (Object f g -> t a -> g (a, Object f g)) -> (forall x. g x -> m x) -> Instance f g -> t a -> m a Source #