purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Sugar

Description

Desugaring passes

Synopsis

- desugar :: (MonadSupply m, MonadError MultipleErrors m, MonadWriter MultipleErrors m, MonadState (Env, UsedImports) m) => [ExternsFile] -> Module -> m Module
- module Language.PureScript.Sugar.AdoNotation
- module Language.PureScript.Sugar.BindingGroups
- module Language.PureScript.Sugar.CaseDeclarations
- module Language.PureScript.Sugar.DoNotation
- module Language.PureScript.Sugar.LetPattern
- module Language.PureScript.Sugar.Names
- module Language.PureScript.Sugar.ObjectWildcards
- module Language.PureScript.Sugar.Operators
- module Language.PureScript.Sugar.TypeClasses
- module Language.PureScript.Sugar.TypeClasses.Deriving
- module Language.PureScript.Sugar.TypeDeclarations

# Documentation

desugar :: (MonadSupply m, MonadError MultipleErrors m, MonadWriter MultipleErrors m, MonadState (Env, UsedImports) m) => [ExternsFile] -> Module -> m Module #

The desugaring pipeline proceeds as follows:

- Remove signed literals in favour of `negate` applications
- Desugar object literals with wildcards into lambdas
- Desugar operator sections
- Desugar do-notation
- Desugar ado-notation
- Desugar top-level case declarations into explicit case expressions
- Desugar type declarations into value declarations with explicit type annotations
- Qualify any unqualified names and types
- Rebracket user-defined binary operators
- Introduce newtypes for type class dictionaries and value declarations for instances
- Group mutually recursive value and data declarations into binding groups.

module Language.PureScript.Sugar.AdoNotation

module Language.PureScript.Sugar.BindingGroups

module Language.PureScript.Sugar.CaseDeclarations

module Language.PureScript.Sugar.DoNotation

module Language.PureScript.Sugar.LetPattern

module Language.PureScript.Sugar.Names

module Language.PureScript.Sugar.ObjectWildcards

module Language.PureScript.Sugar.Operators

module Language.PureScript.Sugar.TypeClasses

module Language.PureScript.Sugar.TypeClasses.Deriving

module Language.PureScript.Sugar.TypeDeclarations