shithub: MicroHs

Download patch

ref: 985c8409a395739122e926ec058fee80aa55532a
parent: 802ad10c52a618a1b32598db35732c7a03bf978b
author: Lennart Augustsson <lennart@augustsson.net>
date: Wed Sep 25 07:10:58 EDT 2024

More instances

--- a/lib/Data/Functor/Classes.hs
+++ b/lib/Data/Functor/Classes.hs
@@ -379,7 +379,6 @@
     liftCompare2 _ _ (Right _) (Left _) = GT
     liftCompare2 _ comp2 (Right x) (Right y) = comp2 x y
 
-{-
 instance Read2 Either where
     liftReadPrec2 rp1 _ rp2 _ = readData $
          readUnaryWith rp1 "Left" Left <|>
@@ -387,7 +386,6 @@
 
     liftReadListPrec2 = liftReadListPrec2Default
     liftReadList2     = liftReadList2Default
--}
 
 instance Show2 Either where
     liftShowsPrec2 sp1 _ _ _ d (Left x) = showsUnaryWith sp1 "Left" d x
@@ -399,13 +397,11 @@
 instance (Ord a) => Ord1 (Either a) where
     liftCompare = liftCompare2 compare
 
-{-
 instance (Read a) => Read1 (Either a) where
     liftReadPrec = liftReadPrec2 readPrec readListPrec
 
     liftReadListPrec = liftReadListPrecDefault
     liftReadList     = liftReadListDefault
--}
 
 instance (Show a) => Show1 (Either a) where
     liftShowsPrec = liftShowsPrec2 showsPrec showList