mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-21 11:09:50 +00:00
Fix some checkmate bad schemas
This commit is contained in:
parent
fcd733e1df
commit
b3ccc905a4
7 changed files with 125 additions and 157 deletions
|
@ -146,7 +146,7 @@ pub enum RecordFieldKind {
|
|||
}
|
||||
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
#[serde(tag = "type")]
|
||||
#[serde(tag = "type", content = "variable")]
|
||||
pub enum TagUnionExtension {
|
||||
Openness(Variable),
|
||||
Any(Variable),
|
||||
|
@ -192,7 +192,6 @@ pub enum UnificationMode {
|
|||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum Event {
|
||||
VariableEvent(VariableEvent),
|
||||
Unification {
|
||||
left: Variable,
|
||||
right: Variable,
|
||||
|
@ -200,30 +199,19 @@ pub enum Event {
|
|||
success: Option<bool>,
|
||||
subevents: Vec<Event>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
pub struct AllEvents(pub Vec<Event>);
|
||||
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
#[serde(tag = "type")]
|
||||
pub enum VariableEvent {
|
||||
Unify {
|
||||
VariableUnified {
|
||||
from: Variable,
|
||||
to: Variable,
|
||||
},
|
||||
SetDescriptor {
|
||||
VariableSetDescriptor {
|
||||
variable: Variable,
|
||||
rank: Option<Rank>,
|
||||
content: Option<Content>,
|
||||
},
|
||||
}
|
||||
|
||||
impl From<VariableEvent> for Event {
|
||||
fn from(event: VariableEvent) -> Event {
|
||||
Event::VariableEvent(event)
|
||||
}
|
||||
}
|
||||
#[derive(Serialize, JsonSchema, Debug)]
|
||||
pub struct AllEvents(pub Vec<Event>);
|
||||
|
||||
impl AllEvents {
|
||||
pub fn schema() -> RootSchema {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue