Skip to content

Is MonadPlus instance lawful? #95

Closed
@no-longer-on-githu-b

Description

@no-longer-on-githu-b

let f = if _ then throwError e else pure unit

Then (pure true <|> pure false) >>= f is not the same as (pure true >>= f) <|> (pure false >>= f). Because in the first example, the exception thrown by f is not caught.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions