الحياءُ حياءان، حياءُ عقلٍ وحياء حُمْقٍ، وحياء العقل العلم وحياءُ الحُمقِ الجهل
Shyness [haya] is of two kinds: shyness out of wisdom and shyness out of folly. Shyness that stems from wisdom requires the acquisition of knowledge and shyness that stems from folly requires avoidance of ignorance.
(Tohfatul Oqul, p. 45)
Hayo aql means 'to feel shy out of wisdom' like feeling shy when committing a sin or feeling shy before those who deserve one's reverence. This shyness is knowledge; that is, it is a wise act. Haya ul-homq means to shy away from asking, learning, worshipping and such things (like some people who feel shy when they want to pray in some places). This shyness stems from ignorance.