idris-lang/Idris-dev — pull request #806 by ziman (2014-01-27 16:33:53+00:00)
Title: Support for "import Module as Alias"

This patch adds aliases for imported modules. Since aliases are expanded at parse time, they can be considered abbreviations for the full module names and are visible only in that single source file. The full module names are available and unaffected.
```Haskell
module Main

import Prelude.Vect as V
import Prelude.List as L

main : IO ()
main = do
print (Prelude.Vect.Nil {a = Nat}) -- prints empty vector
print (V.Nil {a = Nat}) -- prints empty vector
print (L.Nil {a = Nat}) -- prints empty list
print ( Nil {a = Nat}) -- Can't disambiguate name: Prelude.List.Nil, Prelude.Vect.Nil
```

All tests pass except `test021` and `test025`. These two tests fail also in the `master` branch on my computer and I conclude that this patch does not break them.