[Prev][Next][Index][Thread]
generic-arithmetic library
-
To: info-dylan@ai.mit.edu
-
Subject: generic-arithmetic library
-
From: Chris Double <chris@double.co.nz>
-
Date: Sun, 15 Oct 2000 00:45:02 -0400 (EDT)
-
Organization: None.
-
Sender: unknown@DOUBLE
-
User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) Emacs/20.6
-
Xref: traf.lcs.mit.edu comp.lang.dylan:12744
Functional Developer has a generic-arithmetic library that seems to
allow extending the <abstract-integer> type for creating things like
<big-integer> (which is part of FD anyway).
Is it possible to use this for third parties to create extensions of
the <integer> types? I tried following the information in the
documentation but it always tells me that my integer type cannot
derive from <integer> becuse <integer> is sealed. Any pointers? Has
anyone tried it? Or is generic-arithmentic only usable by FD
developers?
Here's how I've defined my library and stuff:
define library my-lib
use functional-dylan;
use generic-arithmetic;
export my-module;
end library my-lib;
define module my-module
use generic-arithmetic-functional-dylan;
// Add binding exports here.
export <my-integer>;
end module my-module;
define class <my-integer> (<integer>)
end class <my-integer>;
// Error is:
The superclass <integer> of <my-integer> is defined in another library, and
sealed.
Documentation on generic-arithmetic is at:
http://www.functionalobjects.com/products/doc/core/core_190.htm
Chris.
--
http://www.double.co.nz/dylan