Skip to content

Add Equals to Type.Data.Boolean? #65

@kl0tl

Description

@kl0tl

We have Type.Data.Ordering.Equals and Type.Data.Symbol.Equals but no Type.Data.Boolean.Equals.

Is there any reason for not wanting or needing this class?

I assume it would be implemented like this:

class Equals :: Boolean -> Boolean -> Boolean -> Constraint
class Equals lhs rhs out | lhs rhs -> out, lhs out -> rhs, rhs out -> lhs

instance equalsTrueTrue :: Equals True True True
else instance equalsTrueFalse :: Equals True False False
else instance equalsFalseTrue :: Equals False True False
else instance equalsFalseFalse :: Equals False False True

equals :: forall proxy l r o. Equals l r o => proxy l -> proxy r -> Proxy o
equals _ _ = Proxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs more infoThis issue needs more info before any action can be done.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions