use Scalar::Util qw(blessed);
use overload(
+ '0+' => sub {
+ my $self = shift @_;
+ my $tc = $self->{__type_constraint};
+ return 0+$tc;
+ },
'""' => sub {
my $self = shift @_;
if(blessed $self) {
return "$self";
}
},
+ bool => sub { 1 },
'|' => sub {
## It's kind of ugly that we need to know about Union Types, but this