Hi,
Your variables Assign, Record, Call1 and Call2 are defined in the implicit
local..in..end that's inside function MyLang. Hence they are not visible
outside of function MyLang, thus not at the export level.
I think what you want is simply the following:
> % MyLang.oz
> functor
> export
> Assign
> Record
> Call2
> Call1
> define
> fun lazy {Assign X}
> X
> end
> fun lazy {Record Xs}
> {MakeRecord s Xs}
> end
> fun lazy {Call2 F P1 P2}
> {F P1 P2}
> end
> fun lazy {Call1 F P1}
> {F P1}
> end
> end
>
and that's it.
Cheers,
Sébastien
On Tue, Jun 19, 2012 at 1:39 AM, Enrique Iurleo <[email protected]>wrote:
> Hi list.. Well, I have a troubles with a functor. This is the code:
>
> functor
> export
> MyLang
> Assign
> Record
> Call2
> Call1
> define
> fun {MyLang}
> fun lazy {Assign X}
> X
> end
> fun lazy {Record Xs}
> {MakeRecord s Xs}
> end
> fun lazy {Call2 F P1 P2}
> {F P1 P2}
> end
> fun lazy {Call1 F P1}
> {F P1}
> end
> in
> mylang(assign:Assign record:Record call2:Call2 call1:Call1)
> end
> end
>
> And when i run "ozc -c functor.oz"
>
> gives an error:
>
> "variable Call2 not introduced"
>
> and
>
> "variable Call1 not introduced"
>
> but with the other variables everything seems fine.
>
> So, whats happen here? i hope your help thank you very much
>
>
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users