Why can’t I derive Show here?
{-# LANGUAGE ExistentialQuantification #-}
data Obj = forall a. (Show a) => Item_Obj {get :: a, rest :: Obj} | No_Obj deriving Show
xs :: Obj
xs = Item_Obj 1 $ Item_Obj "foo" $ Item_Obj 'c' $ No_Obj
main :: IO ()
main = putStrLn . show $ xs
Such kind of context in not allowed in haskell-98 datatypes. Read this
Ofcourse you can write standalone instance by using
StandaloneDerivingextension and let ghc do rest of the hardwork.