trifecta-1.5.2: 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 HaskellNone
LanguageHaskell2010

Text.Trifecta.Rendering

Contents

Description

The type for Lines will very likely change over time, to enable drawing lit up multi-character versions of control characters for ^Z, ^[, 0xff, etc. This will make for much nicer diagnostics when working with protocols.

Synopsis

Documentation

class Source t where Source

Methods

source :: t -> (Int64, Int64, Lines -> Lines) Source

rendered :: Source s => Delta -> s -> Rendering Source

create a drawing surface

Carets

data Caret Source

In file included from baz.c:9
In file included from bar.c:4
foo.c:8:36: note
int main(int argc, char ** argv) { int; }
                                   ^

Constructors

Caret !Delta !ByteString 

class HasCaret t where Source

Methods

caret :: Lens' t Caret Source

Instances

Spans

class HasSpan t where Source

Methods

span :: Lens' t Span Source

addSpan :: Delta -> Delta -> Rendering -> Rendering Source

int main(int argc, char ** argv) { int; }
                                   ^~~

Fixits

class HasFixit c where Source

Minimal complete definition

fixit

Instances

Drawing primitives

type Lines = Array (Int, Int64) ([SGR], Char) Source

draw :: [SGR] -> Int -> Int64 -> String -> Lines -> Lines Source