elm-format (0.2.0-alpha)

163 views
Skip to first unread message

Aaron VonderHaar

unread,
Feb 1, 2016, 10:37:49 PM2/1/16
to elm...@googlegroups.com

After the tedious work of making the AST retain comments, elm-format-0.2-alpha is ready! Most notable is the switch to 2-space indentation, as previously discussed on elm-dev. There are also now plugins for LightTable, Emacs, and Vim thanks to @rundis@Bogdanp, and @ajhager!

You can find the downloads and editor integration instructions here:

Here's a brief list of changes:

  • changed to 2-space indentation
  • comments are handled everywhere they can appear
  • fixed a unicode problem with console output on Windows
  • parentheses in pattern matches are handled correctly, including a workaround for elm-lang/elm-compiler#951
  • triple double quotes in multiline strings are handled correctly
  • more than one file or directory can be given on the command line
  • added the --stdin command line option to support IDE plugins

Thanks to everyone who helped improve the documentation and to the following for contributing code to this release:

Richard Feldman

unread,
Feb 1, 2016, 10:41:21 PM2/1/16
to elm-dev
Wooo!!! Thanks to Aaron and all the contributors. This is already one of those tools that I never want to live without again. Really just superlative. :)

Joey Eremondi

unread,
Feb 1, 2016, 11:52:21 PM2/1/16
to elm-dev
Wow, great work! It sounds like you've fixed all the major issues from last time!

Is there a complete description of the style anywhere? I'm currently working on a fork of hindent to try to match the style of Haskell code to the Elm guide, but I'm wondering which corner cases I've missed.

On Mon, Feb 1, 2016 at 7:41 PM, Richard Feldman <richard....@gmail.com> wrote:
Wooo!!! Thanks to Aaron and all the contributors. This is already one of those tools that I never want to live without again. Really just superlative. :)

--
You received this message because you are subscribed to the Google Groups "elm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elm-dev/174cbd6a-351a-4b65-977e-e3ffe4f6ec8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Aaron VonderHaar

unread,
Feb 2, 2016, 2:10:23 PM2/2/16
to elm...@googlegroups.com
Joey, what kind of description are you looking for?

There is an almost complete test suite here: https://github.com/avh4/elm-format/tree/master/tests/test-files/good/AllSyntax  (which is currently a bit disorganized).  All files in there are correctly formatted.

You might take a look at the main implementation file: https://github.com/avh4/elm-format/blob/master/src/ElmFormat/Render/Box.hs  It's long, but I think it's pretty well organized.  There are functions and cases for all parts of the AST.

Luke Westby

unread,
Feb 3, 2016, 6:59:02 PM2/3/16
to elm-dev
Fantastic!! Thank you, all!

Joey Eremondi

unread,
Feb 3, 2016, 9:07:20 PM2/3/16
to elm-dev
@Aaron thanks, I'll take a look at those, they probably have what I want!

I was thinking something like this, but that was actually complete, there's a lot of missing cases. But it probably donsn't make sense to have a textual description of the entire guide.

On Wed, Feb 3, 2016 at 3:59 PM, Luke Westby <lwe...@alumni.nd.edu> wrote:
Fantastic!! Thank you, all!

--
You received this message because you are subscribed to the Google Groups "elm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-dev+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages