
9 Aug
2019
9 Aug
'19
9:14 p.m.
instance Eq1 Complex where liftEq f (x :+ y) (u :+ v) = f x u && f y v instance Show1 Complex where liftShowsPrec sp _ p (x :+ y) = showParen (p >= 6) (sp p x . showString " :+ " . sp p y) instance Read1 Complex where liftReadPrec rp _ = parens $ prec 6 $ do x <- step rp Symbol ":+" <- lexP y <- step rp return (x :+ y) liftReadList = liftReadListDefault liftReadListPrec = liftReadListPrecDefault