From 7e9a41f578be2ec2de13fdd512df37884e514e10 Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Mon, 30 Nov 2020 17:33:49 +0000 Subject: Change type check infrastructure --- src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 2e5532c..7c4babd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,4 @@ -use chomp::{ - ast::typed::{FlastContext, Type}, - nibble::File, -}; +use chomp::{ast::TypeCheck, nibble::File}; use proc_macro2::Span; use std::{ error::Error, @@ -17,9 +14,9 @@ fn main() { .map_err(|e| Box::new(e) as Box) .and_then(|_| syn::parse_str(&input).map_err(|e| Box::new(e) as Box)) .and_then(|nibble: File| { - nibble - .convert_with_substitution() - .well_typed(&mut FlastContext::new()) + dbg!(nibble + .convert_with_substitution()) + .fold(&mut TypeCheck::new()) .map_err(|e| Box::new(e) as Box) }) .map(|(typed, _)| typed.emit_code(Ident::new("Ast", Span::call_site()))) -- cgit v1.2.3