ats-format: A source-code formatter for ATS

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

An opinionated source-code formatter for ATS (http:/www.ats-lang.org).


[Skip to Readme]

Modules

[Index]

Flags

Manual Flags

NameDescriptionDefault
development

Enable `-Werror`

Disabled

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 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-terminal, ansi-wl-pprint (>=0.6.8), array, ats-format, base (>=4.8 && <5), bytestring, composition-prelude (>=0.1.1.1), deepseq, directory, file-embed, htoml-megaparsec, lens, megaparsec, optparse-applicative, process, recursion-schemes, text, unordered-containers [details]
License BSD-3-Clause
Copyright Copyright: (c) 2017 Vanessa McHale
Author Vanessa McHale
Maintainer vamchale@gmail.com
Category Parser, Language
Home page https://hub.darcs.net/vmchale/ats-format#readme
Source repo head: git clone https://github.com/vmchale/ats-format
Uploaded by vmchale at 2017-12-22T02:04:03Z
Distributions
Reverse Dependencies 2 direct, 2 indirect [details]
Executables atsfmt
Downloads 33658 total (137 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-12-22 [all 1 reports]

Readme for ats-format-0.1.0.4

[back to package description]

ats-formatter

Build Status

This is a code formatter for ATS. It is a work-in-progress, but it can handle a subset of the language already. Currently it is only tested with ATS 0.3.8.

If you find something that's not listed in TODO.md feel free to open an issue. The pretty-printer is a bit anemic, so you're welcome to submit code samples where it produces bad output.

The formatter is pleasantly fast, formatting a 1500 line file in <20ms.

Configuration

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

 $ atsfmt --default-config

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 install ats-format

License

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