compare package:ghc-internal

Compare branches on the kind of its arguments to either compare by Symbol or Nat.
compareByteArrays# src1 src1_ofs src2 src2_ofs n compares n bytes starting at offset src1_ofs in the first ByteArray# src1 to the range of n bytes (i.e. same length) starting at offset src2_ofs of the second ByteArray# src2. Both arrays must fully contain the specified ranges, but this is not checked. Returns an Int# less than, equal to, or greater than zero if the range is found, respectively, to be byte-wise lexicographically less than, to match, or be greater than the second range.
Used to implement compare for the Integral typeclass. This takes two integers, and outputs whether the first is less than, equal to, or greater than the second.

Example

>>> compareInteger 2 10
LT
>>> compare 2 10
LT