purescript-0.11.0: PureScript Programming Language Compiler

Safe HaskellNone
LanguageHaskell98

Language.PureScript.Sugar.Operators

Description

This module implements the desugaring pass which reapplies binary operators based on their fixity data and removes explicit parentheses.

The value parser ignores fixity data when parsing binary operator applications, so it is necessary to reorder them here.

Synopsis

Documentation

desugarSignedLiterals :: Module -> Module Source #

Removes unary negation operators and replaces them with calls to negate.

rebracket :: forall m. MonadError MultipleErrors m => [ExternsFile] -> [Module] -> m [Module] Source #

Remove explicit parentheses and reorder binary operator applications.

This pass requires name desugaring and export elaboration to have run first.

checkFixityExports :: forall m. MonadError MultipleErrors m => Module -> m Module Source #

Checks all the fixity exports within a module to ensure that members aliased by the operators are also exported from the module.

This pass requires name desugaring and export elaboration to have run first.