Copyright | (C) 2021 QBayLogic B.V. |
---|---|
License | BSD2 (see the file LICENSE) |
Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |
Safe Haskell | None |
Language | Haskell2010 |
Utilities related to the Eq
type class.
Documentation
fastEq :: Eq a => a -> a -> Bool Source #
Compare two values using pointer equality. If that fails, use Eq
to
determine equality. Note that this function will only shortcut for values
that are the same, but will always use Eq
for values that differ.
Values are evaluated to WHNF before comparison. This function can therefore not be used if any of its arguments is expected to be bottom.
fastEqBy :: (a -> a -> Bool) -> a -> a -> Bool Source #
Compare two values using pointer equality. If that fails, use given function to determine equality. Note that this function will only shortcut for values that are the same, but will always use the given function for values that differ.
Values are evaluated to WHNF before comparison. This function can therefore not be used if any of its arguments is expected to be bottom.