Safe Haskell | None |
---|---|
Language | Haskell2010 |
A linear 0-based int-index with a phantom type.
Synopsis
- newtype PInt (ioc :: k) (p :: k) = PInt {}
- pIntI :: Int -> PInt I p
- pIntO :: Int -> PInt O p
- pIntC :: Int -> PInt C p
- streamUpMk :: Monad m => b -> p -> a -> m (a, b)
- streamUpStep :: forall k m p1 a (ioc :: k) (p2 :: k). Monad m => p1 -> Int -> (a, Int) -> m (Step (a, Int) (a :. PInt ioc p2))
- streamDownMk :: Monad m => p -> b -> a -> m (a, b)
- streamDownStep :: forall k m p1 a (ioc :: k) (p2 :: k). Monad m => Int -> p1 -> (a, Int) -> m (Step (a, Int) (a :. PInt ioc p2))
Documentation
newtype PInt (ioc :: k) (p :: k) Source #
A PInt
behaves exactly like an Int
, but has an attached phantom
type p
. In particular, the Index
and IndexStream
instances are the
same as for raw Int
s.
Instances
streamUpMk :: Monad m => b -> p -> a -> m (a, b) Source #
streamUpStep :: forall k m p1 a (ioc :: k) (p2 :: k). Monad m => p1 -> Int -> (a, Int) -> m (Step (a, Int) (a :. PInt ioc p2)) Source #
streamDownMk :: Monad m => p -> b -> a -> m (a, b) Source #