abstract class Savi::Compiler::TInfer::Info
- Savi::Compiler::TInfer::Info
- Reference
- Object
Direct Known Subclasses
- Savi::Compiler::TInfer::Consume
- Savi::Compiler::TInfer::DynamicInfo
- Savi::Compiler::TInfer::ErrorInfo
- Savi::Compiler::TInfer::FromAssign
- Savi::Compiler::TInfer::FromYield
- Savi::Compiler::TInfer::JumpInfo
- Savi::Compiler::TInfer::RecoverUnsafe
- Savi::Compiler::TInfer::Sequence
Defined in:
savi/compiler/t_infer/info.crInstance Method Summary
- #add_downstream(use_pos : Source::Pos, info : Info)
-
#add_peer_hint(peer : Info)
Most Info types ignore hints, but a few override this method to see them, or to pass them along to other nodes that may wish to see them.
- #as_conduit? : Conduit | Nil
-
#as_downstream_constraint_meta_type(ctx : Context, type_check : TTypeCheck::ForReifiedFunc) : MetaType | Nil
In the rare case that an Info subclass needs to dynamically pretend to be a different downstream constraint, it can override this method.
-
#as_multiple_downstream_constraints(ctx : Context, type_check : TTypeCheck::ForReifiedFunc) : Array(Tuple(Source::Pos, MetaType)) | Nil
In the rare case that an Info subclass needs to dynamically pretend to be multiple different downstream constraints, it can override this method.
- #as_upstream_conduits : Array(Conduit)
- #layer_index : Int32
- #layer_index=(layer_index : Int32)
- #layer_index? : Int32 | Nil
- #override_describe_kind : String | Nil
- #override_describe_kind=(override_describe_kind : String | Nil)
- #pos : Source::Pos
- #pos=(pos : Source::Pos)
- #resolve_span!(ctx : Context, infer : Visitor)
- #tether_resolve_span(ctx : Context, infer : Visitor)
- #tether_terminal?
- #tether_upward_transform_span(ctx : Context, infer : Visitor, span : Span) : Span
- #tethers(querent : Info) : Array(Tether)
-
#to_s
Returns a nicely readable and concise string representation of this object, typically intended for users.
Instance Method Detail
Most Info types ignore hints, but a few override this method to see them, or to pass them along to other nodes that may wish to see them.
In the rare case that an Info subclass needs to dynamically pretend to be a different downstream constraint, it can override this method. If you need to report multiple positions, also override the other method below called as_multiple_downstream_constraints. This will prevent upstream DynamicInfos from eagerly resolving you.
In the rare case that an Info subclass needs to dynamically pretend to be multiple different downstream constraints, it can override this method. This is only used to report positions in more detail, and it is expected that the intersection of all MetaTypes here is the same as the resolve.
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.