ReplicationStream s g dup2 c is the infinite linear stream
repeat (g s) where dup2 is used to make as many copies of s as
necessary, and c is used to consume s when consuming the stream.
Although it isn't enforced at type level, dup2 should abide by the same
laws as dup2:
* first c (dup2 a) ≃ a ≃ second c (dup2 a) (neutrality)
* first dup2 (dup2 a) ≃ (second dup2 (dup2 a)) (associativity)
This type is solely used to implement Data.Replicator.Linear
Constructors
ReplicationStream :: s -> (s %1 -> a) -> (s %1 -> (s, s)) -> (s %1 -> ()) -> ReplicationStream a
Instances4Functor, Applicative, Consumable, Dupable
Functor ReplicationStreamDefined in linear-base-0.4.0 · Data.Replicator.Linear.Internal.Instances · orphanApplicative ReplicationStreamDefined in linear-base-0.4.0 · Data.Replicator.Linear.Internal.Instances · orphanConsumable (ReplicationStream a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.ConsumableDupable (ReplicationStream a)Defined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable