class Ven::Suite::MConcreteFunction

Overview

Ven's most essential function type. It has an identity, which is provided through a set of constraints. All concrete functions have identity. All concrete functions are constrained, though MType::ANY can be used to immitate unconstraintness.

Defined in:

ven/suite/model.cr

Constructors

Instance Method Summary

Instance methods inherited from class Ven::Suite::MFunction

callable? callable?

Instance methods inherited from class Ven::Suite::MClass

callable? : Bool callable?, eqv?(other : Model) : Bool eqv?, field(name : String) : Model | Nil field, is_bool_false? : Bool is_bool_false?, of?(other : MType) : Bool
of?(other)
of?
, to_bool(inverse = false) : MBool to_bool, to_num : Num to_num, to_str : Str to_str, to_vec : Vec to_vec, true? : Bool true?, truth=(truth : Bool) truth=, truth? truth?

Constructor Detail

def self.new(tag : Ven::Suite::QTag, name : String, constraints : Array(Ven::Suite::ConstrainedParameter), body : Array(Ven::Suite::Quote), slurpy : Bool) #

[View source]

Instance Method Detail

def <=>(other : MConcreteFunction) #

Compares this function's arity with the other's arity.


[View source]
def ==(other : MConcreteFunction) #

Returns whether this function's signature is equal to other's.


[View source]
def arity : UInt8 #

[View source]
def body : Quotes #

[View source]
def constraints : ConstrainedParameters #

[View source]
def field(name) #

[View source]
def name : String #

[View source]
def params : Array(String) #

[View source]
def priority : Int32 #

[View source]
def priority? #

Computes the priority of this concrete. Priority is the sum of weights of the parameters this concrete takes (including anonymous parameters) multiplied by the amount of them.


[View source]
def slurpy : Bool #

[View source]
def tag : QTag #

[View source]
def to_s(io) #

[View source]