Skip to content

fromLeft / fromRight shouldn't be partial #47

Closed
@kritzcreek

Description

@kritzcreek

I'd like to have

fromLeft :: forall a b. a -> Either a b -> a
fromRight ::  forall a b. b -> Either a b -> b

over the current partial

fromLeft :: Partial => forall a b. Either a b -> a
fromLeft :: Partial => forall a b. Either a b -> b

as typing either (const a) identity becomes old rather quickly and I need these functions much more frequently than their partial counterparts. I'm not sure how confusing it would be to define these functions differently in two modules in this package, but even if don't rename the old ones I think this would be a win.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: breaking changeA change that requires a major version bump.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions