Is there a way to get human-readable descriptions for types?

I’m writing a CLI tool, and want to use dry-types to check parameters/options.

I’d really like to include type hints in generated help, too. To that end, is there a nice way to get a human-readable summary of a type?

I tried #to_s, but it’s not really what I’m after

string_type = Types::String
flavour_type = Types::String.enum('chocolate','strawberry','banana')

#=> "#<Dry::Types[Constrained<Nominal<String> rule=[type?(String)]>]>"

#=> "#<Dry::Types[Enum<Constrained<Nominal<String> rule=[type?(String) AND included_in?([\"chocolate\", \"strawberry\", \"banana\"])]> values={\"chocolate\", \"strawberry\", \"banana\"}>]>"

What I’m really after is:

#=> "String"

#=> "chocolate|strawberry|banana"

You could implement a custom pretty-printer similar to what we have in Dry::Types::Printer.