diff options
| author | tslil <tslil@posteo.de> | 2026-05-06 14:27:43 +0100 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-05-06 20:40:27 +0100 |
| commit | d682ad6bbb5547ffbcc19da90275ff43e4e03e20 (patch) | |
| tree | 43dc3bb60d0f65793e3a17fcf867ece0ff09ab8b /src/ast.rs | |
| parent | 1b4abb8fdd81f6de2166ef3f064a77fd5622fe83 (diff) | |
WiP
Diffstat (limited to 'src/ast.rs')
| -rw-r--r-- | src/ast.rs | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -68,6 +68,9 @@ pub enum Signature { #[display("Set")] Set, + #[display("⟨{_0}⟩")] + FromSet(Set), + #[display("theory {{ {} }}", _0.iter().map(|f| f.to_string()).collect::<Vec<_>>().join(" , "))] Theory(Vec<Field<Signature>>), @@ -126,7 +129,7 @@ pub enum Element { element: Box<Element>, }, - #[display("case {} of {{ {} }}", scrutinee, arms.iter().map(|a| a.to_string()).collect::<Vec<_>>().join(" | "))] + #[display("case {scrutinee} of [ {} ]", arms.iter().map(|a| a.to_string()).collect::<Vec<_>>().join(" | "))] Case { scrutinee: Box<Element>, arms: Vec<CaseArm<Element>>, @@ -147,6 +150,9 @@ pub enum Instance { #[display("({_0} :: Set)")] SetCoerce(Box<Set>), + #[display("⟨{_0}⟩")] + ElementCoerce(Element), + #[display("{_0}")] Var(String), @@ -171,7 +177,7 @@ pub enum Instance { field: String, }, - #[display("case {} of [ {} ]", scrutinee, arms.iter().map(|a| a.to_string()).collect::<Vec<_>>().join(" | "))] + #[display("case {scrutinee} of [ {} ]", arms.iter().map(|a| a.to_string()).collect::<Vec<_>>().join(" | "))] Case { scrutinee: Box<Element>, arms: Vec<CaseArm<Instance>>, |
