1 {-# OPTIONS -fno-implicit-prelude #-}
2 -----------------------------------------------------------------------------
5 -- Copyright : (c) The University of Glasgow 2001
6 -- License : BSD-style (see the file libraries/base/LICENSE)
8 -- Maintainer : libraries@haskell.org
9 -- Stability : provisional
10 -- Portability : portable
12 -- The "Text.Read" library is the canonical library to import for
13 -- 'Read'-class facilities. It offers an extended and much improved
14 -- 'Read' class, which constitutes a proposed alternative to the
15 -- Haskell98 'Read'. In particular, writing parsers is easier, and
16 -- the parsers are much more efficient.
18 -----------------------------------------------------------------------------
22 Read(..), -- The Read class
23 ReadS, -- String -> Maybe (a,String)
25 -- * Haskell 98 functions
26 reads, -- :: (Read a) => ReadS a
27 read, -- :: (Read a) => String -> a
28 readParen, -- :: Bool -> ReadS a -> ReadS a
29 lex, -- :: ReadS String
31 #ifdef __GLASGOW_HASKELL__
32 -- * New parsing functions
33 module Text.ParserCombinators.ReadPrec,
35 lexP, -- :: ReadPrec Lexeme
36 readListDefault, -- :: Read a => ReadS [a]
37 readListPrecDefault, -- :: Read a => ReadPrec [a]
42 #ifdef __GLASGOW_HASKELL__
44 import Text.ParserCombinators.ReadPrec
45 import qualified Text.Read.Lex as L