Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Res a = Res !Int !a
- newtype Push v p a = Push (forall s. Int -> STRef s (v s p) -> ST s (Res a))
- runPush :: Vector v p => Push (Mutable v) p a -> (a, v p)
- runPushU :: forall p a. Unbox p => Push MVector p a -> (a, Vector p)
- runPushB :: forall p a. Push MVector p a -> (a, Vector p)
- runPushS :: forall p a. Storable p => Push MVector p a -> (a, Vector p)
Documentation
The internal return type of a push action. The Int value is the new vector used length.
A monad that lets you push things onto a stack.
runPush :: Vector v p => Push (Mutable v) p a -> (a, v p) Source #
Run the Push monad. Get the return value and the output stack.
runPushU :: forall p a. Unbox p => Push MVector p a -> (a, Vector p) Source #
Specialized to Unboxed vectors.