login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Submitted by : Bill Page at: 2008-05-28T20:08:03-07:00 (3 months ago)
Name :
Axiom Version :
Category : Severity : Status :
Optional subject :  
Optional comment :

In OpenAxiom functions can return domain-values. This works for example in

axiom
MyPair(X:Domain,Y:Domain):Domain == Record(p1:X,p2:Y)
Function declaration MyPair : (Domain,Domain) -> Domain has been added to workspace.
Type: Void
axiom
MyPair(Integer,Float)
Cannot compile the declaration for p1 because its (possible partial) type contains a local variable. OpenAxiom will attempt to step through and interpret the code.
axiom
Compiling function MyPair with type (Domain,Domain) -> Domain 
   Compiled code for MyPair has been cleared.
LatexWiki Image(1)
Type: Domain

where Record is a built-in type.

But I cannot use a compiled type such as Product in place of Record

axiom
MyPair2(X:Domain,Y:Domain):Domain == Product(X,Y)
Function declaration MyPair2 : (Domain,Domain) -> Domain has been added to workspace.
Type: Void
axiom
MyPair2(Integer,Float)
Product(#1,#2) is not a valid type.

axiom
Product(Integer,Float)
LatexWiki Image(2)
Type: Domain

Axiom Version: => /usr/local/lib/open-axiom/x86_64-unknown-linux/1.2.0-2008-05-25




subject:
  ( 7 subscribers )  
Please rate this page: