@@ -23,20 +23,21 @@ import Language.PureScript.AST
23import Language.PureScript.Errors
23import Language.PureScript.Errors
24import Language.PureScript.Supply
24import Language.PureScript.Supply
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
30import Language.PureScript.Sugar.BindingGroups as S
26import 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
32import Language.PureScript.Sugar.Names as S
29import 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
35-- The desugaring pipeline proceeds as follows:
36-- The desugaring pipeline proceeds as follows:
37−-- * Introduce type synonyms for type class dictionaries
38+-- * Remove signed literals in favour of `negate` applications
39−-- * Rebracket user-defined binary operators
40+-- * Desguar object literals with wildcards into lambdas
41-- * Desugar do-notation using the @Prelude.Monad@ type class
42-- * Desugar do-notation using the @Prelude.Monad@ type class
@@ -44,12 +45,17 @@ import Language.PureScript.Sugar.Names as S
45-- * Desugar type declarations into value declarations with explicit type annotations
46-- * Desugar type declarations into value declarations with explicit type annotations
47−-- * Group mutually recursive value and data declarations into binding groups.
49-- * Qualify any unqualified names and types
48-- * Qualify any unqualified names and types
50+-- * Rebracket user-defined binary operators
52+-- * Introduce type synonyms for type class dictionaries
54+-- * Group mutually recursive value and data declarations into binding groups.
51desugar :: [Module] -> SupplyT (Either ErrorStack) [Module]
56desugar :: [Module] -> SupplyT (Either ErrorStack) [Module]
52desugar = map removeSignedLiterals
57desugar = map removeSignedLiterals
58+ >>> map desugarObjectConstructors
53 >>> mapM desugarDoModule
59 >>> mapM desugarDoModule
54 >=> desugarCasesModule
60 >=> desugarCasesModule
55 >=> lift . (desugarTypeDeclarationsModule
61 >=> lift . (desugarTypeDeclarationsModule