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

Methods

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

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

create a drawing surface

Carets

data Caret

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

Methods

caret :: Lens' t Caret

Instances

Spans

class HasSpan t where

Methods

span :: Lens' t Span

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

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

Fixits

class HasFixit c where

Minimal complete definition

fixit

Instances

Drawing primitives

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

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

ifNear :: Delta -> (Lines -> Lines) -> Delta -> Lines -> Lines