createBaseGen :: (MonadRandom m, Ord c, Ord tc, Ord tv)
  => TcEnv v c tc tv -> DataGenMap c tc tv (Sized m)
  -> Map tc [(Int, DataPat c tc tv)]
  -> DataGenMap c tc tv m
createBaseGen env g inlinedBase = fix $ \g' ->
  Map.union (size0 g)
    $ Map.mapWithKey (uncurry . mkBaseGen g') (tyConEnv env `mapZip'` inlinedBase)
  where
    size0 = Map.map $ \DataGen{..} ->
      DataGen genArgs $ runSized 0 . genData . (unsized <$>)

-- | Inline definitions
createBaseGen :: (MonadRandom m, Ord c, Ord tc, Ord tv)
  => TcEnv v c tc tv -> DataGenMap c tc tv (Sized m)
  -> Map tc [(Int, DataPat c tc tv)]
  -> DataGenMap c tc tv m
createBaseGen env g inlinedBase = fix $ \g' ->
  Map.union (size0 g)
    $ Map.mapWithKey (uncurry . mkBaseGen g') (tyConEnv env `mapZip'` inlinedBase)
  where
    size0 = Map.map $ \DataGen{..} ->
      DataGen genArgs $ runSized 0 . genData . (unsized <$>)

-- | Inline definitions
createBaseGen env g inlinedBase = fix $ \g' ->
  Map.union (size0 g)
    $ Map.mapWithKey (uncurry . mkBaseGen g') (tyConEnv env `mapZip'` inlinedBase)
  where
    size0 = Map.map $ \DataGen{..} ->
      DataGen genArgs $ runSized 0 . genData . (unsized <$>)

-- | Inline definitions