From 89304b27ea81270684810c18d3315c9d399beaf9 Mon Sep 17 00:00:00 2001 From: tslil Date: Tue, 5 May 2026 11:15:07 +0100 Subject: address remaining TODO, fix issues with left-nesting for for and ext, add motivation blurb to the readme --- src/checker_set.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/checker_set.rs') diff --git a/src/checker_set.rs b/src/checker_set.rs index 98e10ec..a00ea81 100644 --- a/src/checker_set.rs +++ b/src/checker_set.rs @@ -1,7 +1,7 @@ use crate::ast::*; use crate::checker_state::*; -use std::collections::HashMap; +use std::collections::{HashMap, HashSet}; use tracing::instrument; impl CheckerState { @@ -11,6 +11,10 @@ impl CheckerState { Set::BuiltIn(_) => Ok(set.clone()), Set::Record(fields) => { let mut ctx = self.clone(); + let field_set = fields.iter().map(|f| &f.name).collect::>(); + if field_set.len() != fields.len() { + todo!("duplicate fields"); + } let fields = fields .into_iter() .map(|Field { name, carries }| { @@ -260,7 +264,6 @@ impl CheckerState { }) } Element::Case { arms, scrutinee } => { - // TODO: do we allow mapping out of bottom? if arms.is_empty() { return Err(CheckerError::Unimplemented( "mapping out of bottom types".to_string(), -- cgit v1.3.1