I installed it in the usual way: haxelib install thx.core, and see that it is indeed present in my ~/haxelib, albeit named with a comma (“thx,core”) rather than the dot which I expected (“thx.core”).
In my Main.hx, at the top I put import thx.core.Set;
In my hl.hxml file I added the line: -L thx.core
When I run haxe hl.hxml I get the error:
src/Main.hx:1: characters 8-20 : Type not found : thx.core.Set
Thanks Valentin, but changing -L thx.core to -lib thx.core in my hl.hxml file doesn’t seem to affect anything (and I see from haxe --help that it looks like the newer usage is -L|--library, rather than -lib).
Ah! Thanks, Andy. I was just looking into ~/haxelib/thx,core/0,43,0/src noticing that there’s a thx/Set.hx rather than thx/core/Set.hx file…
So, I changed my Main.hx to say, import thx.Set;, and … I get other errors; though at least it looks like they’re errors from the library. I’m following the thx.Docs, but
var set = Set.create();
fails with
src/Main.hx:5: characters 19-29 : thx.Set has no field create
and
var s : Set<Int> = [1, 2, 3, 1];
fails with:
src/Main.hx:5: characters 9-41 : Array<Int> should be thx.Set<Int>