mios-1.3.0: A Minisat-based SAT solver in Haskell

Safe HaskellTrustworthy
LanguageHaskell2010

SAT.Mios.Data.Stack

Description

stack of Int, by adding the length field as the zero-th element to a Vec

Synopsis

Documentation

data Stack Source #

Unboxed mutable stack for Int.

newStack :: Int -> IO Stack Source #

returns a new stack which size is size

clearStack :: Stack -> IO () Source #

clear stack

sizeOfStack :: Stack -> IO Int Source #

returns the number of elements

pushToStack :: Stack -> Int -> IO () Source #

pushs an int to Stack

popFromStack :: Stack -> IO () Source #

drops the first element from Stack

lastOfStack :: Stack -> IO Int Source #

peeks the last element in Stack

shrinkStack :: Stack -> Int -> IO () Source #

Shrink the stack. The given arg means the number of discards. therefore, shrink s n == for [1 .. n] $ _ -> pop s

asSizedVec :: Stack -> Vec Source #

converts Stack to sized Vec; this is the method to get the internal vector