Define chained operators, for ease of entering expressions like 1 < 2 < 3.
This module defines three extra variations of each of the operators `<`

,
`<=`

, and `==`

, for use at the beginning, middle, and end of such chains.
These operators have dots on the inside of the chain, for instance:

`x <. y .< z 1 <. 2 .<. 3 .<=. 3 .< 4 square (0,0) ==. square (0,1) .== square (0,2)`

These operators are defined to be left-associative and the same precedence as the ordinary comparison operators.

Defines instances of `Show`

, `Eq`

, and `Ord`

for functions.

Limitations:

- Only works for functions that have a small finite number of possible
inputs (e.g., inputs are all
`Bool`

). The module defines a`Finite`

class for types where all possible values of the type can be listed in a finite list, and defines function equality in terms of that class. - Does not work for functions that could result in undefined for defined
inputs (
`==`

is undefined in those cases) - Does not test strictness - e.g.,
`(&&) == flip (&&)`

gives`True`

, even though they give different results if one of the inputs is undefined - Equality and ordering on other types are assumed to work correctly;
otherwise it may give incorrect results. In particular,
`const (0/0) /= const (0/0)`

(since NaN ≠ NaN), and if infinite lists (or similar) are returned from both functions,`(==)`

will enter an infinite loop. - Only works with monomorphic types. ghci seems to sometimes replace
type variables with
`()`

, which could give surprising results, e.g., typing`(==) == const (const True)`

in ghci will show`True`

, because it assumes`(==) :: () -> () -> Bool`

(which is always true)

Also provides an `inverse`

function which can invert certain functions