2be636c213af963a494f8e6e3cfab534f90a2693
[ghc-base.git] / Data / Ord.hs
1 {-# OPTIONS_GHC -fno-implicit-prelude #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module      :  Data.Ord
5 -- Copyright   :  (c) The University of Glasgow 2005
6 -- License     :  BSD-style (see the file libraries/base/LICENSE)
7 -- 
8 -- Maintainer  :  libraries@haskell.org
9 -- Stability   :  stable
10 -- Portability :  portable
11 --
12 -- Orderings
13 --
14 -----------------------------------------------------------------------------
15
16 module Data.Ord (
17    Ord(..),
18    Ordering,
19    comparing,
20  ) where
21
22 #if __GLASGOW_HASKELL__
23 import GHC.Base
24 #endif
25
26 comparing :: (Ord a) => (b -> a) -> b -> b -> Ordering
27 comparing p x y = compare (p x) (p y)