module ReadShowInstances where import DataTypes import Read(pread_f4Tree,pread_f8RoseTree,pread_f4List,pread_f1A,pread_f0) import Show(pshow_f4Tree,pshow_f8RoseTree,pshow_f4List,pshow_f1A,pshow_f0) import RS(fromRStoS,fromRStoR,toRSfromS,toRSfromR) import RSArrowInstances() -- ---------------------------------------------------------------- instance Show a => Show (A a) where showsPrec = fromRStoS (pshow_f1A (toRSfromS showsPrec)) instance Show a => Show (Tree a) where showsPrec = fromRStoS (pshow_f4Tree (toRSfromS showsPrec)) instance Show a => Show (RoseTree a) where showsPrec = fromRStoS (pshow_f8RoseTree (toRSfromS showsPrec)) instance Show a => Show (List a) where showsPrec = fromRStoS (pshow_f4List (toRSfromS showsPrec)) -- ---------------------------------------------------------------- instance Read a => Read (A a) where readsPrec = fromRStoR (pread_f1A (toRSfromR readsPrec)) instance Read a => Read (Tree a) where readsPrec = fromRStoR (pread_f4Tree (toRSfromR readsPrec)) instance Read a => Read (RoseTree a) where readsPrec = fromRStoR (pread_f8RoseTree (toRSfromR readsPrec)) instance Read a => Read (List a) where readsPrec = fromRStoR (pread_f4List (toRSfromR readsPrec))