{-# OPTIONS -Wno-orphans #-} {-# OPTIONS_HADDOCK hide #-} module Data.Replicator.Linear.Internal.Instances where import qualified Data.Functor.Linear as Data import Data.Replicator.Linear.Internal import qualified Data.Replicator.Linear.Internal as Replicator import Data.Replicator.Linear.Internal.ReplicationStream import qualified Data.Replicator.Linear.Internal.ReplicationStream as ReplicationStream instance Data.Functor ReplicationStream where fmap :: forall a b. (a %1 -> b) -> ReplicationStream a %1 -> ReplicationStream b fmap = (a %1 -> b) -> ReplicationStream a %1 -> ReplicationStream b forall a b. (a %1 -> b) -> ReplicationStream a %1 -> ReplicationStream b ReplicationStream.map instance Data.Applicative ReplicationStream where pure :: forall a. a -> ReplicationStream a pure = a -> ReplicationStream a forall a. a -> ReplicationStream a ReplicationStream.pure ReplicationStream (a %1 -> b) f <*> :: forall a b. ReplicationStream (a %1 -> b) %1 -> ReplicationStream a %1 -> ReplicationStream b <*> ReplicationStream a x = ReplicationStream (a %1 -> b) f ReplicationStream (a %1 -> b) %1 -> ReplicationStream a %1 -> ReplicationStream b forall a b. ReplicationStream (a %1 -> b) %1 -> ReplicationStream a %1 -> ReplicationStream b ReplicationStream.<*> ReplicationStream a x instance Data.Functor Replicator where fmap :: forall a b. (a %1 -> b) -> Replicator a %1 -> Replicator b fmap = (a %1 -> b) -> Replicator a %1 -> Replicator b forall a b. (a %1 -> b) -> Replicator a %1 -> Replicator b Replicator.map instance Data.Applicative Replicator where pure :: forall a. a -> Replicator a pure = a -> Replicator a forall a. a -> Replicator a Replicator.pure Replicator (a %1 -> b) f <*> :: forall a b. Replicator (a %1 -> b) %1 -> Replicator a %1 -> Replicator b <*> Replicator a x = Replicator (a %1 -> b) f Replicator (a %1 -> b) %1 -> Replicator a %1 -> Replicator b forall a b. Replicator (a %1 -> b) %1 -> Replicator a %1 -> Replicator b Replicator.<*> Replicator a x liftA2 :: forall a b c. (a %1 -> b %1 -> c) -> Replicator a %1 -> Replicator b %1 -> Replicator c liftA2 = (a %1 -> b %1 -> c) -> Replicator a %1 -> Replicator b %1 -> Replicator c forall a b c. (a %1 -> b %1 -> c) -> Replicator a %1 -> Replicator b %1 -> Replicator c Replicator.liftA2