From d682ad6bbb5547ffbcc19da90275ff43e4e03e20 Mon Sep 17 00:00:00 2001 From: tslil Date: Wed, 6 May 2026 14:27:43 +0100 Subject: WiP --- src/ast.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/ast.rs') diff --git a/src/ast.rs b/src/ast.rs index e254c65..24c7125 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -68,6 +68,9 @@ pub enum Signature { #[display("Set")] Set, + #[display("⟨{_0}⟩")] + FromSet(Set), + #[display("theory {{ {} }}", _0.iter().map(|f| f.to_string()).collect::>().join(" , "))] Theory(Vec>), @@ -126,7 +129,7 @@ pub enum Element { element: Box, }, - #[display("case {} of {{ {} }}", scrutinee, arms.iter().map(|a| a.to_string()).collect::>().join(" | "))] + #[display("case {scrutinee} of [ {} ]", arms.iter().map(|a| a.to_string()).collect::>().join(" | "))] Case { scrutinee: Box, arms: Vec>, @@ -147,6 +150,9 @@ pub enum Instance { #[display("({_0} :: Set)")] SetCoerce(Box), + #[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::>().join(" | "))] + #[display("case {scrutinee} of [ {} ]", arms.iter().map(|a| a.to_string()).collect::>().join(" | "))] Case { scrutinee: Box, arms: Vec>, -- cgit v1.3.1