{-# OPTIONS -fplugin=Rattus.Plugin #-}
module Rattus (
module Rattus.Primitives,
module Rattus.Strict,
Rattus(..),
(|*|),
(|**),
(<*>),
(<**))
where
import Rattus.Plugin
import Rattus.Strict
import Rattus.Primitives
import Prelude hiding ((<*>))
{-# ANN module Rattus #-}
{-# INLINE (<*>) #-}
(<*>) :: O (a -> b) -> O a -> O b
f :: O (a -> b)
f <*> :: O (a -> b) -> O a -> O b
<*> x :: O a
x = b -> O b
forall a. a -> O a
delay (O (a -> b) -> a -> b
forall a. O a -> a
adv O (a -> b)
f (O a -> a
forall a. O a -> a
adv O a
x))
{-# INLINE (<**) #-}
(<**) :: Stable a => O (a -> b) -> a -> O b
f :: O (a -> b)
f <** :: O (a -> b) -> a -> O b
<** x :: a
x = b -> O b
forall a. a -> O a
delay (O (a -> b) -> a -> b
forall a. O a -> a
adv O (a -> b)
f a
x)
{-# INLINE (|*|) #-}
(|*|) :: Box (a -> b) -> Box a -> Box b
f :: Box (a -> b)
f |*| :: Box (a -> b) -> Box a -> Box b
|*| x :: Box a
x = b -> Box b
forall a. a -> Box a
box (Box (a -> b) -> a -> b
forall a. Box a -> a
unbox Box (a -> b)
f (Box a -> a
forall a. Box a -> a
unbox Box a
x))
{-# INLINE (|**) #-}
(|**) :: Stable a => Box (a -> b) -> a -> Box b
f :: Box (a -> b)
f |** :: Box (a -> b) -> a -> Box b
|** x :: a
x = b -> Box b
forall a. a -> Box a
box (Box (a -> b) -> a -> b
forall a. Box a -> a
unbox Box (a -> b)
f a
x)