2 # utility to convert a string representing an ocaml type to a string representing the Tast type construct
3 # currently does only very very simple types, and makes a lot of assumptions
12 'string' => 'TyArray TyChar',
22 return "TyArray " . do_base
($1)
24 elsif (exists $typesub{$_})
40 return 'TyTuple [' . join('; ', map { do_base
$_ } @t) . ']';
55 my @args = map { do_tuple
$_ } @t;
56 return 'TyFun ([' . join('; ', @args) . '], ' . do_tuple
($ret) . ')';
60 return do_tuple
@t[0];
67 s/\s//g; # it just gets in the way, and we don't support constructed types
73 $_ = "let $a = TyVar (new_symbol_string \"$a\") in $_";
81 print make_type
("@ARGV"), "\n";
88 print make_type
($_), "\n";