X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FdeSugar%2Fintro.lit;fp=ghc%2Fcompiler%2FdeSugar%2Fintro.lit;h=6ae77472364202b4a842cd284a5a9508da227576;hb=e7d21ee4f8ac907665a7e170c71d59e13a01da09;hp=0000000000000000000000000000000000000000;hpb=e48474bff05e6cfb506660420f025f694c870d38;p=ghc-hetmet.git diff --git a/ghc/compiler/deSugar/intro.lit b/ghc/compiler/deSugar/intro.lit new file mode 100644 index 0000000..6ae7747 --- /dev/null +++ b/ghc/compiler/deSugar/intro.lit @@ -0,0 +1,24 @@ +\section[Desugar_intro]{Introduction} + +This pass of the \Haskell{} compiler converts a typechecked program in +@AbsSyntax@ form into a list of @CoreBinding@s, a much simpler form +more suitable for subsequent passes. The basic tasks in this +``desugaring'' are: +\begin{enumerate} +\item +Compile pattern-matching into equivalent code, mainly case-expressions. + +\item +Convert list comprehensions into equivalent code. + +\item +Make explicit all of the implicit activity due to overloading, +dictionaries, etc., etc. +\end{enumerate} + +For the basic desugaring process, we assume familiarity with Phil +Wadler's chapter~5 in SLPJ. The code here will be recognizable by the +avid reader of that chapter. The main difference you will see is that +this code uses a simple monad to pass around the name supply; if +you've read much of this compiler's code, the idioms used will be +grievously familiar.