This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
combinators for pretty printing based on available width
version 1.0.0
license BSD3
native-modules False
elm-version 0.16.0 <= v < 0.17.0
Tag 1.0.1
Committed At 2015-12-05 09:48:46 UTC
evancz/elm-html 4.0.2 <= v < 5.0.0 4.0.2
elm-lang/core 3.0.0 <= v < 4.0.0 3.0.0

README

Elm Pretty Printer

An Elm implementation of the pretty printing library described in Phil Wadler's paper "A Prettier Printer".

image

Combinators here allow you to specify how a tree gets turned into text (you can choose HTML with custom attributes, or a simple string). You can

  • specify indentation with nest
  • use group to specify that a subtree should be on one line if it fits in the given width, or should have newlines if it doesn't.

Documentation is currently lacking; see Example.elm (pictured above) for usage, or the Wadler paper for description of the combinators.

This needs some optimization — a node with 10 children is quite slow to render on window resize in the example!