class TypeProf::Core::AST::SigFuncType::SigTyAliasNode::SigTyUnionNode::SigTySingletonNode::SigTyInstanceNode::SigTyTupleNode::SigTyVarNode
Attributes
var[R]
Public Class Methods
new(raw_decl, lenv)
click to toggle source
Calls superclass method
TypeProf::Core::AST::Node::new
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb, line 500 def initialize(raw_decl, lenv) super(raw_decl, lenv) @var = raw_decl.name end
Public Instance Methods
attrs(= { var: })
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb, line 507 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 show "#{ @var }" end end
contravariant_vertex0(genv, changes, vtx, subst)
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb, line 514 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
covariant_vertex0(genv, changes, vtx, subst)
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb, line 509 def covariant_vertex0(genv, changes, vtx, subst) raise "unknown type variable: #{ @var }" unless subst[@var] changes.add_edge(genv, subst[@var], vtx) end
show()
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_type.rb, line 519 def show "#{ @var }" end