[Opa] compiling inter-dependent modules

Adam Koprowski Adam.Koprowski at mlstate.com
Thu Aug 18 06:07:59 EDT 2011


  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] *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.owasp.org/pipermail/opa/attachments/20110818/c2bc296d/attachment.html 


More information about the Opa mailing list