Factor out Types.v for types-as-closures