ats-format: A source-code formatter for ATS

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

An opinionated source-code formatter for ATS (http:/

[Skip to Readme]
Versions [faq],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
Dependencies ansi-terminal, ansi-wl-pprint (>=0.6.8), array, ats-format, base (>=4.8 && <5), bytestring, composition-prelude (>=, 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
Category Parser, Language
Home page
Source repo head: git clone
Uploaded by vmchale at 2017-12-22T02:04:03Z
Distributions NixOS:
Executables atsfmt
Downloads 26724 total (213 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-12-22 [all 1 reports]





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

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 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.


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

 $ atsfmt --default-config


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


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