Use a more common form of error type with [`Ok of 'a|`Error of 'b]

This is compatible with a number of other libraries, including
Mirage-based ones.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>