--------------------------------------------------------------------------------

convertHsSigType_
  :: LocalConvMonad r m
  => UnusedTyVarMode
  -> LHsQTyVars GhcRn
  -> Maybe (LHsContext GhcRn)
  -> HsConDeclDetails GhcRn
  -> LHsType GhcRn
  -> [Qualid] -> m Term
convertHsSigType_ utvm (HsQTvs { hsq_explicit = qvars }) mcxt args resTy excls = do
  coq_itvs <- traverse (var TypeNS . binderName . unLoc) qvars
  coq_ty <- convertLType resTy >>= convertArgs args >>= maybe pure convertContext mcxt
  finishConvertHsSigTypeWithExcls utvm coq_itvs coq_ty excls
#if __GLASGOW_HASKELL__ >= 806
convertHsSigType_
  :: LocalConvMonad r m
  => UnusedTyVarMode
  -> LHsQTyVars GhcRn
  -> Maybe (LHsContext GhcRn)
  -> HsConDeclDetails GhcRn
  -> LHsType GhcRn
  -> [Qualid] -> m Term
convertHsSigType_ utvm (HsQTvs { hsq_explicit = qvars }) mcxt args resTy excls = do
  coq_itvs <- traverse (var TypeNS . binderName . unLoc) qvars
  coq_ty <- convertLType resTy >>= convertArgs args >>= maybe pure convertContext mcxt
  finishConvertHsSigTypeWithExcls utvm coq_itvs coq_ty excls
#if __GLASGOW_HASKELL__ >= 806
convertHsSigType_ utvm (HsQTvs { hsq_explicit = qvars }) mcxt args resTy excls = do
  coq_itvs <- traverse (var TypeNS . binderName . unLoc) qvars
  coq_ty <- convertLType resTy >>= convertArgs args >>= maybe pure convertContext mcxt
  finishConvertHsSigTypeWithExcls utvm coq_itvs coq_ty excls
#if __GLASGOW_HASKELL__ >= 806