@hackage highlight0.1.0.0
Command line tool for highlighting parts of files matching a regex.
Categories
License
BSD-3-Clause
Maintainer
cdep.illabout@gmail.com
Links
Versions
Installation
Dependencies (24)
- Win32 >=2.0
- ansi-terminal >=0.6
- base >=4.7 && <5
- base-compat >=0.8
- bytestring >=0.9
- containers >=0.5 Show all…
Dependents (1)
@hackage/hs-highlight
Highlight
highlight is a
For example, imagine the following Haskell data types and values:
data Foo = Foo { foo1 :: Integer , foo2 :: [String] } deriving Show
foo :: Foo
foo = Foo 3 ["hello", "goodbye"]
data Bar = Bar { bar1 :: Double , bar2 :: [Foo] } deriving Show
bar :: Bar
bar = Bar 10.55 [foo, foo]
If you run this in ghci and type print bar, you'll get output like this:
> print bar
Bar {bar1 = 10.55, bar2 = [Foo {foo1 = 3, foo2 = ["hello","goodbye"]},Foo {foo1 = 3, foo2 = ["hello","goodbye"]}]}
This is pretty hard to read. Imagine if there were more fields or it were even more deeply nested. It would be even more difficult to read.
pretty-simple can be used to print bar in an easy-to-read format:

Usage
Features
Why not (some other package)?
Contributions
Feel free to open an issue or PR for any bugs/problems/suggestions/improvements.