clash-lib-1.6.4: Clash: a functional hardware description language - As a library
Copyright(C) 2021 QBayLogic B.V.
LicenseBSD2 (see the file LICENSE)
MaintainerQBayLogic B.V. <devops@qbaylogic.com>
Safe HaskellNone
LanguageHaskell2010

Clash.Util.Eq

Description

Utilities related to the Eq type class.

Synopsis

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.