Currently SubscriptionEventStreamBatch is defined as follows
data SubscriptionEventStreamBatch a = SubscriptionEventStreamBatch
{ _cursor :: SubscriptionCursor -- ^ cursor for this subscription batch
, _events :: Maybe (Vector a) -- ^ Events for this subscription batch
} deriving (Show, Generic)
In particular, _events is defined as a Maybe (Vector a). As I see it, we don't need the extra Maybe wrapping at this point. The case "no events field present in Nakadi batch" could be handled just like "empty events array in Nakadi batch".
Currently
SubscriptionEventStreamBatch
is defined as followsIn particular,
_events
is defined as aMaybe (Vector a)
. As I see it, we don't need the extraMaybe
wrapping at this point. The case "noevents
field present in Nakadi batch" could be handled just like "emptyevents
array in Nakadi batch".