Closed
Description
Could we add a try operator like Control.Exception has in Haskell? I'm currently using this:
try ∷ ∀ a e. Eff (err ∷ EXCEPTION | e) a → Eff e (Either Error a)
try action = catchException (pure ∘ Left) (Right <$> action)
The only problem would be that this introduces a dependency on purescript-either
.
Metadata
Metadata
Assignees
Labels
No labels