Language.PureScript.CodeGen.JS

purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.CodeGen.JS

Description

This module generates code in the core imperative representation from elaborated PureScript code.

Synopsis

- everywhere :: (AST -> AST) -> AST -> AST
- data AST
- data InitializerEffects
  - = NoEffects
  - | UnknownEffects
- everywhereTopDownM :: Monad m => (AST -> m AST) -> AST -> m AST
- withSourceSpan :: SourceSpan -> AST -> AST
- module Language.PureScript.CodeGen.JS.Common
- moduleToJs :: (MonadReader Options m, MonadSupply m, MonadError MultipleErrors m) => Module Ann -> Maybe PSString -> m Module

# Documentation

everywhere :: (AST -> AST) -> AST -> AST #

data AST #

Data type for simplified JavaScript expressions

#### Instances

Instances details

Show AST # |
Instance details Defined in Language.PureScript.CoreImp.AST Methods showsPrec :: Int -> AST -> ShowS # show :: AST -> String # showList :: [AST] -> ShowS #
Eq AST # |
Instance details Defined in Language.PureScript.CoreImp.AST Methods (==) :: AST -> AST -> Bool # (/=) :: AST -> AST -> Bool #

data InitializerEffects #

Indicates whether the initializer of a variable is known not to have side effects, and thus can be inlined if needed or removed if unneeded.

Constructors

NoEffects |
UnknownEffects |

#### Instances

Instances details

Show InitializerEffects # |
Instance details Defined in Language.PureScript.CoreImp.AST Methods showsPrec :: Int -> InitializerEffects -> ShowS # show :: InitializerEffects -> String # showList :: [InitializerEffects] -> ShowS #
Eq InitializerEffects # |
Instance details Defined in Language.PureScript.CoreImp.AST Methods (==) :: InitializerEffects -> InitializerEffects -> Bool # (/=) :: InitializerEffects -> InitializerEffects -> Bool #

everywhereTopDownM :: Monad m => (AST -> m AST) -> AST -> m AST #

withSourceSpan :: SourceSpan -> AST -> AST #

module Language.PureScript.CodeGen.JS.Common

moduleToJs :: (MonadReader Options m, MonadSupply m, MonadError MultipleErrors m) => Module Ann -> Maybe PSString -> m Module #

Generate code in the simplified JavaScript intermediate representation for all declarations in a module.