batterseapower / ansi-wl-pprint Goto Github PK
View Code? Open in Web Editor NEWThe Wadler/Leijen Pretty Printer for colored ANSI terminal output
Home Page: http://batterseapower.github.com/ansi-wl-pprint
License: Other
The Wadler/Leijen Pretty Printer for colored ANSI terminal output
Home Page: http://batterseapower.github.com/ansi-wl-pprint
License: Other
And remove the link from the home page.
e.g.:
in
"a" </> "+" </> + "b" </> " = " </> "c" </> "/" </> "d"
one of the soft breaks around equals sign should have higher priority, so that
a + b
= c / d
or
a + b =
c / d
is printed instead of
a + b = c
/ d
Citing from http://hydra.cryp.to/build/626491/nixlog/2/raw:
ext/PrettyPrint/ANSI/Leijen.hs:312:24:
Ambiguous occurrence ‘<$>’
It could refer to either ‘Text.PrettyPrint.ANSI.Leijen.<$>’,
defined at Text/PrettyPrint/ANSI/Leijen.hs:372:3
or ‘Prelude.<$>’,
imported from ‘Prelude’ at Text/PrettyPrint/ANSI/Leijen.hs:76:8-35
(and originally defined in ‘Data.Functor’)
Currently, the only way that Union is exposed is through group. However, group can only fiddle with white space. There are cases where this is not good enough. For instance, pretty printing a Haskell case statement:
case e of C1 x -> e1 ; C2 x y -> e2 ; ...
vs.
case e of
C1 x -> e1
C2 x y -> e2
...
Line breaks must turn into semicolons when trying to lay out on a single line.
A union combinator might allow people to break the invariant, but I'm not sure how to better handle arbitrary new functionality of this type, and it'd be nice to have.
Could there be support for 256 colors?
..., so that less (at least on OS X) and tail would render consecutive lines correctly
My most recent stackage builds just had a bunch of test suite failures with the following text:
Test Cases Total test-async: Text/PrettyPrint/ANSI/Leijen.hs:(1039,1)-(1053,39): Non-exhaustive patterns in function plain
This seems to have been triggered by usage of test-framework. This is based on version 0.6.7 of the package.
I don't think many programs break if <> changes from Doc -> Doc -> Doc
to Monoid m => m -> m -> m
, since everything else in the library has type Doc
. The fixity is the same between the two versions.
This change will save people from having to write hiding ((<>))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.