hkts
hkts copied to clipboard
TE.tryCatch takes a synchronous value
trafficstars
In fp-ts tryCatch is how we interop and construct a TaskEither from an asynchronous computation that may fail.
Can I ask why you deviated here and added fromFailableTask?
For Either and Option the tryCatch function takes a synchronous thunk. Rather than change that arbitrarily for TaskEither as fp-ts does I opted to make the interface less surprising. Thus the more explicit fromFailableTask function.