| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Language::MinCaml::Type; |
|
2
|
6
|
|
|
6
|
|
813
|
use strict; |
|
|
6
|
|
|
|
|
12
|
|
|
|
6
|
|
|
|
|
230
|
|
|
3
|
6
|
|
|
6
|
|
33
|
use base qw(Class::Accessor::Fast Exporter); |
|
|
6
|
|
|
|
|
11
|
|
|
|
6
|
|
|
|
|
4477
|
|
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors(qw(kind children)); |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @EXPORT = qw(Type_Unit Type_Bool Type_Int Type_Float Type_Tuple |
|
8
|
|
|
|
|
|
|
Type_Array Type_Var Type_Fun); |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
for my $routine_name (@EXPORT){ |
|
11
|
|
|
|
|
|
|
my $routine; |
|
12
|
|
|
|
|
|
|
my $kind = $routine_name; |
|
13
|
|
|
|
|
|
|
$kind =~ s/^Type_//; |
|
14
|
0
|
|
|
0
|
|
0
|
$routine = sub { __PACKAGE__->new($kind, @_); }; |
|
15
|
6
|
|
|
6
|
|
8547
|
no strict 'refs'; |
|
|
6
|
|
|
|
|
21
|
|
|
|
6
|
|
|
|
|
630
|
|
|
16
|
|
|
|
|
|
|
*{$routine_name} = $routine; |
|
17
|
|
|
|
|
|
|
} |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
|
20
|
1
|
|
|
1
|
1
|
8
|
my($class, $kind, @children) = @_; |
|
21
|
1
|
|
|
|
|
7
|
return bless { kind => $kind, children => \@children }, $class; |
|
22
|
|
|
|
|
|
|
} |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |