Copyright | (C) 2011-2015 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
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.
- data Rendering = Rendering !Delta !Int64 !Int64 (Lines -> Lines) (Delta -> Lines -> Lines)
- class HasRendering c where
- nullRendering :: Rendering -> Bool
- emptyRendering :: Rendering
- class Source t where
- rendered :: Source s => Delta -> s -> Rendering
- class Renderable t where
- data Rendered a = a :@ Rendering
- data Caret = Caret !Delta !ByteString
- class HasCaret t where
- data Careted a = a :^ Caret
- drawCaret :: Delta -> Delta -> Lines -> Lines
- addCaret :: Delta -> Rendering -> Rendering
- caretEffects :: [SGR]
- renderingCaret :: Delta -> ByteString -> Rendering
- data Span = Span !Delta !Delta !ByteString
- class HasSpan t where
- data Spanned a = a :~ Span
- spanEffects :: [SGR]
- drawSpan :: Delta -> Delta -> Delta -> Lines -> Lines
- addSpan :: Delta -> Delta -> Rendering -> Rendering
- data Fixit = Fixit {}
- class HasFixit c where
- drawFixit :: Delta -> Delta -> String -> Delta -> Lines -> Lines
- addFixit :: Delta -> Delta -> String -> Rendering -> Rendering
- type Lines = Array (Int, Int64) ([SGR], Char)
- draw :: [SGR] -> Int -> Int64 -> String -> Lines -> Lines
- ifNear :: Delta -> (Lines -> Lines) -> Delta -> Lines -> Lines
- (.#) :: (Delta -> Lines -> Lines) -> Rendering -> Rendering
Documentation
class HasRendering c where Source #
nullRendering :: Rendering -> Bool Source #
class Renderable t where Source #
Carets
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; } ^
Functor Careted Source # | |
Foldable Careted Source # | |
Traversable Careted Source # | |
Comonad Careted Source # | |
ComonadApply Careted Source # | |
Eq a => Eq (Careted a) Source # | |
Data a => Data (Careted a) Source # | |
Ord a => Ord (Careted a) Source # | |
Show a => Show (Careted a) Source # | |
Generic (Careted a) Source # | |
Hashable a => Hashable (Careted a) Source # | |
HasDelta (Careted a) Source # | |
HasBytes (Careted a) Source # | |
HasCaret (Careted a) Source # | |
Renderable (Careted a) Source # | |
Reducer (Careted a) Rendering Source # | |
type Rep (Careted a) Source # | |
caretEffects :: [SGR] Source #
renderingCaret :: Delta -> ByteString -> Rendering Source #
Spans
Span !Delta !Delta !ByteString |
Functor Spanned Source # | |
Foldable Spanned Source # | |
Traversable Spanned Source # | |
Comonad Spanned Source # | |
ComonadApply Spanned Source # | |
Eq a => Eq (Spanned a) Source # | |
Data a => Data (Spanned a) Source # | |
Ord a => Ord (Spanned a) Source # | |
Show a => Show (Spanned a) Source # | |
Generic (Spanned a) Source # | |
Hashable a => Hashable (Spanned a) Source # | |
HasSpan (Spanned a) Source # | |
Renderable (Spanned a) Source # | |
Reducer (Spanned a) Rendering Source # | |
type Rep (Spanned a) Source # | |
spanEffects :: [SGR] Source #
addSpan :: Delta -> Delta -> Rendering -> Rendering Source #
int main(int argc, char ** argv) { int; } ^~~
Fixits
Fixit | |
|
class HasFixit c where Source #
fixit :: Lens' c Fixit Source #