Module: Algebrick::Value

Includes:
Matching, TypeCheck
Included in:
Atom, ProductConstructors::Abstract
Defined in:
lib/algebrick/value.rb

Overview

Any value of Algebraic type is kind of Value

Instance Method Summary collapse

Methods included from Matching

#any, #match, #match?, #on

Methods included from TypeCheck

#Child!, #Child?, #Match!, #Match?, #Type!, #Type?

Instance Method Details

#==(other) ⇒ Object

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/algebrick/value.rb', line 21

def ==(other)
  raise NotImplementedError
end

#inspectObject



37
38
39
# File 'lib/algebrick/value.rb', line 37

def inspect
  to_s
end

#pretty_print(q) ⇒ Object

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/algebrick/value.rb', line 33

def pretty_print(q)
  raise NotImplementedError
end

#to_sObject

Raises:

  • (NotImplementedError)


29
30
31
# File 'lib/algebrick/value.rb', line 29

def to_s
  raise NotImplementedError
end

#typeObject

Raises:

  • (NotImplementedError)


25
26
27
# File 'lib/algebrick/value.rb', line 25

def type
  raise NotImplementedError
end