{-# LANGUAGE TypeOperators #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- | Provides 'Show' instances for 'HFix', @:*:@, @:+:@, 'K', 'I' and 'I0'. module MultiRecShow where import Generics.MultiRec import Generics.MultiRec.HFix deriving instance (Show (h (HFix h) ix)) => Show (HFix h ix) deriving instance (Show (g s r ix), Show (f s r ix)) => Show ((f :*: g) s r ix) deriving instance (Show (g s r ix), Show (f s r ix)) => Show ((f :+: g) s r ix) deriving instance Show a => Show (K a s r ix) deriving instance Show a => Show (I0 a) instance Show (r xi) => Show (I xi s r ix) where showsPrec _ (I x) = showString "I$ " . shows x