cryptol-3.3.0: Cryptol: The Language of Cryptography
Copyright(c) 2013-2016 Galois Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

REPL.Haskeline

Description

 
Synopsis

Documentation

data ReplMode Source #

Constructors

InteractiveRepl

Interactive terminal session

Batch FilePath

Execute from a batch file

InteractiveBatch FilePath

Execute from a batch file, but behave as though lines are entered in an interactive session.

Instances

Instances details
Show ReplMode Source # 
Instance details

Defined in REPL.Haskeline

Eq ReplMode Source # 
Instance details

Defined in REPL.Haskeline

crySession :: ReplMode -> Bool -> REPL CommandResult Source #

One REPL invocation, either from a file or from the terminal.

repl Source #

Arguments

:: Cryptolrc 
-> Maybe Config 
-> LoadProjectMode

refresh project

-> ReplMode 
-> Bool 
-> Bool 
-> REPL () 
-> IO CommandResult 

Haskeline-specific repl implementation.

setHistoryFile :: Settings REPL -> IO (Settings REPL) Source #

Try to set the history file.

replSettings :: Bool -> Settings REPL Source #

Haskeline settings for the REPL.

data Cryptolrc Source #

Configuration of .cryptolrc file behavior. The default option searches the following locations in order, and evaluates the first file that exists in batch mode on interpreter startup:

  1. $PWD/.cryptolrc
  2. $HOME/.cryptolrc

If files are specified, they will all be evaluated, but none of the default files will be (unless they are explicitly specified).

The disabled option inhibits any reading of any .cryptolrc files.

Instances

Instances details
Show Cryptolrc Source # 
Instance details

Defined in REPL.Haskeline

shouldSetREPLTitle :: REPL Bool Source #

In certain environments like Emacs, we shouldn't set the terminal title. Note: this does not imply we can't use color output. We can use ANSI color sequences in places like Emacs, but not terminal codes.

This checks that stdout is a proper terminal handle, and that the terminal mode is not dumb, which is set by Emacs and others.

canDisplayColor :: REPL Bool Source #

Whether we can display color titles. This checks that stdout is a proper terminal handle, and that the terminal mode is not dumb, which is set by Emacs and others.

cryptolCommand :: CompletionFunc REPL Source #

Completion for cryptol commands.

cmdComp :: String -> CommandDescr -> [Completion] Source #

Generate completions from a REPL command definition.

cmdArgument :: CommandBody -> CompletionFunc REPL Source #

Dispatch to a completion function based on the kind of completion the command is expecting.

keywords :: [String] Source #

Additional keywords to suggest in the REPL autocompletion list.

completeExpr :: CompletionFunc REPL Source #

Complete a name from the expression environment.

completeType :: CompletionFunc REPL Source #

Complete a name from the type synonym environment.

completeHelp :: CompletionFunc REPL Source #

Complete a name for which we can show REPL help documentation.

completeModName :: CompletionFunc REPL Source #

Complete a name from the list of loaded modules.

nameComp :: String -> String -> Completion Source #

Generate a completion from a prefix and a name.

takeIdent :: String -> String Source #

Return longest identifier (possibly a qualified name) that is a prefix of the given string

(+++) :: CompletionFunc REPL -> CompletionFunc REPL -> CompletionFunc REPL Source #

Join two completion functions together, merging and sorting their results.

completeOption :: CompletionFunc REPL Source #

Complete an option from the options environment.

XXX this can do better, as it has access to the expected form of the value