[m-users.] [Beginner] Using a functions from 'libs'

Razetime rraghu.11502 at gmail.com
Sun Oct 16 17:46:36 AEDT 2022


using the name md5 like follows:
:- module a05.

:- interface.
:- import_module io.
:- pred main(io::uo,io::di) is det.

:- implementation.
:- import_module list.
:- import_module md5.

main(!IO):-
  S0=md5sum("abc3231929"),
  print_line(S0,!IO)
  .

gives me this error:
$ mmcb a05.m
~
                                                 │mercury_compile:
cannot find `Mercury/ints/md5.int' in directories .,
~
                                                 │
/usr/lib/mercury/ints



On 10/16/22, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
>
> On Sun, 16 Oct 2022 11:57:41 +0530, Razetime <rraghu.11502 at gmail.com>
> wrote:
>
>> I require the md5 hashing function for solving a problem. I found an
>> implementation at
>> https://github.com/Mercury-Language/mercury/blob/master/compiler/md5.m
>>
>> but I  am not able to import it with the name `libs' or `libs.md5'.
>> How do I do so?
>
> s/:- module libs.md5./:- module md5./
>
> Zoltan.
>
>
>


More information about the users mailing list