isDataProductTyCon_maybe :: TyCon -> Maybe DataCon
-- True of datatypes (not newtypes) with
--   one, vanilla, data constructor
isDataProductTyCon_maybe (AlgTyCon { algTcRhs = DataTyCon { data_cons = cons } })
  | [con] <- cons         -- Singleton
  , isVanillaDataCon con  -- Vanilla
  = Just con
isDataProductTyCon_maybe :: TyCon -> Maybe DataCon
isDataProductTyCon_maybe (AlgTyCon { algTcRhs = DataTyCon { data_cons = cons } })
  | [con] <- cons         -- Singleton
  , isVanillaDataCon con  -- Vanilla
  = Just con
isDataProductTyCon_maybe (AlgTyCon { algTcRhs = DataTyCon { data_cons = cons } })
  | [con] <- cons         -- Singleton
  , isVanillaDataCon con  -- Vanilla
  = Just con