[project @ 2002-06-06 16:03:16 by simonpj]
[ghc-base.git] / Text / Read.hs
index 47813eb..bf70920 100644 (file)
@@ -1,32 +1,44 @@
 {-# OPTIONS -fno-implicit-prelude #-}
 -----------------------------------------------------------------------------
--- 
+-- |
 -- Module      :  Text.Read
 -- Copyright   :  (c) The University of Glasgow 2001
--- License     :  BSD-style (see the file libraries/core/LICENSE)
+-- License     :  BSD-style (see the file libraries/base/LICENSE)
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  provisional
 -- Portability :  portable
 --
--- $Id: Read.hs,v 1.1 2001/06/28 14:15:04 simonmar Exp $
---
--- Exiting the program.
+-- The "Text.Read" library is the canonical library to import for
+-- 'Read'-class facilities.  It offers an extended and much improved
+-- 'Read' class, which constitutes a proposed alternative to the 
+-- Haskell98 'Read'.  In particular, writing parsers is easier, and
+-- the parsers are much more efficient.
 --
 -----------------------------------------------------------------------------
 
 module Text.Read (
+   -- * The 'Read' class
+   Read(..),           -- The Read class
    ReadS,              -- String -> Maybe (a,String)
-   Read(
-      readsPrec,       -- :: Int -> ReadS a
-      readList         -- :: ReadS [a]
-    ),
+
+   -- * Haskell 98 functions
    reads,              -- :: (Read a) => ReadS a
    read,               -- :: (Read a) => String -> a
    readParen,          -- :: Bool -> ReadS a -> ReadS a
    lex,                        -- :: ReadS String
+
+   -- * New parsing functions
+   module Text.ParserCombinators.ReadPrec,
+   L.Lexeme(..),       
+   lexP,               -- :: ReadPrec Lexeme
+   readListDefault,    -- :: Read a => ReadS [a]
+   readListPrecDefault,        -- :: Read a => ReadPrec [a]
+
  ) where
 
 #ifdef __GLASGOW_HASKELL__
 import GHC.Read
+import Text.ParserCombinators.ReadPrec
+import qualified Text.Read.Lex as L
 #endif