Martin,

On 01/18/2012 06:41 PM, Martin Baker wrote:
On Wednesday 18 Jan 2012 16:48:42 Waldek Hebisch wrote:
Assuming everything is in graph.spad:

)boot $bootStrapMode := true
)compile graph.spad
)boot $bootStrapMode := false
)compile graph.spad

OK thanks, I have updated the tutorial, this simplifies the process a
lot.

https://github.com/hemmecke/fricas/commit/6fa5c6e9025c6b6be80d120c04928eeae2367d16

I've updated your tutorial a bit by introducing the "document" command to tangle the files. At least on my computer there also was no Loop domain. So I also had to extract it from graph.spad.pamphlet

I get the same errors that you get.

  compiling exported * : ($,$) -> DirectedGraph Product(S,S)
  Internal Error
  Error while instantiating type DirectedGraph(Product S S)

and I think that Waldek's hint is not the right one. It looks like the error comes from

DirectedGraph(S): Exports == Implementation where
 S: SetCategory
 ...
 SPROD ==> Product(S,S)
 GRPHPROD ==> DirectedGraph SPROD

 Exports ==> Graph(S) with
  ...
  "*":(%,%) -> GRPHPROD
 Implementation ==> add
  ...

You basically want DirectGraph(S) to export a function with signature

  (%, %) -> DirectGraph Product(S, S)

I think, such a function should better live inside a package:

DirectGraphFunctions(S): with
    _*: (DirectGraph S, DirectGraph S) -> DirectGraph Product(S, S)
  == add
    ...

That would probably avoid the bootstrapping problem and looks much cleaner IMHO.

Ralf

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