Data.Vector.Fusion.Util

vector-0.13.2.0: Efficient Arrays

Copyright | (c) Roman Leshchinskiy 2009 Alexey Kuleshevich 2020-2022 Aleksey Khudyakov 2020-2022 Andrew Lelechenko 2020-2022
License | BSD-style
Maintainer | Haskell Libraries Team <libraries@haskell.org>
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Data.Vector.Fusion.Util

Description

Fusion-related utility types

Synopsis

- newtype Id a = Id {
  - unId :: a
  }
- data Box a = Box {
  - unBox :: a
  }
- liftBox :: Monad m => Box a -> m a
- delay_inline :: (a -> b) -> a -> b
- delayed_min :: Int -> Int -> Int

# Documentation

newtype Id a #

Identity monad

Constructors

Id |
Fields unId :: a

#### Instances

Instances details

Applicative Id # |
Instance details Defined in Data.Vector.Fusion.Util Methods pure :: a -> Id a # (<*>) :: Id (a -> b) -> Id a -> Id b # liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c # (*>) :: Id a -> Id b -> Id b # (<*) :: Id a -> Id b -> Id a #
Functor Id # |
Instance details Defined in Data.Vector.Fusion.Util Methods fmap :: (a -> b) -> Id a -> Id b # (<$) :: a -> Id b -> Id a #
Monad Id # |
Instance details Defined in Data.Vector.Fusion.Util Methods (>>=) :: Id a -> (a -> Id b) -> Id b # (>>) :: Id a -> Id b -> Id b # return :: a -> Id a #
Eq1 (Bundle Id v) # |
Instance details Defined in Data.Vector.Fusion.Bundle Methods liftEq :: (a -> b -> Bool) -> Bundle Id v a -> Bundle Id v b -> Bool #
Ord1 (Bundle Id v) # |
Instance details Defined in Data.Vector.Fusion.Bundle Methods liftCompare :: (a -> b -> Ordering) -> Bundle Id v a -> Bundle Id v b -> Ordering #
Eq a => Eq (Bundle Id v a) # |
Instance details Defined in Data.Vector.Fusion.Bundle Methods (==) :: Bundle Id v a -> Bundle Id v a -> Bool # (/=) :: Bundle Id v a -> Bundle Id v a -> Bool #
Ord a => Ord (Bundle Id v a) # |
Instance details Defined in Data.Vector.Fusion.Bundle Methods compare :: Bundle Id v a -> Bundle Id v a -> Ordering # (<) :: Bundle Id v a -> Bundle Id v a -> Bool # (<=) :: Bundle Id v a -> Bundle Id v a -> Bool # (>) :: Bundle Id v a -> Bundle Id v a -> Bool # (>=) :: Bundle Id v a -> Bundle Id v a -> Bool # max :: Bundle Id v a -> Bundle Id v a -> Bundle Id v a # min :: Bundle Id v a -> Bundle Id v a -> Bundle Id v a #

data Box a #

Box monad

Constructors

Box |
Fields unBox :: a

#### Instances

Instances details

Applicative Box |
Instance details Defined in Data.Stream.Monadic Methods pure :: a -> Box a # (<*>) :: Box (a -> b) -> Box a -> Box b # liftA2 :: (a -> b -> c) -> Box a -> Box b -> Box c # (*>) :: Box a -> Box b -> Box b # (<*) :: Box a -> Box b -> Box a #
Functor Box |
Instance details Defined in Data.Stream.Monadic Methods fmap :: (a -> b) -> Box a -> Box b # (<$) :: a -> Box b -> Box a #
Monad Box |
Instance details Defined in Data.Stream.Monadic Methods (>>=) :: Box a -> (a -> Box b) -> Box b # (>>) :: Box a -> Box b -> Box b # return :: a -> Box a #

liftBox :: Monad m => Box a -> m a #

delay_inline :: (a -> b) -> a -> b #

Delay inlining a function until late in the game (simplifier phase 0).

delayed_min :: Int -> Int -> Int #

`min` inlined in phase 0