getkyo / kyo

Toolkit for Scala Development
https://getkyo.io
Apache License 2.0
559 stars 47 forks source link

Consider subsuming `Abort[Nothing]` under `IO` #836

Open sideeffffect opened 2 weeks ago

sideeffffect commented 2 weeks ago

context:

@fwbrasil

Abort[Nothing] corresponds to a fatal, unexpected failure/defect/bug, right?

Yes, it represents a Result.Panic.

In that case, shouldn't it already be subsumed by IO itself?

That's a good point. It seems it'd be more convenient but then IO.Unsafe.run will need to return a Result. Do you mind creating an issue for it so we can follow up separately? It'll be trickier to implement since IO doesn't handle Abort currently.