diff options
Diffstat (limited to 'libraries/base/GHC/Read.hs')
-rw-r--r-- | libraries/base/GHC/Read.hs | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/libraries/base/GHC/Read.hs b/libraries/base/GHC/Read.hs index 43e5ee5b32..7f698ec498 100644 --- a/libraries/base/GHC/Read.hs +++ b/libraries/base/GHC/Read.hs @@ -669,25 +669,7 @@ instance Read () where readList = readListDefault -- | @since 4.15 -instance Read a => Read (Solo a) where - -- Since our `show` doesn't show record syntax, we want to accept non-record - -- syntax. Since Solo is actually a record, it only seems fair to accept - -- record syntax as well. - readPrec = parens $ - (prec appPrec $ - do expectP (L.Ident "Solo") - x <- step readPrec - return (Solo x)) - +++ - (prec appPrec1 - (do expectP (L.Ident "Solo") - expectP (L.Punc "{") - x <- readField - "getSolo" (reset readPrec) - expectP (L.Punc "}") - return (Solo x))) - - readListPrec = readListPrecDefault +deriving instance Read a => Read (Solo a) -- | @since 2.01 instance (Read a, Read b) => Read (a,b) where |