Module: Algebrick::Types

Included in:
Algebrick, Serializers2
Defined in:
lib/algebrick/types.rb

Overview

noinspection RubyConstantNamingConvention

Constant Summary

Maybe =
Algebrick.type(:v) do
  variants None = atom,
           Some = type(:v) { fields :v }
end
Boolean =
Algebrick.type do
  variants TrueClass, FalseClass
end
LinkedList =
Algebrick.type(:value_type) do |list|
  fields! value: :value_type, next: list
  variants EmptyLinkedList = atom, list
end