Fix test reg039 and add it to idris.cabal
Merge pull request #1067 from Melvar/fix-reg039

Fix test reg039 and add it to idris.cabal