[Opa] compiling inter-dependent modules

Mads Jensen mads379 at gmail.com
Thu Aug 18 06:15:26 EDT 2011


Yes, circular dependencies was what I meant :) And your solution
works. I had an unnecessarily complicated Makefile that compiled all
the opa files separately.

Thanks,
Mads

On Thu, Aug 18, 2011 at 12:07 PM, Adam Koprowski
<Adam.Koprowski at mlstate.com> wrote:
>
>   Hey Mads,
>   You mean circular dependencies between the modules? As long as they're in one package it should be fine. Take the following code:
>
> Even = {{
>   is_even(n) =
>     if n == 0 then
>       true
>     else
>       Odd.is_odd(n - 1)
> }}
> Odd = {{
>   is_odd(n) =
>     if n == 1 then
>       true
>     else
>       Even.is_even(n - 1)
> }}
>
>   you can put Even module in even.opa and Odd in odd.opa and then compile them with 'opa even.opa odd.opa' and everything works as expected. Or did I misunderstand your question?
>   Best,
>   Adam
> PS. You can create .opack files with a list of Opa files (one per line) and then invoke Opa with the .opack file itself.
> On Thu, Aug 18, 2011 at 11:49, Mads Jensen <mads379 at gmail.com> wrote:
>>
>> Hi guys,
>> Currently I have a basic Makefile set up and can't seem to
>> figure out how to deal with inter-dependent modules.
>> How do you deal with it?
>> Cheers,
>> Mads
>> _______________________________________________
>> Opa mailing list
>> Opa at lists.owasp.org
>> https://lists.owasp.org/mailman/listinfo/opa
>>
>
>
>
> --
> Adam Koprowski  [http://adam-koprowski.net]
> R&D @ MLstate   [http://opalang.org | http://mlstate.com]


More information about the Opa mailing list