@hackage text-zipper-monad0.2.0.0
Monadic interface to the text-zipper package
Categories
License
BSD-3-Clause
Maintainer
kwangyul.seo@gmail.com
Links
Versions
Installation
Dependencies (3)
- base >=4.7 && <5
- mtl >=2.2 && <2.3
- text-zipper >=0.5 && <0.6 Show all…
Dependents (1)
@hackage/acme-everything
text-zipper-monad
text-zipper-monad provides a monadic interface to the text-zipper package.
Usage
import Data.Text.Zipper
import qualified Data.Text.Zipper.Edit as Z
insertXAtTheBeginning = do
Z.moveCursor (0, 0)
Z.insertChar 'x'
main = do
let tz = stringZipper ["abc", "def"] Nothing
newTz = Z.execEdit insertXAtTheBeginning tz
putStrLn (unlines (getText newTz))