  We prove that in the varieties where every compact congruence is a factor
congruence and every nontrivial algebra contains a minimal subalgebra, a
finitely presented algebra is projective if and only if it has every minimal
algebra as its homomorphic image. Using this criterion of projectivity, we
describe the primitive subquasivarieties of discriminator varieties that have a
finite minimal algebra which embeds in every nontrivial algebra from this
variety. In particular, we describe the primitive quasivarieties of
discriminator varieties of monadic Heyting algebras, Heyting algebras with
regular involution, Heyting algebras with dual pseudocomplement, and
double-Heyting algebras.
