-
Explains the core idea of the formatter that makes it so cool.
-
Looking at how the data is tranformed should give the reader a good idea of the high-level design, given that Brittany essentially performs a
Text -> Text
transformation. -
An explanation of the
BriDoc
datatype focussed on (potential) contributors that wish to add support for more syntactical constructs. -
Specifying the semantics of the different (smart) constructors of the
BriDoc
type. -
A closer look at how we achieve exactprinting, i.e. keeping comments and certain whitespace (empty lines) as they appear in the input source code.
-
Brittany uses the following (randomly deemed noteworthy) libraries:
ghc-exactprint
(andghc
) for parsing of haskell source;uniplate
for efficient transformations on the recursiveBriDoc
datatype; this powers the main computational work done by Brittany;monad-memo
for explicit function memoization;multistate
as an alternative to an unwieldly transformer stack;butcher
for parsing commandline arguments (as an alternative tooptparse-applicative
)yaml
to handle config file;safe
andunsafe
(heh).