{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ExistentialQuantification #-}
module Control.Distributed.Dataset.ShuffleStore
( ShuffleStore (..),
Range (..),
)
where
import Conduit hiding (Consumer, Producer, await)
import Control.Distributed.Closure
import Data.Binary (Binary)
import Data.ByteString (ByteString)
import Data.Int
import GHC.Generics
data ShuffleStore
= ShuffleStore
{ ShuffleStore
-> Closure
(Int64 -> Range -> ConduitT () ByteString (ResourceT IO) ())
ssGet :: Closure (Int64 -> Range -> ConduitT () ByteString (ResourceT IO) ()),
ShuffleStore
-> Closure (Int64 -> ConduitT ByteString Void (ResourceT IO) ())
ssPut :: Closure (Int64 -> ConduitT ByteString Void (ResourceT IO) ())
}
data Range
= RangeAll
| RangeOnly Integer Integer
deriving (Int -> Range -> ShowS
[Range] -> ShowS
Range -> String
(Int -> Range -> ShowS)
-> (Range -> String) -> ([Range] -> ShowS) -> Show Range
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Range] -> ShowS
$cshowList :: [Range] -> ShowS
show :: Range -> String
$cshow :: Range -> String
showsPrec :: Int -> Range -> ShowS
$cshowsPrec :: Int -> Range -> ShowS
Show, Range -> Range -> Bool
(Range -> Range -> Bool) -> (Range -> Range -> Bool) -> Eq Range
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Range -> Range -> Bool
$c/= :: Range -> Range -> Bool
== :: Range -> Range -> Bool
$c== :: Range -> Range -> Bool
Eq, (forall x. Range -> Rep Range x)
-> (forall x. Rep Range x -> Range) -> Generic Range
forall x. Rep Range x -> Range
forall x. Range -> Rep Range x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Range x -> Range
$cfrom :: forall x. Range -> Rep Range x
Generic, Get Range
[Range] -> Put
Range -> Put
(Range -> Put) -> Get Range -> ([Range] -> Put) -> Binary Range
forall t. (t -> Put) -> Get t -> ([t] -> Put) -> Binary t
putList :: [Range] -> Put
$cputList :: [Range] -> Put
get :: Get Range
$cget :: Get Range
put :: Range -> Put
$cput :: Range -> Put
Binary)