struct Savi::Compiler::TInfer::MetaType

Defined in:

savi/compiler/t_infer/meta_type.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(defn : ReifiedType) #

[View source]
def self.new(defn : ReifiedTypeAlias) #

[View source]

[View source]

Class Method Detail

def self.new_alias(defn : ReifiedTypeAlias) #

[View source]
def self.new_intersection(types : Iterable(MetaType)) #

[View source]
def self.new_nominal(defn : ReifiedType) #

[View source]
def self.new_type_param(defn : TypeParam) #

[View source]
def self.new_union(types : Iterable(MetaType)) #

[View source]
def self.unconstrained #

[View source]
def self.unsatisfiable #

[View source]

Instance Method Detail

def &(other : MetaType) #

[View source]
def - #

[View source]
def |(other : MetaType) #

[View source]
def any_callable_func_defn_type(ctx, name : String) : ReifiedType | Nil #

[View source]
def any_type_alias_in_first_layer? #

[View source]
def each_reachable_defn(ctx : Context) : Array(ReifiedType) #

[View source]
def each_type_alias_in_first_layer(&block : ReifiedTypeAlias -> _) #

[View source]
def find_callable_func_defns(ctx : Context, name : String) : Set(Tuple(MetaType, ReifiedType | Nil, Program::Function | Nil)) #

[View source]
def gather_call_receiver_span(ctx : Context, pos : Source::Pos, infer : Visitor | Nil, name : String) : Span #

[View source]
def inner : Inner #

[View source]
def intersect(other : MetaType) #

[View source]
def map_each_intersection_term(&block : MetaType -> T) forall T #

[View source]
def map_each_union_member(&block : MetaType -> T) forall T #

[View source]
def negate #

[View source]
def satisfies_bound?(ctx : Context, other : MetaType) #

Return true if this MetaType is a satisfies the other MetaType as a type parameter bound/constraint.


[View source]
def show_type #

[View source]
def simplify(ctx : Context) : MetaType #

[View source]
def single! #

[View source]
def single? : Nominal | Nil #

[View source]
def single_rt? #

[View source]
def single_rt_or_rta! #

[View source]
def single_rt_or_rta? #

[View source]
def singular? #

[View source]
def substitute_each_type_alias_in_first_layer(&block : ReifiedTypeAlias -> MetaType) #

[View source]
def substitute_type_params(type_params : Array(TypeParam), type_args : Array(MetaType)) : MetaType #

[View source]
def subtype_of?(ctx : Context, other : MetaType) #

Return true if this MetaType is a subtype of the other MetaType.


[View source]
def type_param_only? #

[View source]
def type_params : Set(TypeParam) #

[View source]
def unconstrained? #

[View source]
def unite(other : MetaType) #

[View source]
def unsatisfiable? #

[View source]
def with_additional_type_arg!(arg : MetaType) : MetaType #

[View source]
def within_constraints?(ctx : Context, types : Iterable(MetaType)) #

[View source]