MicroHs-0.17.4.0 / tests / StandDer.hs
module StandDer wheredata X = Xderiving instance Show Xdata T a = A | B | C a | D (T a)deriving instance (Show a) => Show (T a)newtype Y = Y Xderiving newtype instance Show Ynewtype M a = M (Maybe a) deriving Showderiving newtype instance Functor Mnewtype Z = Z X deriving Shownewtype YY = YY Xderiving via Z instance Show YYmain :: IO ()main = do print X print [A, B, C True, D A] print (Y X) print (fmap fromEnum (M (Just 'a'))) print (YY X)