ats-format: A source-code formatter for ATS

[ ats, bsd3, development, language, parser, program ] [ Propose Tags ]

An opinionated source-code formatter for ATS.


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.1.0.4, 0.1.0.5, 0.1.0.6, 0.1.0.7, 0.1.0.8, 0.1.0.9, 0.1.0.10, 0.1.0.11, 0.1.0.12, 0.1.0.14, 0.1.0.15, 0.1.0.16, 0.1.0.17, 0.1.0.18, 0.1.0.19, 0.1.0.20, 0.1.0.21, 0.1.0.22, 0.1.0.23, 0.1.0.24, 0.1.0.25, 0.1.0.26, 0.1.0.27, 0.1.0.28, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.1.3.1, 0.1.3.3, 0.1.3.5, 0.1.3.6, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.0.4, 0.2.0.5, 0.2.0.8, 0.2.0.9, 0.2.0.10, 0.2.0.12, 0.2.0.13, 0.2.0.15, 0.2.0.17, 0.2.0.22, 0.2.0.25, 0.2.0.26, 0.2.0.27, 0.2.0.28, 0.2.0.29, 0.2.0.30, 0.2.0.31, 0.2.0.32, 0.2.0.33, 0.2.0.34, 0.2.0.35, 0.2.0.36
Dependencies ansi-wl-pprint, base (>=4.9 && <5), directory, file-embed, htoml-megaparsec (>=1.1.0.0 && <2.0.0.0), language-ats (>=0.1.1.10), optparse-applicative, process, text, unordered-containers [details]
License BSD-3-Clause
Copyright Copyright: (c) 2017-2018 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Revised Revision 1 made by vmchale at 2018-05-29T01:02:51Z
Category Parser, Language, ATS, Development
Source repo head: darcs get https://hub.darcs.net/vmchale/ats
Uploaded by vmchale at 2018-04-02T23:36:10Z
Distributions NixOS:0.2.0.36
Executables atsfmt
Downloads 26723 total (212 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs pending
Build status unknown [no reports yet]

Flags

NameDescriptionDefaultType
development

Enable -Werror

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for ats-format-0.2.0.25

[back to package description]

ats-formatter

Build Status

<img alt="Screenshot of sample results" src=https://github.com/vmchale/ats-format/raw/master/atsfmt.png> <img alt="Screenshot of sample results" src=https://github.com/vmchale/ats-format/raw/master/atsfmt2.png>

This is a code formatter for ATS. It is a work-in-progress.

If you find something that's not listed in TODO.md feel free to open an issue. Code samples that were formatted into something ugly are also welcome.

Configuration

atsfmt is configured with the .atsfmt.toml file. You can generate a default configuration with

 $ atsfmt --default-config

Vim

You can use this plugin to enable automatic formatting on write.

Installation

Binary Releases

The releases page has binary releases for common platforms.

Compilation from Source

To install, first install GHC, then cabal. Then

 $ cabal update
 $ cabal new-install ats-format --happy-options='-gcsa' --alex-options='-g' -O2

License

All code except test/data/left-pad.dats is licensed under the BSD3 license.