From: sof Date: Sun, 27 Jul 1997 09:14:11 +0000 (+0000) Subject: [project @ 1997-07-27 09:14:11 by sof] X-Git-Tag: Approximately_1000_patches_recorded~173 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=121ce7763715e6c58b55afc09536256a3c83f04e;p=ghc-hetmet.git [project @ 1997-07-27 09:14:11 by sof] Use readRational__ rather than readRational (it copes with leading -) --- diff --git a/ghc/compiler/reader/ReadPrefix.lhs b/ghc/compiler/reader/ReadPrefix.lhs index 18ec5b6..d16dc74 100644 --- a/ghc/compiler/reader/ReadPrefix.lhs +++ b/ghc/compiler/reader/ReadPrefix.lhs @@ -512,8 +512,11 @@ wlkLiteral ulit as_integer s = readInteger (_UNPK_ s) #if __GLASGOW_HASKELL__ == 201 as_rational s = GHCbase.readRational__ (_UNPK_ s) -- non-std -#elif __GLASGOW_HASKELL__ >= 202 - as_rational s = case readRational (_UNPK_ s) of { [(a,_)] -> a } -- ToDo, use non-std readRational__ +#elif __GLASGOW_HASKELL__ == 202 + as_rational s = case readRational (_UNPK_ s) of { [(a,_)] -> a } +#elif __GLASGOW_HASKELL__ >= 203 + as_rational s = readRational__ (_UNPK_ s) -- use non-std readRational__ + -- to handle rationals with leading '-' #else as_rational s = _readRational (_UNPK_ s) -- non-std #endif