pub enum Cmd {
Show 36 variants
Load {
path: String,
flags: Vec<String>,
},
Compile {
backend: String,
path: String,
flags: Vec<String>,
},
Constraints,
Metas,
ShowModuleContentsToplevel {
rewrite: Rewrite,
search: String,
},
SearchAboutToplevel {
rewrite: Rewrite,
search: String,
},
SolveAll(Rewrite),
SolveOne(InputWithRewrite),
AutoOne(GoalInput),
AutoAll,
InferToplevel {
rewrite: Rewrite,
code: String,
},
ComputeToplevel {
compute_mode: ComputeMode,
code: String,
},
LoadHighlightingInfo {
path: String,
},
TokenHighlighting {
path: String,
remove: Remove,
},
Highlight(GoalInput),
ShowImplicitArgs(bool),
ToggleImplicitArgs,
Give {
force: UseForce,
input: GoalInput,
},
Refine(GoalInput),
Intro {
dunno: bool,
input: GoalInput,
},
RefineOrIntro {
dunno: bool,
input: GoalInput,
},
Context(InputWithRewrite),
HelperFunction(InputWithRewrite),
Infer(InputWithRewrite),
GoalType(InputWithRewrite),
ElaborateGive(InputWithRewrite),
GoalTypeContext(InputWithRewrite),
GoalTypeContextInfer(InputWithRewrite),
GoalTypeContextCheck(InputWithRewrite),
ShowModuleContents(InputWithRewrite),
MakeCase(GoalInput),
Compute {
compute_mode: ComputeMode,
input: GoalInput,
},
WhyInScope(GoalInput),
WhyInScopeToplevel(String),
ShowVersion,
Abort,
}
Variants§
Load
Loads the module in file path
, using
flags
as the command-line options.
Compile
Compiles the module in file path
using
the backend backend
, using flags
as the command-line options.
Constraints
Metas
Show unsolved metas. If there are no unsolved metas but unsolved constraints, show those instead.
ShowModuleContentsToplevel
Shows all the top-level names in the given module, along with their types. Uses the top-level scope.
SearchAboutToplevel
Shows all the top-level names in scope which mention all the given identifiers in their type.
SolveAll(Rewrite)
Solve all goals whose values are determined by the constraints.
SolveOne(InputWithRewrite)
Solve the goal at point whose value is determined by the constraints.
AutoOne(GoalInput)
Solve the goal at point by using Auto.
AutoAll
Solve all goals by using Auto.
InferToplevel
Parse the given expression (as if it were defined at the
ComputeToplevel
Parse and type check the given expression (as if it were defined at the top-level of the current module) and normalise it.
LoadHighlightingInfo
loads syntax highlighting
information for the module in path
, and asks Emacs to apply
highlighting info from this file.
If the module does not exist, or its module name is malformed or cannot be determined, or the module has not already been visited, or the cached info is out of date, then no highlighting information is printed.
This command is used to load syntax highlighting information when a new file is opened, and it would probably be annoying if jumping to the definition of an identifier reset the proof state, so this command tries not to do that. One result of this is that the command uses the current include directories, whatever they happen to be.
TokenHighlighting
Tells Agda to compute token-based highlighting information for the file.
This command works even if the file’s module name does not match its location in the file system, or if the file is not scope-correct. Furthermore no file names are put in the generated output. Thus it is fine to put source code into a temporary file before calling this command. However, the file extension should be correct.
If the second argument is ‘Remove’, then the (presumably temporary) file is removed after it has been read.
Highlight(GoalInput)
Tells Agda to compute highlighting information for the expression just spliced into an interaction point.
ShowImplicitArgs(bool)
Tells Agda whether or not to show implicit arguments.
ToggleImplicitArgs
Toggle display of implicit arguments.
Give
If the range is ‘noRange’, then the string comes from the minibuffer rather than the goal.
Refine(GoalInput)
Intro
RefineOrIntro
Context(InputWithRewrite)
HelperFunction(InputWithRewrite)
Infer(InputWithRewrite)
GoalType(InputWithRewrite)
ElaborateGive(InputWithRewrite)
Grabs the current goal’s type and checks the expression in the hole against it. Returns the elaborated term.
GoalTypeContext(InputWithRewrite)
Displays the current goal and context.
GoalTypeContextInfer(InputWithRewrite)
Displays the current goal and context and infers the type of an expression.
GoalTypeContextCheck(InputWithRewrite)
Grabs the current goal’s type and checks the expression in the hole against it
ShowModuleContents(InputWithRewrite)
Shows all the top-level names in the given module, along with their types. Uses the scope of the given goal.
MakeCase(GoalInput)
Compute
WhyInScope(GoalInput)
WhyInScopeToplevel(String)
ShowVersion
Displays version of the running Agda
Abort
Abort the current computation. Does nothing if no computation is in progress.
Implementations§
Source§impl Cmd
impl Cmd
pub fn load_simple(path: String) -> Self
Sourcepub fn goal_type(input: GoalInput) -> Self
pub fn goal_type(input: GoalInput) -> Self
Produces CurrentGoal.
pub fn context(input: GoalInput) -> Self
pub fn split(input: GoalInput) -> Self
pub fn search_module(search: String) -> Self
Sourcepub fn infer(input: GoalInput) -> Self
pub fn infer(input: GoalInput) -> Self
Produces InferredType.
pub fn give(input: GoalInput) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Cmd
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnwindSafe for Cmd
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more