MetaKlaim: a Type Safe Multi-stage Language for Global Computing