{-# 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 = 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 = 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 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 = 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 = 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 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 = forall a b c. (a %1 -> b %1 -> c) -> Replicator a %1 -> Replicator b %1 -> Replicator c Replicator.liftA2