module Dry::Types::Composition

def self.included(base)

def self.included(base)
  composition_name = Inflector.demodulize(base)
  ast_type = Inflector.underscore(composition_name).to_sym
  base.define_singleton_method(:ast_type) { ast_type }
  base.define_singleton_method(:composition_name) { composition_name }
  base.const_set("Constrained", Class.new(base) { include Constrained })
end