1

I'm checking out Ceylon. I want to play with the HTML module, but have no idea how to import it. IMHO the documentation about modules do not address this simple task.

Thank you Gilad

Gilad
  • 538
  • 5
  • 16

2 Answers2

2

You need to add it to your module descriptor, as described in this section.

module your.module "1.0.0" {
    import ceylon.html "1.2.2";
}

If you’re on the web IDE, you’ll need to check the “Advanced” checkbox (to the right of Run / Stop / Clean / Share) to see the module.ceylon file.

Lucas Werkmeister
  • 2,584
  • 1
  • 17
  • 31
1

To import the module itself, you'll need a module.ceylon file that looks like:

module com.example.mymodule "1.0.0" {
    shared import ceylon.html "1.2.2";
}

You can omit shared if nothing from ceylon.html appears in the public api of your module.

John Vasileff
  • 5,292
  • 2
  • 22
  • 16