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