From be53fabc231ad10e9bc031da3753a24c3fd46f7f Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 16 Sep 2002 11:24:36 +0000 Subject: [PATCH] [project @ 2002-09-16 11:24:36 by simonpj] Fix bug in Read instance for Maybe --- GHC/Read.lhs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/GHC/Read.lhs b/GHC/Read.lhs index 68d0521..ad875c0 100644 --- a/GHC/Read.lhs +++ b/GHC/Read.lhs @@ -326,14 +326,13 @@ parenthesis-like objects such as (...) and [...] can be an argument to instance Read a => Read (Maybe a) where readPrec = parens - ( prec appPrec - ( do L.Ident "Nothing" <- lexP - return Nothing - +++ - do L.Ident "Just" <- lexP - x <- step readPrec - return (Just x) - ) + (do L.Ident "Nothing" <- lexP + return Nothing + +++ + prec appPrec ( + do L.Ident "Just" <- lexP + x <- step readPrec + return (Just x)) ) readListPrec = readListPrecDefault -- 1.7.10.4