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