struct Savi::Compiler::TInfer::MetaType
- Savi::Compiler::TInfer::MetaType
- Struct
- Value
- Object
Defined in:
savi/compiler/t_infer/meta_type.crConstructors
- .new(defn : ReifiedType)
- .new(defn : ReifiedTypeAlias)
- .new(inner : Savi::Compiler::TInfer::MetaType::AntiNominal | Savi::Compiler::TInfer::MetaType::Intersection | Savi::Compiler::TInfer::MetaType::Nominal | Savi::Compiler::TInfer::MetaType::Unconstrained | Savi::Compiler::TInfer::MetaType::Union | Savi::Compiler::TInfer::MetaType::Unsatisfiable)
Class Method Summary
- .new_alias(defn : ReifiedTypeAlias)
- .new_intersection(types : Iterable(MetaType))
- .new_nominal(defn : ReifiedType)
- .new_type_param(defn : TypeParam)
- .new_union(types : Iterable(MetaType))
- .unconstrained
- .unsatisfiable
Instance Method Summary
- #&(other : MetaType)
- #-
- #|(other : MetaType)
- #any_callable_func_defn_type(ctx, name : String) : ReifiedType | Nil
- #any_type_alias_in_first_layer?
- #each_reachable_defn(ctx : Context) : Array(ReifiedType)
- #each_type_alias_in_first_layer(&block : ReifiedTypeAlias -> _)
- #find_callable_func_defns(ctx : Context, name : String) : Set(Tuple(MetaType, ReifiedType | Nil, Program::Function | Nil))
- #gather_call_receiver_span(ctx : Context, pos : Source::Pos, infer : Visitor | Nil, name : String) : Span
- #inner : Inner
- #intersect(other : MetaType)
- #map_each_intersection_term(&block : MetaType -> T) forall T
- #map_each_union_member(&block : MetaType -> T) forall T
- #negate
-
#satisfies_bound?(ctx : Context, other : MetaType)
Return true if this MetaType is a satisfies the other MetaType as a type parameter bound/constraint.
- #show_type
- #simplify(ctx : Context) : MetaType
- #single!
- #single? : Nominal | Nil
- #single_rt?
- #single_rt_or_rta!
- #single_rt_or_rta?
- #singular?
- #substitute_each_type_alias_in_first_layer(&block : ReifiedTypeAlias -> MetaType)
- #substitute_type_params(type_params : Array(TypeParam), type_args : Array(MetaType)) : MetaType
-
#subtype_of?(ctx : Context, other : MetaType)
Return true if this MetaType is a subtype of the other MetaType.
- #type_param_only?
- #type_params : Set(TypeParam)
- #unconstrained?
- #unite(other : MetaType)
- #unsatisfiable?
- #with_additional_type_arg!(arg : MetaType) : MetaType
- #within_constraints?(ctx : Context, types : Iterable(MetaType))
Constructor Detail
def self.new(inner : Savi::Compiler::TInfer::MetaType::AntiNominal | Savi::Compiler::TInfer::MetaType::Intersection | Savi::Compiler::TInfer::MetaType::Nominal | Savi::Compiler::TInfer::MetaType::Unconstrained | Savi::Compiler::TInfer::MetaType::Union | Savi::Compiler::TInfer::MetaType::Unsatisfiable)
#
Class Method Detail
Instance Method Detail
def find_callable_func_defns(ctx : Context, name : String) : Set(Tuple(MetaType, ReifiedType | Nil, Program::Function | Nil))
#
def gather_call_receiver_span(ctx : Context, pos : Source::Pos, infer : Visitor | Nil, name : String) : Span
#
Return true if this MetaType is a satisfies the other MetaType as a type parameter bound/constraint.
def substitute_type_params(type_params : Array(TypeParam), type_args : Array(MetaType)) : MetaType
#
Return true if this MetaType is a subtype of the other MetaType.