1-----------------------------------------------------------------------------
3-- Module : Language.PureScript.Sugar
4-- Copyright : (c) Phil Freeman 2013
7-- Maintainer : Phil Freeman <paf31@cantab.net>
8-- Stability : experimental
14-----------------------------------------------------------------------------
16module Language.PureScript.Sugar (desugar, module S) where
19import Control.Category ((>>>))
20import Control.Monad.Trans.Class
22import Language.PureScript.AST
23import Language.PureScript.Errors
24import Language.PureScript.Supply
26import Language.PureScript.Sugar.Operators as S
27import Language.PureScript.Sugar.DoNotation as S
28import Language.PureScript.Sugar.CaseDeclarations as S
29import Language.PureScript.Sugar.TypeDeclarations as S
30import Language.PureScript.Sugar.BindingGroups as S
31import Language.PureScript.Sugar.TypeClasses as S
32import Language.PureScript.Sugar.Names as S
35-- The desugaring pipeline proceeds as follows:
37-- * Introduce type synonyms for type class dictionaries
39-- * Rebracket user-defined binary operators
41-- * Desugar do-notation using the @Prelude.Monad@ type class
43-- * Desugar top-level case declarations into explicit case expressions
45-- * 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
51desugar :: [Module] -> SupplyT (Either ErrorStack) [Module]
52desugar = map removeSignedLiterals
53 >>> mapM desugarDoModule
54 >=> desugarCasesModule
55 >=> lift . (desugarTypeDeclarationsModule
58 >=> desugarTypeClasses
59 >=> lift . 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