A result as an option, dropping the error.
288def stdResultToOption =
289 (lambda erased errorType : Type 0 .
290 erased valueType : Type 0 .
291 unrestricted value : (family StdResult errorType valueType) .
292 eliminate
293 StdResult
294 (lambda unrestricted current : (family StdResult errorType valueType) .
295 family StdOption valueType)
296 value
297 (branch StdFailure held . constructor StdOption StdNone valueType)
298 (branch StdSuccess held . constructor StdOption StdSome valueType held))The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.