| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Language.PureScript.Interactive.Types
Contents
Description
Type declarations and associated basic functions for PSCI.
- data PSCiConfig = PSCiConfig {}
- data PSCiState = PSCiState {}
- initialPSCiState :: PSCiState
- type ImportedModule = (ModuleName, ImportDeclarationType, Maybe ModuleName)
- psciImportedModuleNames :: PSCiState -> [ModuleName]
- allImportsOf :: Module -> PSCiState -> [ImportedModule]
- updateImportedModules :: ([ImportedModule] -> [ImportedModule]) -> PSCiState -> PSCiState
- updateLoadedExterns :: ([(Module, ExternsFile)] -> [(Module, ExternsFile)]) -> PSCiState -> PSCiState
- updateLets :: ([Declaration] -> [Declaration]) -> PSCiState -> PSCiState
- data Command
- data ReplQuery
- replQueries :: [ReplQuery]
- replQueryStrings :: [String]
- showReplQuery :: ReplQuery -> String
- parseReplQuery :: String -> Maybe ReplQuery
- data Directive
Documentation
data PSCiConfig Source #
The PSCI configuration.
These configuration values do not change during execution.
Constructors
| PSCiConfig | |
Fields | |
Instances
The PSCI state.
Holds a list of imported modules, loaded files, and partial let bindings. The let bindings are partial, because it makes more sense to apply the binding to the final evaluated expression.
Constructors
| PSCiState | |
Fields
| |
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.
allImportsOf :: Module -> PSCiState -> [ImportedModule] Source #
State helpers
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.
Commands
Valid Meta-commands for PSCI
Constructors
| Expression Expr | A purescript expression |
| ShowHelp | Show the help (ie, list of directives) |
| Import ImportedModule | Import a module from a loaded file |
| BrowseModule ModuleName | Browse a module |
| QuitPSCi | Exit PSCI |
| ReloadState | Reload all the imported modules of the REPL |
| ClearState | 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 Type | Find the kind of an expression |
| ShowInfo ReplQuery | Shows information about the current state of the REPL |
| PasteLines | Paste multiple lines |
Constructors
| QueryLoaded | |
| QueryImport |
replQueries :: [ReplQuery] Source #
A list of all ReplQuery values.
replQueryStrings :: [String] Source #
showReplQuery :: ReplQuery -> String Source #