brittany v0.11.0.0 Release Notes

Release Date: 2018-05-01 // almost 6 years ago
    • 👌 Support for ghc-8.4
    • Implement inline-config e.g. "-- brittany --indent=4"

      respects the following comment forms as input:

      source comment                       affected target
      ======================================================
      "-- brittany CONFIG"                 whole module
      "-- brittany-next-binding CONFIG"    next binding
      "-- brittany-disable-next-binding"   next binding
      "-- brittany @ myExampleFunc CONFIG" `myExampleFunc`
      

      multiline-comments are supported too, although the specification must still be a single line. E.g.

      "{- brittany --columns 50 -}"

      CONFIG is either:

      1) one or more flags in the form of what brittany accepts on the commandline, e.g. "--columns 50", or 2) one or more specifications in the form of what brittany accepts in its config files for the layouting config (a one-line yaml document), e.g. "{ lconfig_cols: 50 }"

    • Implement IndentPolicyMultiple (thanks to Bryan Richter @chreekat) Restrict indentation amounts to n * indentAmount

    • Implement --obfuscate that replaces non-keyword identifiers with random names

    • ⚡️ Do not write files unless there are changes (don't update modtime) (--write-mode=inplace) (#93)

    • 🛠 Bugfixes:

      • Fix empty function constraints (() => IO ()) (#133)
      • Fix overflowing columns caused by aligning with surrounding lines for certain complex cases
      • Implement hacky workaround for type instances (-XTypeFamilies) (#89)
    • Layouting changes:

      • On default settings, allow single-line module header module MyModule where when no exports
      • Fix one case of non-optimal layouting for if-then-else
      • Allow same-line let binding inside do-notation with IndentPolicyLeft/Multiple and indentAmount>=4