Copyright | disco team and contributors |
---|---|
License | BSD-3-Clause |
Maintainer | byorgey@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Defining and dispatching all commands/functionality available at the REPL prompt.
Synopsis
- dispatch :: Members DiscoEffects r => REPLCommands -> SomeREPLExpr -> Sem r ()
- discoCommands :: REPLCommands
- handleLoad :: Members (Error DiscoError ': (State TopInfo ': (Output (Message ()) ': (Embed IO ': EvalEffects)))) r => FilePath -> Sem r Bool
- loadFile :: Members '[Output (Message ann), Embed IO] r => FilePath -> Sem r (Maybe String)
- parseLine :: REPLCommands -> ExtSet -> String -> Either String SomeREPLExpr
Documentation
dispatch :: Members DiscoEffects r => REPLCommands -> SomeREPLExpr -> Sem r () Source #
Given a list of REPL commands and something typed at the REPL, pick the first command with a matching type-level tag and run its associated action.
discoCommands :: REPLCommands Source #
The list of all commands that can be used at the REPL. Resolution of REPL commands searches this list in order, which means ambiguous command prefixes (e.g. :t for :type) are resolved to the first matching command.
handleLoad :: Members (Error DiscoError ': (State TopInfo ': (Output (Message ()) ': (Embed IO ': EvalEffects)))) r => FilePath -> Sem r Bool Source #