abs package:ghc-internal

Absolute value.
Since Void values logically don't exist, this witnesses the logical reasoning tool of "ex falso quodlibet".
>>> let x :: Either Void Int; x = Right 5

>>> :{
case x of
Right r -> r
Left l  -> absurd l
:}
5
Used for compiler-generated error message; encoding saves bytes of string junk.
Used to implement abs for the Num typeclass. This gives the absolute value of whatever integer is passed into it.

Example

>>> absInteger (-6)
6
>>> abs (-6)
6
the position of hdl is set to i.