Stability | experimental |
---|---|

Maintainer | developer@flocc.net |

Safe Haskell | Safe-Inferred |

For more information please see http://www.flocc.net/

- type Idx = Int
- type IdxSet = [Int]
- type IdxMonad m = StateT IdxSet m
- getnid :: Int -> IdxSet -> (Idx, IdxSet)
- newid :: Int -> State IdxSet Idx
- newid' :: Int -> Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx
- newid'' :: Monad m => Int -> StateT IdxSet m Idx
- getid' :: Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx
- getidST :: Monad m => Idx -> StateT [(Idx, Idx)] (StateT IdxSet m) Idx
- newidST :: Monad m => Int -> StateT IdxSet m Idx
- newidST' :: Monad m => Int -> Idx -> StateT [(Idx, Idx)] (StateT IdxSet m) Idx
- getNextIdxST :: Monad m => String -> Int -> IdxMonad m Idx
- setMinIndices :: Monad m => Idx -> IdxMonad m ()

# Documentation

getnid :: Int -> IdxSet -> (Idx, IdxSet)

Gets the next id for a column in the idx set, and |returns that id, and the updated list.

newid :: Int -> State IdxSet Idx

Creates a new id (for the list of ids specified by the first paramter)

newid' :: Int -> Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx

Returns the id in the map list if it exists. if it does not, creates a new one |adds it to the map

newid'' :: Monad m => Int -> StateT IdxSet m Idx

Creates a new id (for the list of ids specified by the first parameter) using |a state transformer, rather than a state monad.

getid' :: Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx

Looks up the id in the list, and returns the replacement if it exists |or the original if it doesnt

getidST :: Monad m => Idx -> StateT [(Idx, Idx)] (StateT IdxSet m) Idx

Looks up the id in the list, and returns the replacement if it exists |or the original if it doesnt

newidST' :: Monad m => Int -> Idx -> StateT [(Idx, Idx)] (StateT IdxSet m) Idx

Returns the id in the map list if it exists. if it does not, creates a new one |adds it to the map, using a state transformer.

setMinIndices :: Monad m => Idx -> IdxMonad m ()