{-# LANGUAGE AllowAmbiguousTypes #-}

module Binrep.Generic.Internal where

import GHC.TypeLits
import GHC.Generics

data Cfg a = Cfg
  { forall a. Cfg a -> String -> a
cSumTag :: String -> a
  -- ^ How to turn a constructor name into a byte tag.
  }

-- | Common type error string for when GHC attempts to derive an binrep instance
--   for a (the?) void datatype @V1@.
type GErrRefuseVoid =
    'Text "Refusing to derive binary representation for void datatype"

-- | 'conName' without the value (only used as a proxy). Lets us push our
--   'undefined's into one place.
conName' :: forall c. Constructor c => String
conName' :: forall {k} (c :: k). Constructor c => String
conName' = forall (c :: k) k1 (t :: k -> (k1 -> *) -> k1 -> *) (f :: k1 -> *)
       (a :: k1).
Constructor c =>
t c f a -> String
forall {k} (c :: k) k1 (t :: k -> (k1 -> *) -> k1 -> *)
       (f :: k1 -> *) (a :: k1).
Constructor c =>
t c f a -> String
conName @c Any c Any Any
forall a. HasCallStack => a
undefined