use serde::Deserialize;
use crate::base::TokenBased;
use crate::pos::InteractionPoint;
pub use self::di::*;
pub use self::give::*;
pub use self::goal::*;
pub use self::hl::*;
pub use self::oc::*;
mod di;
mod give;
mod goal;
mod hl;
mod oc;
#[serde(rename_all = "camelCase")]
#[derive(Deserialize, Clone, Debug, Eq, PartialEq)]
pub struct MakeCase {
pub variant: MakeCaseVariant,
pub interaction_point: InteractionPoint,
pub clauses: Vec<String>,
}
#[serde(rename_all = "camelCase")]
#[derive(Deserialize, Clone, Default, Debug, Eq, PartialEq, Hash)]
pub struct Status {
pub show_implicit_arguments: bool,
pub checked: bool,
}
#[derive(Deserialize, Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub enum MakeCaseVariant {
Function,
ExtendedLambda,
}
#[serde(rename_all = "camelCase")]
#[derive(Deserialize, Clone, Debug, Eq, PartialEq)]
pub struct OneSolution {
pub interaction_point: InteractionPoint,
pub expression: String,
}
#[serde(tag = "kind")]
#[derive(Deserialize, Clone, Debug, Eq, PartialEq)]
pub enum Resp {
HighlightingInfo(HighlightingInfo),
Status {
status: Status,
},
JumpToError {
filepath: String,
position: i32,
},
InteractionPoints {
#[serde(rename = "interactionPoints")]
interaction_points: Vec<InteractionPoint>,
},
GiveAction(GiveAction),
MakeCase(MakeCase),
SolveAll {
solutions: Vec<OneSolution>,
},
DisplayInfo {
info: Option<DisplayInfo>,
},
RunningInfo {
#[serde(rename = "debugLevel")]
debug_level: i32,
message: String,
},
ClearRunningInfo,
ClearHighlighting {
#[serde(rename = "tokenBased")]
token_based: TokenBased,
},
DoneAborting,
}