I did a tiny bit of digging.  Results:

* Maybe every domain (either of category Type, or BasicType) should have
  CoercibleTo(%), and ConvertibleTo should have CoercibleTo.  There are two
  possible reasons against it:

  1) it might not work (after all, it's somehow recursive)

  2) it might slow down the system.

  Maybe somebody with a few spare cpu cycles could try the patch below? (from a 
fresh
  checkout!)

* compiledFunction should take an InputForm.  I think that would be much
  cleaner.  We should say in mkfunc.spad

MakeFunction(S: InputForm): Exports == Implementation where

...

    function(s:S, name:SY, args:List SY) ==
      interpret function(s, args, name)$InputForm
      name

...

MakeUnaryCompiledFunction(S, D, I): Exports == Implementation where
  S: InputForm

..
and then in exprode.spad build a proper InputForm instead of cheating with 
operators.

(If InputForm has ConvertibleTo InputForm, we could restrict the sort of
functions we want to accept in MakeUnaryCompiledFunction, which may be useful)

Martin



Index: catdef.spad.pamphlet
===================================================================
--- catdef.spad.pamphlet        (revision 415)
+++ catdef.spad.pamphlet        (working copy)
@@ -170,7 +170,7 @@
 ++ Description:
 ++ \spadtype{BasicType} is the basic category for describing a collection
 ++ of elements with \spadop{=} (equality).
-BasicType(): Category == with
+BasicType(): Category == CoercibleTo(%) with
       "=": (%,%) -> Boolean    ++ x=y tests if x and y are equal.
       "~=": (%,%) -> Boolean   ++ x~=y tests if x and y are not equal.
    add
Index: coerce.spad.pamphlet
===================================================================
--- coerce.spad.pamphlet        (revision 415)
+++ coerce.spad.pamphlet        (working copy)
@@ -46,7 +46,7 @@
 ++ A is convertible to B means any element of A
 ++ can be converted into an element of B,
 ++ but not automatically by the interpreter.
-ConvertibleTo(S:Type): Category == with
+ConvertibleTo(S:Type): Category == CoercibleTo(S) with
     convert: % -> S
       ++ convert(a) transforms a into an element of S.
 


  


--~--~---------~--~----~------------~-------~--~----~
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