idris-lang/Idris-dev — pull request #532 by ziman (2013-10-13 16:08:21+00:00)
Title: ipkg: Fix parsing of module names containing reserved words

The current ipkg parser incorrectly parses module names that contain reserved words, such as "Foo.String". This prevents `idris --clean pkg.ipkg` and `idris --install pkg.ipkg` from functioning correctly. (For example, `idris --clean` would attempt to delete `Foo.String.ibc` instead of `Foo/String.ibc`.) The reason is that inter-dot components of module names are parsed using the identifier parser, which excludes reserved words.

This patch replaces the inter-dot module name component parser with a simple parser corresponding to the regex [A-Za-z][A-Za-z0-9_]*.

This patch also adds test031, which fails on the master branch of Idris, while all tests pass after applying this fix.