#if __GLASGOW_HASKELL__ >= 703
#elif __GLASGOW_HASKELL__ >= 701
#endif
module Data.Vector.Fusion.Util (
Id(..), Box(..),
delay_inline, delayed_min
) where
newtype Id a = Id { unId :: a }
instance Functor Id where
fmap f (Id x) = Id (f x)
instance Monad Id where
return = Id
Id x >>= f = f x
data Box a = Box { unBox :: a }
instance Functor Box where
fmap f (Box x) = Box (f x)
instance Monad Box where
return = Box
Box x >>= f = f x
delay_inline :: (a -> b) -> a -> b
delay_inline f = f
delayed_min :: Int -> Int -> Int
delayed_min m n = min m n