[Haskell-cafe] ContT and MonadSafe

PICCA Frederic-Emmanuel frederic-emmanuel.picca at synchrotron-soleil.fr
Tue Nov 16 14:45:14 UTC 2021


I end up with this but I do not know if this is the best solution.

withHdf5PathP loc (H5Or l r) = ContT $ \cont -> (runContT (withHdf5PathP loc l) cont)
                                                                            `catchAll`
                                                                            const (runContT (withHdf5PathP loc r) cont)


More information about the Haskell-Cafe mailing list