From c1237215eabe48391960a7709591337ac974705b Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Tue, 8 Nov 2022 13:45:24 -0600 Subject: [PATCH] Remove type Problem enum --- crates/compiler/can/src/annotation.rs | 2 +- crates/compiler/types/src/subs.rs | 8 ++------ crates/compiler/types/src/types.rs | 16 ---------------- 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/crates/compiler/can/src/annotation.rs b/crates/compiler/can/src/annotation.rs index c8e2394379..4de6e16f20 100644 --- a/crates/compiler/can/src/annotation.rs +++ b/crates/compiler/can/src/annotation.rs @@ -10,7 +10,7 @@ use roc_region::all::{Loc, Region}; use roc_types::subs::{VarStore, Variable}; use roc_types::types::{ name_type_var, AbilitySet, Alias, AliasCommon, AliasKind, AliasVar, LambdaSet, OptAbleType, - OptAbleVar, Problem, RecordField, Type, TypeExtension, + OptAbleVar, RecordField, Type, TypeExtension, }; #[derive(Clone, Debug)] diff --git a/crates/compiler/types/src/subs.rs b/crates/compiler/types/src/subs.rs index d0572618c6..50784290ec 100644 --- a/crates/compiler/types/src/subs.rs +++ b/crates/compiler/types/src/subs.rs @@ -1,7 +1,7 @@ #![deny(unsafe_op_in_unsafe_fn)] use crate::types::{ - name_type_var, AbilitySet, AliasKind, ErrorType, Polarity, Problem, RecordField, - RecordFieldsError, TypeExt, Uls, + name_type_var, AbilitySet, AliasKind, ErrorType, Polarity, RecordField, RecordFieldsError, + TypeExt, Uls, }; use roc_collections::all::{FnvMap, ImMap, ImSet, MutSet, SendMap}; use roc_collections::{VecMap, VecSet}; @@ -21,10 +21,6 @@ roc_error_macros::assert_sizeof_all!(FlatType, 3 * 8); roc_error_macros::assert_sizeof_all!(UnionTags, 12); roc_error_macros::assert_sizeof_all!(RecordFields, 2 * 8); -roc_error_macros::assert_sizeof_aarch64!(Problem, 5 * 8); -roc_error_macros::assert_sizeof_wasm!(Problem, 32); -roc_error_macros::assert_sizeof_default!(Problem, 6 * 8); - #[derive(Clone, Copy, Hash, PartialEq, Eq)] pub struct Mark(i32); diff --git a/crates/compiler/types/src/types.rs b/crates/compiler/types/src/types.rs index e03e65119f..933a26cc97 100644 --- a/crates/compiler/types/src/types.rs +++ b/crates/compiler/types/src/types.rs @@ -3301,22 +3301,6 @@ impl Alias { } } -#[derive(PartialEq, Eq, Debug, Clone, Hash)] -pub enum Problem { - CanonicalizationProblem, - CircularType(Symbol, Box, Region), - Shadowed(Region, Loc), - BadTypeArguments { - symbol: Symbol, - region: Region, - type_got: u8, - alias_needs: u8, - alias_kind: AliasKind, - }, - InvalidModule, - HasClauseIsNotAbility(Region), -} - #[derive(PartialEq, Eq, Debug, Clone)] pub enum Mismatch { TypeMismatch,