microsoft / qsharp

Azure Quantum Development Kit, including the Q# programming language, resource estimator, and Quantum Katas
https://microsoft.github.io/qsharp/
MIT License
367 stars 73 forks source link

Introduce glob imports in import statements #1566

Closed sezna closed 1 month ago

sezna commented 1 month ago

branched off of #1469

This PR mainly introduces glob imports in import statements, e.g.:

import Foo.*;
import Foo.Bar.* as Baz;

et cetera.

Glob imports work similarly to other languages: Foo.* brings in everything from Foo, while Foo.* as Bar brings in all of Foo, but aliased under a namespace Bar. For example, if function F() : Unit {} exists in Foo, then after importing via Foo.* as Bar, it would be available as Bar.F().

Other incidental changes include: