On Tue, May 02, 2023 at 12:50:07PM +0200, Ralf Hemmecke wrote:
> Dear Waldek,
>
> > RED: (C:Type, LF:Type, XAB:Type) -> QEtaComputationReductionCategory(LF, XAB)
>
> > is probably unsupported. First, giving names of arguments is not
> > really supported, at best they will be ignored but potentially
> > they may cause trouble. Second, QEtaComputationReductionCategory(LF, XAB)
> > depends on argument, this is unsupported.
>
> Thank you for your clarification.
>
> Being not able to give names to argument ...
>
> We have this in our library.
>
> entries : (lp : %) -> List NNI
>
>
https://github.com/fricas/fricas/blob/master/src/algebra/graph.spad#L1033
>
> That is of course unnecessary and I would like to remove the "lp : " in
> these cases (there are several of them). But I found it too unimportant
> until now.
Well, I would like to support argument names some day, so if this
works let it stay.
> You probably meant something else like: the SPAD compiler does not support
> dependent types?
As I wrote: constructor are example of dependent types, so in this
sense dependent types work. But support for dependence on something
else than constuctor parameters is quite limited and you can not
declare ordinary functions with dependencies like constructors.
It is a constructor, internally handled quite different than functions.
> It seems that you tell me that I can create something
> like Localize, but *not* use it as a first class object, i.e. pass it as an
> argument to a function.
Yes, you can not. You can not even give correct type to 'Localize'
(it is not a function).
> And I mean "Localize", not "Localize(M,R)", because,
> the compiler doesn't allow me to specify the type of the argument as
>
> (Module R, R : CommutativeRing) -> Module R
>
> Well, if that is the case, it's a pity, but I can live with it for now.
>
> Thanks again for your answer.
>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
fricas-devel...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/5cb8efd3-6bb1-aca3-0b65-e14fb4863f9a%40hemmecke.de.
--
Waldek Hebisch