cryptol-2.2.1: Cryptol: The Language of Cryptography

Copyright(c) 2013-2015 Galois, Inc.
LicenseBSD3
Maintainercryptol@galois.com
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Cryptol.REPL.Monad

Contents

Description

 

Synopsis

REPL Monad

newtype REPL a Source

REPL_ context with InputT handling.

Constructors

REPL 

Fields

unREPL :: IORef RW -> IO a
 

runREPL :: Bool -> REPL a -> IO a Source

Run a REPL action with a fresh environment.

io :: IO a -> REPL a Source

raise :: REPLException -> REPL a Source

Raise an exception.

catch :: REPL a -> (REPLException -> REPL a) -> REPL a Source

rPutStrLn :: String -> REPL () Source

Use the configured output action to print a string with a trailing newline

rPutStr :: String -> REPL () Source

Use the configured output action to print a string

rPrint :: Show a => a -> REPL () Source

Use the configured output action to print something using its Show instance

Errors

Environment

uniqify :: QName -> REPL QName Source

Given an existing qualified name, prefix it with a relatively-unique string. We make it unique by prefixing with a character # that is not lexically valid in a module name.

getExprNames :: REPL [String] Source

Get visible variable names.

getTypeNames :: REPL [String] Source

Get visible type signature names.

data LoadedModule Source

Constructors

LoadedModule 

Fields

lName :: Maybe ModName

Focused module

lPath :: FilePath

Focused file

setLoadedMod :: LoadedModule -> REPL () Source

Set the name of the currently focused file, edited by :e and loaded via :r.

getPrompt :: REPL String Source

Construct the prompt for the current environment.

asBatch :: REPL () -> REPL () Source

Run a computation in batch mode, restoring the previous isBatch flag afterwards

getLetEnabled :: REPL Bool Source

Are let-bindings enabled in this REPL?

updateREPLTitle :: REPL () Source

Update the title

setUpdateREPLTitle :: REPL () -> REPL () Source

Set the function that will be called when updating the title

Config Options

data EnvVal Source

Instances

setUser :: String -> String -> REPL () Source

Set a user option.

getUser :: String -> REPL EnvVal Source

Get a user option, when it's known to exist. Fail with panic when it doesn't.

tryGetUser :: String -> REPL (Maybe EnvVal) Source

Get a user option, using Maybe for failure.

userOptions :: OptionMap Source

Configurable Output

getPutStr :: REPL (String -> IO ()) Source

Get the REPL's string-printer

setPutStr :: (String -> IO ()) -> REPL () Source

Set the REPL's string-printer

Smoke Test

data Smoke Source

Constructors

CVC4NotFound 

Instances