Define and export readRational__ (hsc reader needs it)
% (c) The AQUA Project, Glasgow University, 1994-1996
%
% (c) The AQUA Project, Glasgow University, 1994-1996
%
-\section[PrelRead]{Module @Prelread@}
+\section[PrelRead]{Module @PrelRead@}
The @Read@ class and many of its instances.
The @Read@ class and many of its instances.
lexDotDigits ('.':s) = lex0Digits s
lexDotDigits s = [("",s)]
lexDotDigits ('.':s) = lex0Digits s
lexDotDigits s = [("",s)]
-{- ToDo: remove completely
-
readRational__ :: String -> Rational -- we export this one (non-std)
-- NB: *does* handle a leading "-"
readRational__ top_s
readRational__ :: String -> Rational -- we export this one (non-std)
-- NB: *does* handle a leading "-"
readRational__ top_s
[x] -> x
[] -> error ("readRational__: no parse:" ++ top_s)
_ -> error ("readRational__: ambiguous parse:" ++ top_s)
[x] -> x
[] -> error ("readRational__: no parse:" ++ top_s)
_ -> error ("readRational__: ambiguous parse:" ++ top_s)
-- The number of decimal digits m below is chosen to guarantee
-- read (show x) == x. See
-- Matula, D. W. A formalization of floating-point numeric base
-- The number of decimal digits m below is chosen to guarantee
-- read (show x) == x. See
-- Matula, D. W. A formalization of floating-point numeric base