FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Default type class member implementations · Issue #3067 · purescript/purescript · GitHub

Default type class member implementations #3067

Description

@joneshf suggests in #361 (comment) the following (old syntax?)

class Eq a where
  (==) :: a -> a -> Boolean
  (/=) :: a -> a -> Boolean

  instance Eq a where
    (==) x y = not (x /= y)
    (/=) x y = not (x == y)

As an alternative I would like to propose

class Eq a where
  eq :: a -> a -> Boolean
  eq x y = not (notEq x y)

  notEq :: a -> a -> Boolean
  notEq x y = not (eq x y)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL