type 'a result = | Success of 'a | Error of exn