ReplState

Struct ReplState 

Source
pub struct ReplState {
    pub stdin: ChildStdin,
    pub agda: AgdaRead,
    pub file: String,
    /* private fields */
}
Expand description

Simple REPL state wrapper.

Fields§

§stdin: ChildStdin§agda: AgdaRead§file: String

Implementations§

Source§

impl ReplState

Source

pub async fn response(&mut self) -> Result<Resp>

Await the next Agda response.

Source§

impl ReplState

Source

pub fn print_goal_list(&self)

Print all goals.

Source

pub async fn reload_file(&mut self) -> Result<()>

Source

pub async fn command(&mut self, cmd: Cmd) -> Result<()>

Source

pub async fn command_raw(&mut self, raw_command: &str) -> Result<()>

Source

pub async fn shutdown(&mut self) -> Result<()>

Source

pub async fn next_display_info(&mut self) -> Result<DisplayInfo>

Skip information until the next display info.

Source

pub fn interaction_points(&self) -> &[InteractionPoint]

Returns the latest next_goals result.

Source

pub async fn next_goals(&mut self) -> Result<()>

Skip information until the next interaction point (goal) list. The result can be queried via interaction_points.

§Note

This information normally comes right after all_goals_warnings, and when you call next_all_goals_warnings, you’ve already eliminated errors. Therefore this method don’t deal with errors.

Source

pub async fn next_error(&mut self) -> Result<AgdaError>

Skip information until an error.

Source§

impl ReplState

Source

pub async fn next_give_action(&mut self) -> NextResult<GiveAction>

Source§

impl ReplState

Source

pub async fn next_make_case(&mut self) -> NextResult<MakeCase>

Source§

impl ReplState

Source§

impl ReplState

Source§

impl ReplState

Source§

impl ReplState

Source§

impl ReplState

Source

pub async fn next_normal_form(&mut self) -> NextResult<NormalForm>

Source§

impl ReplState

Source

pub async fn next_context(&mut self) -> NextResult<Context>

Source§

impl ReplState

Source§

impl ReplState

Source

pub async fn validate_version_panicking(&mut self)

Source

pub async fn validate_version(&mut self) -> Result<()>

Validate this Agda repl.

Source§

impl ReplState

Source

pub async fn start(agda_program: &str, file: String) -> Result<Self>

Source

pub async fn from_io( stdin: ChildStdin, stdout: BufReader<ChildStdout>, file: String, ) -> Result<Self>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.