change env to bind arbitrary types instead of only record types, wip