[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] help with Aldor categories, graphs and finite grap
Re: [Axiom-developer] help with Aldor categories, graphs and finite graphs.
Sun, 11 Sep 2005 16:52:16 +0100
On Sun, 2005-09-11 at 02:03 -0400, address@hidden
> I am trying to define the category of graphs in Aldor.
> When I try to use this category in the definition of the
> domain of FiniteGraphs I get an unexpected error:
> There are no suitable meanings for the operator `GraphCategory'.
In the second version, you haven't told the compiler where it can find
the definition of `GraphCategory', so you get an error.
In order to get the library included, you need to put
#library "graphcat.ao" GRAPHCAT;
import from GRAPHCAT;
inline from GRAPHCAT;
at the top of the file (actually, anywhere at top level will do, but it
makes most sense just after #include "axiom.as").
The first line defines a library object referring to your category
definition, the second imports from it. The third says that the
generated code can depend on the definitions (and not just the
signatures) within GRAPHCAT - it's only required when you want compiled
code to go faster, at the expense of a tighter dependency between
compiled pieces of code.
Obviously, this will get out of hand when you depend on many .ao files.
For this reason you can use 'ar' to create a single library file from
the .ao's which can then be imported as one lump (in fact axiom.as does
just this with libaxiom.al).
> Axiom-developer mailing list