class TListGen ixs (g :: * -> *) where
genTList :: Proxy ixs -> g ix -> TList ixs g
, , , , , ix.
, ,
genTList (Proxy :: Proxy '[Int, String]) (Just False)
, g Maybe ix Bool. . - , , , ix. , 2:
class TListGen ixs (g :: * -> *) where
genTList :: Proxy ixs -> (forall ix . g ix) -> TList ixs g
RankNTypes.
, g. , Just False , Nothing .
, OVERLAPS , , ixs , TList:
class TListGen ixs (g :: * -> *) where
genTList :: (forall ix . g ix) -> TList ixs g
instance TListGen '[] g where
genTList _ = TNil
instance TListGen ixs g => TListGen (ix ': ixs) g where
genTList g = g :-: genTList g
:
GHCi> genTList Nothing :: TList '[ Int, String ] Maybe
, , Show:
• No instance for (Show (TList '[Int, String] Maybe))
arising from a use of ‘print’
• In a stmt of an interactive GHCi command: print it
Show TList, .
, , , generics-sop.
TList NP ( , ), genTList pure_NP,
GHCi> import Generics.SOP.NP
GHCi> pure_NP Nothing :: NP Maybe '[ Int, String ]
Nothing :* (Nothing :* Nil)