Safe Haskell | None |
---|---|
Language | Haskell2010 |
A linear 0-based int-index with a phantom type.
- newtype PInt t p = PInt {}
- pIntI :: Int -> PInt I p
- pIntO :: Int -> PInt O p
- pIntC :: Int -> PInt C p
- streamUpMk :: Monad m => t2 -> t1 -> t -> m (t, t2)
- streamUpStep :: (Num t1, Monad m, Ord t1) => t2 -> t1 -> (t, t1) -> m (Step (t, t1) ((:.) t t1))
- streamDownMk :: Monad m => t2 -> t1 -> t -> m (t, t1)
- streamDownStep :: (Num t2, Monad m, Ord t2) => t2 -> t1 -> (t, t2) -> m (Step (t, t2) ((:.) t t2))
Documentation
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.
streamUpMk :: Monad m => t2 -> t1 -> t -> m (t, t2) Source #
streamUpStep :: (Num t1, Monad m, Ord t1) => t2 -> t1 -> (t, t1) -> m (Step (t, t1) ((:.) t t1)) Source #
streamDownMk :: Monad m => t2 -> t1 -> t -> m (t, t1) Source #