On 22/11/15 09:57, Alasdair McAndrew wrote:
Ahh, well I just did it in a *.input file, using the interactive
language rather than SPAD.  Maybe you need to give the output type of
myFn, as in

myFn(inp:Boolean):Boolean==
   outputList(["abc",1])@Void
   inp

But I really don't know, as whenever I try and write in SPAD I always
get errors.  So I'm just guessing here.

Hi Alasdair,

No I still get the same errors, even when I add the return type as below.

The error message seems to suggest it is failing to match on inputs rather than outputs (although I don't fully trust the error messages so its worth trying all ideas).

I do seem to remember Waldek saying, in an old email, that there is some issue with matching on type 'Any' but its hard to search and find old posts (there must be a better way of recording these issues). If that is the issue it would be good to have a fix because I would have thought outputList would be useful for others in addition to myself.

Thanks for the ideas.

Martin

--------------------------------------------------
)abbrev domain OERR1 OutErr1
OutErr1() : Exports == Impl where
     Exports ==> with
      myFn : (Boolean) -> Boolean
     Impl ==> add
      Rep := Boolean
      myFn(inp:Boolean):Boolean==
        outputList(["abc",1])@Void
        inp

)abbrev domain OERR2 OutErr2
OutErr2() : Exports == Impl where
     Exports ==> with
      myFn : (Boolean) -> Boolean
     Impl ==> add
      Rep := Boolean
      myFn(inp:Boolean):Boolean==
        outputList(["abc",1])$OutputPackage
        inp

)abbrev domain OERR3 OutErr3
OutErr3() : Exports == Impl where
     Exports ==> with
      myFn : (Boolean) -> Boolean
     Impl ==> add
      Rep := Boolean
      myFn(inp:Boolean):Boolean==
        outputList(["abc",1])$OutputPackage@Void
        inp

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to fricas-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to