Skip to content

Add qualified do module for (semigroup) V #40

@JordanMartinez

Description

@JordanMartinez

The Data.Validation.Semigroup V does not have a Bind instance because it can lead to unexpected results despite it otherwise working fine. That makes sense, but when I do want that behavior, I can use andThen. Unfortunately, it means I can't use do notation anymore.

As a workaround, perhaps a module should be added to this repo which exposes the following module?

module Data.Validation.Semigroup.QualifiedDo

import Data.Validation.Semigroup (V, andThen)

bind :: -- type signature
bind = andThen

Then, when imported as import Data.Validation.Semigroup.QualifiedDo as V, we can use V.do. Since its qualified do notation, one is able to see that something 'special' is going on with the bind calls.

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