Round-tripping objects through the FFI

The difficulty with the map is that you need to pass the map around or make it global state. My usecase is the PyTorch frontend (which could be made object-oriented instead of made purely functional to keep track of the map and prelude which is currently kept track of by indirection). Concretely tracking types:

The case is even more delicate as I’m close to (but not quite, probably) wanting checked_type as the attribute.