Forrest logo
back to the brittany tool

brittany:tldr:ea778

brittany: Format all Haskell source files in the current directory in-place.
$ brittany --write-mode=inplace ${*-hs}
try on your machine

The command "brittany --write-mode=inplace ${*-hs}" is a command that uses the tool "brittany" to format Haskell source code files.

Let's break it down:

  • "brittany" is a code formatting tool for Haskell. It automatically formats Haskell source code according to a specified style guide.

  • "--write-mode=inplace" is an option for the "brittany" tool. It specifies that the tool should modify the input files in-place, i.e., the formatted code will overwrite the original code within the same file.

  • "${*-hs}" is a shell parameter expansion. It is used to refer to the arguments passed to the command. In this case, it appears to be referring to a list of Haskell source code files.

Overall, this command will take the specified Haskell source code files as input, format them using the "brittany" tool, and overwrite the original files with the formatted versions.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the brittany tool