unison
unison copied to clipboard
base.io.systemTime / systemTime.impl can't fail
These things should be assumed to never fail. Its a pain to have to handle the failure type that will never happen
Even though systemTime is deprecated, this ticket still applies to now and realtime, right?
I'm guessing it's thought to be able to fail with a Haskell IO error just because it's in IO, but probably it can't actually fail. We probably shouldn't change the builtin at this point, but could it be handled in base? cc @runarorama
looking through the IO.concurrent namespace in @unison/base, it appears we have inherited or implemented GHC's asynchronous exception mechanism. So, any Unison IO action can raise an exception, even if it never explicitly throws an exception.
Async exceptions needn't (and shouldn't) appear as Exception, only IO, because catching them requires a special operation that isn't Exception.catch
Ah, I see – which operation is that?