Copyright | (C) 2011-2014 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
- rendering :: Lens' c Rendering
- renderingDelta :: Lens' c Delta
- renderingLine :: Lens' c (Lines -> Lines)
- renderingLineBytes :: Lens' c Int64
- renderingLineLen :: Lens' c Int64
- renderingOverlays :: Lens' c (Delta -> Lines -> Lines)
- 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
- fixit :: Lens' c Fixit
- fixitReplacement :: Lens' c ByteString
- fixitSpan :: Lens' c Span
- 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 | |
Foldable Careted | |
Traversable Careted | |
Comonad Careted | |
ComonadApply Careted | |
Eq a => Eq (Careted a) | |
Data a => Data (Careted a) | |
Ord a => Ord (Careted a) | |
Show a => Show (Careted a) | |
Generic (Careted a) | |
Hashable a => Hashable (Careted a) | |
HasDelta (Careted a) | |
HasBytes (Careted a) | |
HasCaret (Careted a) | |
Renderable (Careted a) | |
Reducer (Careted a) Rendering | |
Typeable (* -> *) Careted | |
type Rep (Careted a) |
caretEffects :: [SGR] Source
renderingCaret :: Delta -> ByteString -> Rendering Source
Spans
Span !Delta !Delta !ByteString |
Functor Spanned | |
Foldable Spanned | |
Traversable Spanned | |
Comonad Spanned | |
ComonadApply Spanned | |
Eq a => Eq (Spanned a) | |
Data a => Data (Spanned a) | |
Ord a => Ord (Spanned a) | |
Show a => Show (Spanned a) | |
Generic (Spanned a) | |
Hashable a => Hashable (Spanned a) | |
HasSpan (Spanned a) | |
Renderable (Spanned a) | |
Reducer (Spanned a) Rendering | |
Typeable (* -> *) Spanned | |
type Rep (Spanned a) |
spanEffects :: [SGR] Source
addSpan :: Delta -> Delta -> Rendering -> Rendering Source
int main(int argc, char ** argv) { int; } ^~~
Fixits
Fixit | |
|