1 \section[Desugar_intro]{Introduction}
3 This pass of the \Haskell{} compiler converts a typechecked program in
4 @AbsSyntax@ form into a list of @CoreBinding@s, a much simpler form
5 more suitable for subsequent passes. The basic tasks in this
9 Compile pattern-matching into equivalent code, mainly case-expressions.
12 Convert list comprehensions into equivalent code.
15 Make explicit all of the implicit activity due to overloading,
16 dictionaries, etc., etc.
19 For the basic desugaring process, we assume familiarity with Phil
20 Wadler's chapter~5 in SLPJ. The code here will be recognizable by the
21 avid reader of that chapter. The main difference you will see is that
22 this code uses a simple monad to pass around the name supply; if
23 you've read much of this compiler's code, the idioms used will be