{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module OpenDHT.Types ( Dht (..)
) where
import Control.Monad.IO.Class
newtype Dht a = Dht { forall a. Dht a -> IO a
unDht :: IO a }
deriving ((forall a b. (a -> b) -> Dht a -> Dht b)
-> (forall a b. a -> Dht b -> Dht a) -> Functor Dht
forall a b. a -> Dht b -> Dht a
forall a b. (a -> b) -> Dht a -> Dht b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
$cfmap :: forall a b. (a -> b) -> Dht a -> Dht b
fmap :: forall a b. (a -> b) -> Dht a -> Dht b
$c<$ :: forall a b. a -> Dht b -> Dht a
<$ :: forall a b. a -> Dht b -> Dht a
Functor, Functor Dht
Functor Dht
-> (forall a. a -> Dht a)
-> (forall a b. Dht (a -> b) -> Dht a -> Dht b)
-> (forall a b c. (a -> b -> c) -> Dht a -> Dht b -> Dht c)
-> (forall a b. Dht a -> Dht b -> Dht b)
-> (forall a b. Dht a -> Dht b -> Dht a)
-> Applicative Dht
forall a. a -> Dht a
forall a b. Dht a -> Dht b -> Dht a
forall a b. Dht a -> Dht b -> Dht b
forall a b. Dht (a -> b) -> Dht a -> Dht b
forall a b c. (a -> b -> c) -> Dht a -> Dht b -> Dht c
forall (f :: * -> *).
Functor f
-> (forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
$cpure :: forall a. a -> Dht a
pure :: forall a. a -> Dht a
$c<*> :: forall a b. Dht (a -> b) -> Dht a -> Dht b
<*> :: forall a b. Dht (a -> b) -> Dht a -> Dht b
$cliftA2 :: forall a b c. (a -> b -> c) -> Dht a -> Dht b -> Dht c
liftA2 :: forall a b c. (a -> b -> c) -> Dht a -> Dht b -> Dht c
$c*> :: forall a b. Dht a -> Dht b -> Dht b
*> :: forall a b. Dht a -> Dht b -> Dht b
$c<* :: forall a b. Dht a -> Dht b -> Dht a
<* :: forall a b. Dht a -> Dht b -> Dht a
Applicative, Applicative Dht
Applicative Dht
-> (forall a b. Dht a -> (a -> Dht b) -> Dht b)
-> (forall a b. Dht a -> Dht b -> Dht b)
-> (forall a. a -> Dht a)
-> Monad Dht
forall a. a -> Dht a
forall a b. Dht a -> Dht b -> Dht b
forall a b. Dht a -> (a -> Dht b) -> Dht b
forall (m :: * -> *).
Applicative m
-> (forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
$c>>= :: forall a b. Dht a -> (a -> Dht b) -> Dht b
>>= :: forall a b. Dht a -> (a -> Dht b) -> Dht b
$c>> :: forall a b. Dht a -> Dht b -> Dht b
>> :: forall a b. Dht a -> Dht b -> Dht b
$creturn :: forall a. a -> Dht a
return :: forall a. a -> Dht a
Monad, Monad Dht
Monad Dht -> (forall a. IO a -> Dht a) -> MonadIO Dht
forall a. IO a -> Dht a
forall (m :: * -> *).
Monad m -> (forall a. IO a -> m a) -> MonadIO m
$cliftIO :: forall a. IO a -> Dht a
liftIO :: forall a. IO a -> Dht a
MonadIO)