Imported from https://github.com/chrhenning/hypercl