Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Each piece of memory that is pushed onto the stack is cast to a GTrashStack*.
- newtype TrashStack = TrashStack (ManagedPtr TrashStack)
- newZeroTrashStack :: MonadIO m => m TrashStack
- noTrashStack :: Maybe TrashStack
- trashStackHeight :: (HasCallStack, MonadIO m) => TrashStack -> m Word32
- trashStackPeek :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())
- trashStackPop :: (HasCallStack, MonadIO m) => TrashStack -> m (Ptr ())
- trashStackPush :: (HasCallStack, MonadIO m) => TrashStack -> Ptr () -> m ()
- clearTrashStackNext :: MonadIO m => TrashStack -> m ()
- getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack)
- setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m ()
- trashStack_next :: AttrLabelProxy "next"
Exported types
newtype TrashStack Source #
WrappedPtr TrashStack Source # | |
(~) AttrOpTag tag AttrSet => Constructible TrashStack tag Source # | |
((~) * info (ResolveTrashStackMethod t TrashStack), MethodInfo * info TrashStack p) => IsLabel t (TrashStack -> p) Source # | |
((~) * info (ResolveTrashStackMethod t TrashStack), MethodInfo * info TrashStack p) => IsLabelProxy t (TrashStack -> p) Source # | |
HasAttributeList * TrashStack Source # | |
type AttributeList TrashStack Source # | |
newZeroTrashStack :: MonadIO m => m TrashStack Source #
Construct a TrashStack
struct initialized to zero.
Methods
height
:: (HasCallStack, MonadIO m) | |
=> TrashStack |
|
-> m Word32 | Returns: the height of the stack |
Deprecated: (Since version 2.48)TrashStack
is deprecated without replacement
Returns the height of a TrashStack
.
Note that execution of this function is of O(N) complexity where N denotes the number of items on the stack.
peek
:: (HasCallStack, MonadIO m) | |
=> TrashStack |
|
-> m (Ptr ()) | Returns: the element at the top of the stack |
Deprecated: (Since version 2.48)TrashStack
is deprecated without replacement
Returns the element at the top of a TrashStack
which may be Nothing
.
pop
:: (HasCallStack, MonadIO m) | |
=> TrashStack |
|
-> m (Ptr ()) | Returns: the element at the top of the stack |
Deprecated: (Since version 2.48)TrashStack
is deprecated without replacement
Pops a piece of memory off a TrashStack
.
push
:: (HasCallStack, MonadIO m) | |
=> TrashStack |
|
-> Ptr () |
|
-> m () |
Deprecated: (Since version 2.48)TrashStack
is deprecated without replacement
Pushes a piece of memory onto a TrashStack
.
Properties
next
clearTrashStackNext :: MonadIO m => TrashStack -> m () Source #
getTrashStackNext :: MonadIO m => TrashStack -> m (Maybe TrashStack) Source #
setTrashStackNext :: MonadIO m => TrashStack -> Ptr TrashStack -> m () Source #
trashStack_next :: AttrLabelProxy "next" Source #