Gabriel Dos Reis wrote:
> Waldek Hebisch <[email protected]> writes:
> 
> | But above we need to "expand" where to see what
> | type is defined (the 'some category expression' part).  Worse,
> | freqently we have things like:
> | 
> | SomeFunctor(A : CA, B : CB) : Public == Private where
> |     CA ==> cata
> |     CB ==> catb
> 
> I am not sure this is as complicated as it sounds.
> I believe all flavours of AXIOM do (or at least used to do) the
> following for this where-expression: 
> 
>   1. elaborate of the side conditions.
>      This essentially means that the environment is augmented with
>      the constant/macro definitions.
> 
>   2. in the resulting environment, pull our types and names from the
>      parameter declarations.
> 
>   3. elaborate the type declarations in the resulting environment.
> 
>   4. elaborate SomeFunctor(A,B) == Private
> 
> 
> Did FriCAS change that sequence of events?

Yes.  Toplevel 'where' is macro expanded (and '==' and ':'
contained there are converted to macros).  So when compiler sees
the code there is _no_ where at toplevel.  The reason is
that currently compiler need substantial amount of type
information.  Normally this information is taken from
databases, but during bootstap databases contain almost
no data.  FriCAS collects needed information directly
from constructor definitions, but for that needs macro
expanded form.

BTW: Ability to bootstrap is main reason for the approach, but
FriCAS way also fixes some problems with macros beeing expanded
too late (I forgot datails and it would take some time to find
report, but it appeared on the mailing list).

-- 
                              Waldek Hebisch
[email protected] 

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to