[project @ 2005-03-14 15:46:12 by simonmar]
[ghc-base.git] / Data / Ord.hs
diff --git a/Data/Ord.hs b/Data/Ord.hs
new file mode 100644 (file)
index 0000000..2be636c
--- /dev/null
@@ -0,0 +1,27 @@
+{-# OPTIONS_GHC -fno-implicit-prelude #-}
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  Data.Ord
+-- Copyright   :  (c) The University of Glasgow 2005
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
+-- 
+-- Maintainer  :  libraries@haskell.org
+-- Stability   :  stable
+-- Portability :  portable
+--
+-- Orderings
+--
+-----------------------------------------------------------------------------
+
+module Data.Ord (
+   Ord(..),
+   Ordering,
+   comparing,
+ ) where
+
+#if __GLASGOW_HASKELL__
+import GHC.Base
+#endif
+
+comparing :: (Ord a) => (b -> a) -> b -> b -> Ordering
+comparing p x y = compare (p x) (p y)