In the course of working on the metamodel, we decided to split ceylon.language.metamodel in two packages:
- an untyped one that is similar to Java's reflection and not type-safe, but it lets you explore the type hierarchy without the need to have instances of those types and applied types (*) => ceylon.language.metamodel.untyped
- a typed one which only uses fully applied types and is type-safe => ceylon.language.metamodel
As a result, we have things called Class and Declaration (and many others) in both packages, which meant that we could not keep auto-importing those packages like we did, so I changed the typechecker so that only the ceylon.language package is auto-imported in your source files. The other language module packages need explicit imports. Naturally the language module is still auto-imported.
(*): an applied type is a type which has no free type variables. For example List<T> is not applied in a context where T is not bound to a value (it is free), but List<Integer> is applied because there are no free type variables. Note that inside a "class List<T>", then "List<T>" is fully applied because T is defined there, while outside of the definition of List, it is free.
I'm not quite ready to describe the metamodel API because it's still very much in flux and experimental, but I will once I'm more confident that it works out.
Let me know if anything goes wrong after my push.
--
Stéphane Épardaud