ats-format: A source-code formatter for ATS

[ ats, bsd3, development, language, parser, program ] [ Propose Tags ]
Dependencies ansi‑wl‑pprint, base (>=4.10 && <5), directory, file‑embed, htoml‑megaparsec (>=, language‑ats (>=, optparse‑applicative, process, text, unordered‑containers [details]
License BSD-3-Clause
Copyright Copyright: (c) 2017-2018 Vanessa McHale
Author Vanessa McHale
Category Parser, Language, ATS, Development
Source repo head: darcs get
Uploaded by vmchale at Wed Feb 21 02:05:16 UTC 2018
Distributions NixOS:
Executables atsfmt
Downloads 2820 total (146 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2018-02-21 [all 3 reports]
Hackage Matrix CI

An opinionated source-code formatter for ATS.

[Skip to Readme]



Enable -Werror


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


Maintainer's Corner

For package maintainers and hackage trustees

Readme for ats-format-

[back to package description]


Build Status

<img alt="Screenshot of sample results" src=> <img alt="Screenshot of sample results" src=>

This is a code formatter for ATS. It is a work-in-progress, but it can handle a good portion of the language already.

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


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

 $ atsfmt --default-config


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


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' --symlink-bindir ~/.cabal/bin -O2


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