mlliarm / ia

An interval arithmetic library in Logtalk
Apache License 2.0
2 stars 0 forks source link

Issue loading numberlist library #8

Closed mlliarm closed 4 years ago

mlliarm commented 4 years ago

So I've changed my loader to load the numberlist library. But when I load the loader, I get the following error:

ERROR: /home/milia/Documents/dev/logtalk/ia/.lgt_tmp/loader_3366262_lgt.pl:1:
    source_sink `library(numberlist)' does not exist
Warning: /home/milia/Documents/dev/logtalk/ia/.lgt_tmp/loader_3366262_lgt.pl:1:
    Goal (directive) failed: user:use_module(library(numberlist),[])

I must have done something wrong.

Here are the contents of the loader.lgt:

:- use_module(library(numberlist), []).

:- initialization(
    logtalk_load([
        interval_arithmeticp,
        interval_arithmetic
    ], [
        optimize(on)
    ])
).
pmoura commented 4 years ago

Fixed. Note that Logtalk libraries are not module libraries; you cannot use an use_module/1 directive to load them. Also (see the commit that I just pushed to fix this issue), the numberlistp and numberlist entities are part of the types library.

mlliarm commented 4 years ago

Thanks ! Noted. I'd noticed that numberlist, numberlistp were included in the library types, but wasn't sure how to load it. Now I know :).

pmoura commented 4 years ago

https://logtalk.org/manuals/libraries/index.html