reportConflictingInjectivityErrs fam_tc (confEqn1:_) tyfamEqn
  = addErrs [buildInjectivityError fam_tc herald (confEqn1 :| [tyfamEqn])]
  where
    herald = text "Type family equation right-hand sides overlap; this violates" $$
             text "the family's injectivity annotation:"

-- | Injectivity error herald common to all injectivity errors.
reportConflictingInjectivityErrs fam_tc (confEqn1:_) tyfamEqn
  = addErrs [buildInjectivityError fam_tc herald (confEqn1 :| [tyfamEqn])]
  where
    herald = text "Type family equation right-hand sides overlap; this violates" $$
             text "the family's injectivity annotation:"

-- | Injectivity error herald common to all injectivity errors.
reportConflictingInjectivityErrs fam_tc (confEqn1:_) tyfamEqn
  = addErrs [buildInjectivityError fam_tc herald (confEqn1 :| [tyfamEqn])]
  where
    herald = text "Type family equation right-hand sides overlap; this violates" $$
             text "the family's injectivity annotation:"

-- | Injectivity error herald common to all injectivity errors.