trifecta-1.5.1.3: A modern parser combinator library with convenient diagnostics

Copyright(C) 2011-2014 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Trifecta.Util.It

Description

harder, better, faster, stronger...

Synopsis

Documentation

data It r a Source

Constructors

Pure a 
It a (r -> It r a) 

Instances

Monad (It r) 
Functor (It r) 
Applicative (It r) 
Comonad (It r)

It is a cofree comonad

ComonadApply (It r) 
Show a => Show (It r a) 

needIt :: a -> (r -> Maybe a) -> It r a Source

wantIt :: a -> (r -> (#Bool, a#)) -> It r a Source

simplifyIt :: It r a -> r -> It r a Source

runIt :: (a -> o) -> (a -> (r -> It r a) -> o) -> It r a -> o Source

fillIt :: r -> (Delta -> ByteString -> r) -> Delta -> It Rope r Source

Given a position, go there, and grab the text forward from that point

rewindIt :: Delta -> It Rope (Maybe ByteString) Source

Return the text of the line that contains a given position