Remove Control.Parallel*, now in package parallel
[haskell-directory.git] / Data / Ord.hs
index 2be636c..490d6be 100644 (file)
@@ -15,7 +15,7 @@
 
 module Data.Ord (
    Ord(..),
-   Ordering,
+   Ordering(..),
    comparing,
  ) where
 
@@ -23,5 +23,12 @@ module Data.Ord (
 import GHC.Base
 #endif
 
+-- | 
+-- > 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) ...
 comparing :: (Ord a) => (b -> a) -> b -> b -> Ordering
 comparing p x y = compare (p x) (p y)