purescript-0.15.12: PureScript Programming Language Compiler

Safe Haskell | Safe-Inferred
Language | Haskell2010

Language.PureScript.Make

Contents

- Make API

Synopsis

- rebuildModule :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [ExternsFile] -> Module -> m ExternsFile
- rebuildModule' :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> Env -> [ExternsFile] -> Module -> m ExternsFile
- make :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [PartialResult Module] -> m [ExternsFile]
- inferForeignModules :: forall m. MonadIO m => Map ModuleName (Either RebuildPolicy FilePath) -> m (Map ModuleName FilePath)
- module Language.PureScript.Make.Monad
- module Language.PureScript.Make.Actions

# Make API

rebuildModule :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [ExternsFile] -> Module -> m ExternsFile #

Rebuild a single module.

This function is used for fast-rebuild workflows (PSCi and psc-ide are examples).

rebuildModule' :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> Env -> [ExternsFile] -> Module -> m ExternsFile #

make :: forall m. (MonadBaseControl IO m, MonadError MultipleErrors m, MonadWriter MultipleErrors m) => MakeActions m -> [PartialResult Module] -> m [ExternsFile] #

Compiles in "make" mode, compiling each module separately to a `.js` file and an `externs.cbor` file.

If timestamps or hashes have not changed, existing externs files can be used to provide upstream modules' types without having to typecheck those modules again.

inferForeignModules :: forall m. MonadIO m => Map ModuleName (Either RebuildPolicy FilePath) -> m (Map ModuleName FilePath) #

Infer the module name for a module by looking for the same filename with a .js extension.

module Language.PureScript.Make.Monad

module Language.PureScript.Make.Actions