|
|
last edited 16 years ago by Bill Page |
1 2 3 4 | ||
Editor: Bill Page
Time: 2008/05/28 20:08:20 GMT-7 |
||
Note: |
added:
From BillPage Wed May 28 20:08:20 -0700 2008
From: Bill Page
Date: Wed, 28 May 2008 20:08:20 -0700
Subject:
Message-ID: <20080528200820-0700@axiom-wiki.newsynthesis.org>
Axiom Version: => /usr/local/lib/open-axiom/x86_64-unknown-linux/1.2.0-2008-05-25
In OpenAxiom? functions can return domain-values. This works for example in
axiomMyPair(X:Domain,Y:Domain):Domain == Record(p1:X,p2:Y) Function declaration MyPair : (Domain,Domain) -> Domain has been added to workspace.
axiomMyPair(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.
Compiling function MyPair with type (Domain,Domain) -> Domain Compiled code for MyPair has been cleared.
![]() | (1) |
where Record
is a built-in type.
But I cannot use a compiled type such as Product
in place of Record
axiomMyPair2(X:Domain,Y:Domain):Domain == Product(X,Y) Function declaration MyPair2 : (Domain,Domain) -> Domain has been added to workspace.
axiomMyPair2(Integer,Float) Product(#1,#2) is not a valid type. Product(Integer,Float)
![]() | (2) |