&say = Seq( Param('$string') :: undef, App( Sym('&print') :: undef, Sym('$*OUT') :: undef, App( Sym('&infix:<~>') :: undef, Sym('$string') ::undef, Val("\n") :: undef, ) :: undef, ) :: undef, ) ::undef, &say = Seq( Param('$string') :: undef, App( Val( Prim( ... ) :: (handle, str -> int) ) :: undef, Val( \*STDOUT :: ??, ) :: undef, App( Val( Prim( ... ) :: (str, str -> str) ) :: undef, Sym('$string') ::undef, Val("\n") :: undef, ) :: undef, ) :: undef, ) ::undef, &say = Seq( Param('$string') :: undef, App( Val( Prim( ... ) :: (handle, str -> int) ) :: (handle, str -> int), Val( \*STDOUT :: handle, ) :: handle, App( Val( Prim( ... ) :: (str, str -> str) ) :: (str, str -> str), Sym('$string') ::undef, Val("\n") :: undef, ) :: undef, ) :: undef, ) ::undef, # type propagation &say = Seq( Param('$string') :: str, # enforced by Sym('$string') below App( Val( Prim( ... ) :: (handle, str -> int) ) :: (handle, str -> int), Val( \*STDOUT :: handle, ) :: (x -> handle) handle, App( Val( Prim( ... ) :: (str, str -> str) ) :: (str, str -> str), Sym('$string') :: str, Val("\n") :: (x -> str) undef, ) :: (x -> str) str, # from -> of the first arg ) :: (undef -> int), ) :: (undef -> int), # type unification &say = Seq( Param('$string') :: str, App( Val( Prim( ... ) :: (handle, str -> int) ) :: (handle, str -> int), Val( \*STDOUT :: handle, ) :: (x -> handle) handle, App( Val( Prim( ... ) :: (str, str -> str) ) :: (str, str -> str), Sym('$string') :: str, Val("\n") :: (x -> str) undef, ) :: str ) :: int, ) :: (str -> int),