2 Apr 2009 19:00
Re: [open-axiom-devel] rep/per again
> | On Thu, Apr 2, 2009 at 12:06 AM, Gabriel Dos Reis wrote: > | > If you're not proposing to export the Rep, then your proposal is a bit > | > obscure to me. Would you mind clarifying why the above does not > | > amount to exporting the Rep of SomeDomain? > | > > Bill Page wrote: > | Because it is not part of the 'with' clause and appears to the right > | of ==. > On Thu, Apr 2, 2009 at 10:38 AM, Gabriel Dos Reis wrote: > But with your construct, in the capsule I would be able to tell what > Rep(SomeDomain) is. That reveals the Rep of SomeDomain, and > effectively exports it. > Let's take a real example from 'src/algebra/tree.spad.pamphlet': <<domain BSTREE BinarySearchTree>>= )abbrev domain BSTREE BinarySearchTree ++ Description: BinarySearchTree(S) is the domain of ++ a binary trees where elements are ordered across the tree. ++ A binary search tree is either empty or has ++ a value which is an S, and a ++ right and left which are both BinaryTree(S) ++ Elements are ordered across the tree. BinarySearchTree(S: OrderedSet): Exports == Implementation where Exports == BinaryTreeCategory(S) with binarySearchTree: List S -> % ++ binarySearchTree(l) \undocumented(Continue reading)
RSS Feed