purescript-0.13.0: PureScript Programming Language Compiler

Safe HaskellNone



Type declarations and associated basic functions for PSCI.



newtype PSCiConfig Source #

The PSCI configuration.

These configuration values do not change during execution.




data PSCiState Source #

The PSCI state.

Holds a list of imported modules, loaded files, and partial let bindings, plus the currently configured interactive printing function.

The let bindings are partial, because it makes more sense to apply the binding to the final evaluated expression.

The last two fields are derived from the first three via updateImportExports each time a module is imported, a let binding is added, or the session is cleared or reloaded

type ImportedModule = (ModuleName, ImportDeclarationType, Maybe ModuleName) Source #

All of the data that is contained by an ImportDeclaration in the AST. That is:

  • A module name, the name of the module which is being imported
  • An ImportDeclarationType which specifies whether there is an explicit import list, a hiding list, or neither.
  • If the module is imported qualified, its qualified name in the importing module. Otherwise, Nothing.

initialInteractivePrint :: (ModuleName, Ident) Source #

The default interactive print function.

updateImportedModules :: ([ImportedModule] -> [ImportedModule]) -> PSCiState -> PSCiState Source #

Updates the imported modules in the state record.

updateLoadedExterns :: ([(Module, ExternsFile)] -> [(Module, ExternsFile)]) -> PSCiState -> PSCiState Source #

Updates the loaded externs files in the state record.

updateLets :: ([Declaration] -> [Declaration]) -> PSCiState -> PSCiState Source #

Updates the let bindings in the state record.

setInteractivePrint :: (ModuleName, Ident) -> PSCiState -> PSCiState Source #

Replaces the interactive printing function in the state record with a new one.

data Command Source #

Valid Meta-commands for PSCI


Expression Expr

A purescript expression


Show the help (ie, list of directives)

Import ImportedModule

Import a module from a loaded file

BrowseModule ModuleName

Browse a module




Reload all the imported modules of the REPL


Clear the state of the REPL

Decls [Declaration]

Add some declarations to the current evaluation context

TypeOf Expr

Find the type of an expression

KindOf SourceType

Find the kind of an expression

ShowInfo ReplQuery

Shows information about the current state of the REPL


Paste multiple lines

CompleteStr String

Return auto-completion output as if pressing tab

SetInteractivePrint (ModuleName, Ident)

Set the interactive printing function

Show Command Source # 
Instance details

Defined in Language.PureScript.Interactive.Types

replQueries :: [ReplQuery] Source #

A list of all ReplQuery values.