Update doc/HCAR entry
parent
26f8cdfb65
commit
f46fcc135d
|
@ -1,6 +1,6 @@
|
||||||
% Brittany-LE.tex
|
% Brittany-LB.tex
|
||||||
\begin{hcarentry}[new]{Brittany}
|
\begin{hcarentry}[updated]{Brittany}
|
||||||
\report{Lennart Spitzner}%11/16
|
\report{Lennart Spitzner}%11/17
|
||||||
\status{work in progress}
|
\status{work in progress}
|
||||||
\makeheader
|
\makeheader
|
||||||
|
|
||||||
|
@ -11,44 +11,35 @@ haskell-src-exts such as hindent or haskell-formatter.
|
||||||
The goals of the project are to:
|
The goals of the project are to:
|
||||||
|
|
||||||
\begin{compactitem}
|
\begin{compactitem}
|
||||||
\item
|
\item support the full ghc-haskell syntax including syntactic extensions;
|
||||||
support the full ghc-haskell syntax including syntactic extensions;
|
\item retain newlines and comments unmodified (to the degree possible when
|
||||||
\item
|
code around them gets reformatted);
|
||||||
retain newlines and comments unmodified (to the degree possible when code
|
\item be clever about using horizontal space while not overflowing it if it
|
||||||
around them gets reformatted);
|
cannot be avoided;
|
||||||
\item
|
\item have linear complexity in the size of the input text / the number of
|
||||||
be clever about using horizontal space while not overflowing it if it cannot
|
|
||||||
be avoided;
|
|
||||||
\item
|
|
||||||
have linear complexity in the size of the input text / the number of
|
|
||||||
syntactic nodes in the input.
|
syntactic nodes in the input.
|
||||||
\item
|
\item support horizontal alignments (e.g. different equations/pattern matches
|
||||||
support horizontal alignments (e.g. different equations/pattern matches in
|
in the some function's definition).
|
||||||
the some function's definition).
|
|
||||||
\end{compactitem}
|
\end{compactitem}
|
||||||
|
|
||||||
In contrast to other formatters brittany internally works in two steps: Firstly
|
In contrast to other formatters brittany internally works in two steps:
|
||||||
transforming the syntax tree into a document tree representation, similar to
|
Firstly transforming the syntax tree into a document tree representation,
|
||||||
the document representation in general-purpose pretty-printers such as the
|
similar to the document representation in general-purpose pretty-printers such
|
||||||
\emph{pretty} package, but much more specialized for the specific purpose of
|
as the \emph{pretty} package, but much more specialized for the specific
|
||||||
handling a Haskell source code document. Secondly this document representation
|
purpose of handling a Haskell source code document. Secondly this document
|
||||||
is transformed into the output text document. This approach allows to handle
|
representation is transformed into the output text document. This approach
|
||||||
many different syntactic constructs in a uniform way, making it possible
|
allows to handle many different syntactic constructs in a uniform way, making
|
||||||
to attain the above goals with a manageable amount of work.
|
it possible to attain the above goals with a manageable amount of work.
|
||||||
|
|
||||||
Brittany is work in progress; currently only type signatures and function
|
Brittany is work in progress; currently only type signatures and function
|
||||||
bindings are transformed, and not all syntactic constructs are supported.
|
bindings are transformed, and not all syntactic constructs are supported.
|
||||||
Nonetheless Brittany is safe to try/use as there are checks in place to
|
Nonetheless Brittany is safe to try/use as there are checks in place to ensure
|
||||||
ensure that the output is syntactically valid.
|
that the output is syntactically valid.
|
||||||
|
|
||||||
Brittany requires ghc-8, and is not released on hackage yet; for a description
|
Brittany requires ghc-8.*, and is available on Hackage and on Stackage.
|
||||||
of how to build it see the repository README.
|
|
||||||
|
|
||||||
\FurtherReading
|
\FurtherReading
|
||||||
{\small
|
|
||||||
\begin{compactitem}
|
\begin{compactitem}
|
||||||
\item
|
\item \url{https://github.com/lspitzner/brittany}
|
||||||
\url{https://github.com/lspitzner/brittany}
|
|
||||||
\end{compactitem}
|
\end{compactitem}
|
||||||
}
|
|
||||||
\end{hcarentry}
|
\end{hcarentry}
|
||||||
|
|
Loading…
Reference in New Issue