{-# OPTIONS -fplugin=Rattus.Plugin #-}
module Rattus (
module Rattus.Primitives,
module Rattus.Strict,
Rattus(..),
(|*|),
(|**),
(<*>),
(<**),
box'
)
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 <*> x = delay (adv f (adv x))
{-# INLINE (<**) #-}
(<**) :: Stable a => O (a -> b) -> a -> O b
f <** x = delay (adv f x)
{-# INLINE (|*|) #-}
(|*|) :: Box (a -> b) -> Box a -> Box b
f |*| x = box (unbox f (unbox x))
{-# INLINE (|**) #-}
(|**) :: Stable a => Box (a -> b) -> a -> Box b
f |** x = box (unbox f x)
box' :: Stable a => a -> Box a
box' x = box x