You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IO.tryEval : '{g, IO, Exception} a ->{g, IO, Exception} a
IO.tryEval = reraise << catchAll.impl
IO.catchAll.impl : '{IO, Exception} a ->{IO} Either Failure a
IO.catchAll.impl thunk =
handle tryEval.impl '(catch thunk)
with
cases
{ x } -> x
{Exception.raise f -> _} -> Left f
The argument to IO.tryEval requires an ability g, but the type of catchAll.impl should prohibit that.
Note that this does not typecheck:
IO.tryEval : '{g, IO, Exception} a ->{g, IO, Exception} a
IO.tryEval x = reraise (catchAll.impl x)
The type of << is:
(Function.<<) : (b ->{𝕖} c) -> (a ->{𝕖} b) -> a ->{𝕖} c
(Function.<<) f g x = f (g x)
The text was updated successfully, but these errors were encountered:
runarorama
changed the title
Composition on effectful functions typechecks when it shouldn't
Composition of effectful functions typechecks when it shouldn't
Oct 17, 2022
This typechecks, but shouldn't:
The argument to
IO.tryEval
requires an abilityg
, but the type ofcatchAll.impl
should prohibit that.Note that this does not typecheck:
The type of
<<
is:The text was updated successfully, but these errors were encountered: