Complete foreign function wrapper for Bits convenience (note: typechecking does not terminate in reasonable time)