4module Language.PureScript.Sugar (desugar, module S) where
6import Control.Category ((>>>))
8import Control.Monad.Error.Class (MonadError())
9import Control.Monad.Supply.Class
10import Control.Monad.Writer.Class (MonadWriter())
13import Data.Traversable (traverse)
15import Language.PureScript.AST
16import Language.PureScript.Errors
17import Language.PureScript.Externs
18import Language.PureScript.Sugar.BindingGroups as S
19import Language.PureScript.Sugar.CaseDeclarations as S
20import Language.PureScript.Sugar.DoNotation as S
21import Language.PureScript.Sugar.Names as S
22import Language.PureScript.Sugar.ObjectWildcards as S
23import Language.PureScript.Sugar.Operators as S
24import Language.PureScript.Sugar.TypeClasses as S
25import Language.PureScript.Sugar.TypeClasses.Deriving as S
26import Language.PureScript.Sugar.TypeDeclarations as S
29-- The desugaring pipeline proceeds as follows:
31-- * Remove signed literals in favour of `negate` applications
33-- * Desugar object literals with wildcards into lambdas
35-- * Desugar operator sections
37-- * Desugar do-notation using the @Prelude.Monad@ type class
39-- * Desugar top-level case declarations into explicit case expressions
41-- * Desugar type declarations into value declarations with explicit type annotations
43-- * Qualify any unqualified names and types
45-- * Rebracket user-defined binary operators
47-- * Introduce type synonyms for type class dictionaries
49-- * Group mutually recursive value and data declarations into binding groups.
52 :: (MonadSupply m, MonadError MultipleErrors m, MonadWriter MultipleErrors m)
57 map desugarSignedLiterals
58 >>> traverse desugarObjectConstructors
59 >=> traverse desugarDoModule
60 >=> traverse desugarCasesModule
61 >=> traverse desugarTypeDeclarationsModule
62 >=> desugarImports externs
64 >=> traverse checkFixityExports
65 >=> traverse deriveInstances
66 >=> desugarTypeClasses externs
67 >=> traverse createBindingGroupsModule
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list