knit-haskell-0.8.0.0: a minimal Rmarkdown sort-of-thing for haskell, by way of Pandoc
Copyright(c) Adam Conner-Sax 2019
LicenseBSD-3-Clause
Maintaineradam_conner_sax@yahoo.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Knit.Effect.UnusedId

Description

This module contains a state effect used to maintain a map of unused id numbers which can be used for HTML ids or figure numbering.

Synopsis

Effect

type UnusedId = State IdMap Source #

Type alias for State using IdMap.

actions

getNextUnusedId :: Member UnusedId r => Text -> Sem r Text Source #

Get an unused id with prefix as specified. Useful for figures, etc.

interpretations

runUnusedId :: Sem (UnusedId ': r) a -> Sem r a Source #

Run the UnusedId effect and throw away the state.