Encapsulate common logic using haddockHacks