Skip to content

Feature: add a newtype for unsafe reference equality === #5

@LiamGoodacre

Description

@LiamGoodacre

Regarding the discussion here: purescript/purescript-prelude@3b0d306

One idea was to define a newtype UnsafeRefEq a = UnsafeRefEq a whose Eq instance uses JavaScript's === comparison operator. If false, then fall back to Eq a.
We can then remove the unsafe === optimization from the Eq a => Eq (Array a) instance.
If anyone wants to recover this behaviour, they can use the newtype.

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