The Eq class defines equality (==) and inequality (/=). All the basic datatypes exported by the Prelude are instances of Eq, and Eq may be derived for any datatype whose constituents are also instances of Eq.
Minimal complete definition: either == or /=.
Haskell formula manipulation program
> F a ~ Bool
Compare portions of two arrays for equality. No bounds checking is performed.
Shell command that finds files with equal content in a given set of files. This is useful for finding duplicates in a set of documents where the same document might have been stored by accident with different names. Use it like
> equal-files `find my_dir -type f`
> find my_dir -type f | xargs equal-files
If the file names contain spaces, better use
> find my_dir -type f -printf "'%p'\n" | xargs equal-files
> equal_files -r my_dir
The program reads all input files simultaneously, driven by sorting and grouping of their content. However be prepared that due to the simultaneous access you may exceed the admissible number of opened files. Thus you may prefer to run it like
> equal_files -r -p 512 my_dir
The program can be used as a nice example of a declarative yet efficient implementation of a non-trivial algorithm, that is enabled by lazy evaluation.
Equality of two FilePaths. If you call System.Directory.canonicalizePath first this has a much better chance of working. Note that this doesn't follow symlinks or DOSNAM~1s.
> x == y ==> equalFilePath x y
> normalise x == normalise y ==> equalFilePath x y
> Posix: equalFilePath "foo" "foo/"
> Posix: not (equalFilePath "foo" "/foo")
> Posix: not (equalFilePath "foo" "FOO")
> Windows: equalFilePath "foo" "FOO"
A '=' character
This is an implementation of Tarjan's Union-Find algorithm (Robert E. Tarjan. "Efficiency of a Good But Not Linear Set Union Algorithm", JACM 22(2), 1975) in order to maintain an equivalence relation. This implementation is a port of the union-find package using the ST monad transformer (instead of the IO monad).
Evaluates its first argument to head normal form, and then returns its second argument as the result.
Evaluate each action in the sequence from left to right, and collect the results.
Show more results