Factorize some constant related type computation
Fix #601 - Make enumerate works with pack