Revision history for MooseX-Types-Structured
+0.09 07 March 2009
+ - I guess we don't support the "subtype MyType, [TypeConstraint]" syntax
+ anymore. Changed the recursion test to reflect that, which should fix
+ my 100% fail rate :)
0.08 06 March 2009
- New Feature: slurpy method for when you want a structured type
constraint that allows trailing arguments of indeterminate length.
use MooseX::Types -declare => [qw(Dict Tuple Optional)];
use Sub::Exporter -setup => { exports => [ qw(Dict Tuple Optional slurpy) ] };
-our $VERSION = '0.08';
+our $VERSION = '0.09';
our $AUTHORITY = 'cpan:JJNAPIORK';
=head1 NAME
subtype Var() => as ScalarRef;
subtype Const() => as Int | Str;
- subtype Pair() => Tuple[ Expr, Expr ];
+ subtype Pair() => as Tuple[ Expr, Expr ];
enum Op() => qw[ + - ];
- subtype BinOp() => Tuple[ Expr, Op, Expr ];
- subtype Lambda() => Tuple[ Var, Expr ];
- subtype App() => Tuple[ Lambda, Expr ];
+ subtype BinOp() => as Tuple[ Expr, Op, Expr ];
+ subtype Lambda() => as Tuple[ Var, Expr ];
+ subtype App() => as Tuple[ Lambda, Expr ];
subtype Expr() => as Var | Const | Pair | BinOp | Lambda | App;
sub match {