class TypeProf::Core::AST::SigFuncType::SigTyAliasNode::SigTyUnionNode::SigTyIntersectionNode::SigTySingletonNode::SigTyInstanceNode::SigTyTupleNode::SigTyRecordNode::SigTyVarNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 809 def initialize(raw_decl, lenv) super(raw_decl, lenv) @var = raw_decl.name end
Calls superclass method
TypeProf::Core::AST::Node::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 816 def attrs = { var: } def covariant_vertex0(genv, changes, vtx, subst) raise "unknown type variable: #{ @var }" unless subst[@var] changes.add_edge(genv, subst[@var], vtx) end def contravariant_vertex0(genv, changes, vtx, subst) raise "unknown type variable: #{ @var }" unless subst[@var] changes.add_edge(genv, Source.new(Type::Var.new(genv, @var, subst[@var])), vtx) end def typecheck(genv, changes, vtx, subst) changes.add_edge(genv, vtx.new_vertex(genv, self), subst[@var]) unless vtx == subst[@var] true end def show "#{ @var }" end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 823 def contravariant_vertex0(genv, changes, vtx, subst) raise "unknown type variable: #{ @var }" unless subst[@var] changes.add_edge(genv, Source.new(Type::Var.new(genv, @var, subst[@var])), vtx) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 818 def covariant_vertex0(genv, changes, vtx, subst) raise "unknown type variable: #{ @var }" unless subst[@var] changes.add_edge(genv, subst[@var], vtx) end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 833 def show "#{ @var }" end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_type.rb, line 828 def typecheck(genv, changes, vtx, subst) changes.add_edge(genv, vtx.new_vertex(genv, self), subst[@var]) unless vtx == subst[@var] true end