GithubHelp home page GithubHelp logo

batterseapower / ansi-wl-pprint Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 16.0 337 KB

The Wadler/Leijen Pretty Printer for colored ANSI terminal output

Home Page: http://batterseapower.github.com/ansi-wl-pprint

License: Other

Haskell 97.24% Shell 2.76%

ansi-wl-pprint's People

Contributors

batterseapower avatar bos avatar ekmett avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ansi-wl-pprint's Issues

Add priority to soft-breaks

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

Expose Union functionality

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.

256 colors

Could there be support for 256 colors?

Non-exhaustive patterns in function plain

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.

re-export Data.Monoid.<> when available

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 ((<>))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.