@@ -23,20 +23,21 @@ import Language.PureScript.AST
2323import Language.PureScript.Errors
2424import Language.PureScript.Supply
2525
26−import Language.PureScript.Sugar.Operators as S
27−import Language.PureScript.Sugar.DoNotation as S
28−import Language.PureScript.Sugar.CaseDeclarations as S
29−import Language.PureScript.Sugar.TypeDeclarations as S
3026import Language.PureScript.Sugar.BindingGroups as S
31−import Language.PureScript.Sugar.TypeClasses as S
27+import Language.PureScript.Sugar.CaseDeclarations as S
28+import Language.PureScript.Sugar.DoNotation as S
3229import Language.PureScript.Sugar.Names as S
30+import Language.PureScript.Sugar.ObjectWildcards as S
31+import Language.PureScript.Sugar.Operators as S
32+import Language.PureScript.Sugar.TypeClasses as S
33+import Language.PureScript.Sugar.TypeDeclarations as S
3334
3435-- |
3536-- The desugaring pipeline proceeds as follows:
3637--
37−-- * Introduce type synonyms for type class dictionaries
38+-- * Remove signed literals in favour of `negate` applications
3839--
39−-- * Rebracket user-defined binary operators
40+-- * Desguar object literals with wildcards into lambdas
4041--
4142-- * Desugar do-notation using the @Prelude.Monad@ type class
4243--
@@ -44,12 +45,17 @@ import Language.PureScript.Sugar.Names as S
4445--
4546-- * Desugar type declarations into value declarations with explicit type annotations
4647--
47−-- * Group mutually recursive value and data declarations into binding groups.
48−--
4948-- * Qualify any unqualified names and types
5049--
50+-- * Rebracket user-defined binary operators
51+--
52+-- * Introduce type synonyms for type class dictionaries
53+--
54+-- * Group mutually recursive value and data declarations into binding groups.
55+--
5156desugar :: [Module] -> SupplyT (Either ErrorStack) [Module]
5257desugar = map removeSignedLiterals
58+ >>> map desugarObjectConstructors
5359 >>> mapM desugarDoModule
5460 >=> desugarCasesModule
5561 >=> lift . (desugarTypeDeclarationsModule