Skip to content

Potential type error in Error law #11

Description

@maralorn

Following our discussion on irc I am still trying to wrap my head around the catch handling in eff.

While looking at the law for catch I wondered if the pure is correct there.

According to this type signature:

catch :: Error e :< effs => Eff (Error e ': effs) a -> (e -> Eff effs a) -> Eff effs a 

I deduce the types catch (throw x) f :: Eff effs a and f x :: Eff effs a, so pure (f x) :: Applicative a1 => a1 (Eff effs a)?

So I think instead of catch (throw x) f ≡ pure (f x) it should just be catch (throw x) f ≡ f x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions