comparing -package:hvega -package:extra

comparing p x y = compare (p x) (p y)
Useful combinator for use in conjunction with the xxxBy family of functions from Data.List, for example:
... sortBy (comparing fst) ...
a compare function that ignores the free "file" type variable:
Like Data.Ord.comparing. Helpful in conjunction with the xxxBy family of functions from Data.List