The first import mentioned in the Tour of Ceylon is
import math { sqrt, pi, Complex }
What do I need to put in my modules.ceylon in order to be able to import this math module? It is not either of these:
module my_module "1.0.0" {
import math "1.3.3";
}
module my_module "1.0.0" {
import ceylon.math "1.3.3";
}
I think this example is intended to be fictitious, just like the other three imports below. (I’m not sure if it’s intentional that some of those have
com.exampleand some haveorg.example, either.)There is a
ceylon.mathmodule in the SDK (documentation), but it’s deprecated, having been replaced byceylon.numeric(containspiandsqrt()),ceylon.whole, andceylon.decimal. AComplexclass is nowhere to be found in the entire SDK.Generally, package names must match the module name prefix, so a single-component package name like
mathcould only be part of themathmodule – a module name that would be highly discouraged.