> On Sat, Apr 08, 2006 at 10:16:53PM +0400, Serge D. Mechveliani wrote:
>> I think that without dependent types for a Haskell-like language,
>> it is impossible to propose any adequate and in the same time plainly
>> looking algebraic class system.
The first paper mentions the foreign function interface, and
transmitting integer by means of tricks with types (I recall
difficulties with existential types), and so on.
It also mentions passing vocabularies (maybe, via foreign interface
Of course, if a language extension allows to express the constructs
if isPrime n
(pass inv (the inversion operation) to the vocabulary
of (ResidueDomain Integer n),
with this implementation ...
else do not pass it
then this is what is needed: an equivalent of a dynamic conditional
In this example, passing inv expresses actially dynamic and
conditional definition of the Field instance.
Field a <==> (CommutativeRing a, `inv' is in vocabulary of a).
In Magma system, and in Aldor, it can be, probably, written
But these systems are not functional, nor lazy, have not pattern
Currently I am out of this field, have not time to study all this.
and with the functionality as of the BAL proposal, then we could
observe whether the thing looks natural enough.
I could also think of doing an attentive investigation on this
subject, maybe, together with some qualified people, if I have
this project as somehow a visiting research job, and paid.
And there is no guarantee that the result occurs positive.