diff --git a/sol-eval/src/lib.rs b/sol-eval/src/lib.rs index 6f7c38c..301ac39 100644 --- a/sol-eval/src/lib.rs +++ b/sol-eval/src/lib.rs @@ -56,11 +56,7 @@ pub fn hir_eval( Using(_) => todo!(), Command(_) => todo!(), BindingGroup(_) => todo!(), - ClassDecl(_) => todo!(), - InstanceDecl(_) => todo!(), - TraitDecl(_) => todo!(), Inductive(_) => todo!(), - TypeDecl(_) => todo!(), } } todo!() diff --git a/sol-hir-lowering/src/lib.rs b/sol-hir-lowering/src/lib.rs index 993df7a..d463517 100644 --- a/sol-hir-lowering/src/lib.rs +++ b/sol-hir-lowering/src/lib.rs @@ -32,8 +32,8 @@ use sol_hir::{ expr::{AbsExpr, AnnExpr, CallExpr, CallKind, Callee, Expr}, pattern::{BindingPattern, Pattern}, top_level::{ - BindingGroup, ClassDecl, Clause, CommandTopLevel, Constructor, ConstructorKind, - Inductive, InstanceDecl, Signature, TopLevel, TraitDecl, TypeDecl, UsingTopLevel, + BindingGroup, Clause, CommandTopLevel, Constructor, ConstructorKind, Inductive, + Signature, TopLevel, UsingTopLevel, }, type_rep::{AppTypeRep, ArrowKind, ArrowTypeRep, TypeRep}, DefaultWithDb, HirPath, HirSource, Identifier, Location, OptionExt, Spanned, @@ -54,7 +54,7 @@ pub trait HirLoweringDb: HirDb + DbWithJar {} impl HirLoweringDb for T where T: HirDb + DbWithJar {} #[rustfmt::skip] -type SyntaxDecl<'tree> = sol_syntax::anon_unions::ClassDecl_Clause_Command_DataDecl_InstanceDecl_Signature_TraitDecl_TypeDecl_Using<'tree>; +type SyntaxDecl<'tree> = sol_syntax::anon_unions::Clause_Command_Inductive_Signature_Using<'tree>; #[rustfmt::skip] type SyntaxIdentifier<'tree> = sol_syntax::anon_unions::SimpleIdentifier_SymbolIdentifier<'tree>; @@ -303,7 +303,7 @@ impl<'db, 'tree> HirLowering<'db, 'tree> { let type_rep = tree .clause_type() .flatten() - .map(|node| this.clause_type(node)) + .map(|node| this.type_expr(node)) .unwrap_or_default_with_db(db); // Solve the variants within the current scope @@ -534,7 +534,7 @@ impl<'db, 'tree> HirLowering<'db, 'tree> { let type_rep = tree .clause_type() .flatten() - .map(|node| this.clause_type(node)) + .map(|node| this.type_expr(node)) .unwrap_or_default_with_db(db); let signature = Signature::new( diff --git a/sol-hir-lowering/src/term.rs b/sol-hir-lowering/src/term.rs index e0be445..0441a77 100644 --- a/sol-hir-lowering/src/term.rs +++ b/sol-hir-lowering/src/term.rs @@ -26,14 +26,6 @@ type SyntaxExpr<'tree> = sol_syntax::anon_unions::AnnExpr_AppExpr_BinaryExpr_For type SyntaxTypeRep<'tree> = sol_syntax::anon_unions::AnnExpr_BinaryExpr_ForallExpr_LamExpr_MatchExpr_PiExpr_Primary_SigmaExpr_TypeAppExpr<'tree>; impl HirLowering<'_, '_> { - /// Resolves a clause type for GADTs, and other things that are not expressions but are - /// type level expressions. - pub fn clause_type(&mut self, clause: sol_syntax::ClauseType) -> TypeRep { - clause - .clause_type() - .solve(self, |this, node| this.type_expr(node)) - } - /// Resolves a type level expression. /// /// It does use the type level of expressions to resolve syntax diff --git a/sol-js/src/lib.rs b/sol-js/src/lib.rs index 8dc8697..f6d0ca9 100644 --- a/sol-js/src/lib.rs +++ b/sol-js/src/lib.rs @@ -70,11 +70,7 @@ pub fn transform_top_level( generator: false, is_async: false, }))), - TopLevel::ClassDecl(_) => bail!("class declarations are not supported"), - TopLevel::InstanceDecl(_) => bail!("instance declarations are not supported"), - TopLevel::TraitDecl(_) => bail!("trait declarations are not supported"), TopLevel::Inductive(_) => bail!("data declarations are not supported"), - TopLevel::TypeDecl(_) => bail!("type declarations are not supported"), } } diff --git a/sol-syntax/src/lib.rs b/sol-syntax/src/lib.rs index 4091d06..80f5b46 100644 --- a/sol-syntax/src/lib.rs +++ b/sol-syntax/src/lib.rs @@ -1,4 +1,5 @@ #![feature(trait_upcasting)] +#![allow(incomplete_features)] #[allow(clippy::all)] #[allow(unused_variables)]