From: skaller <skaller@ozemail.com.au>
To: Tom Hawkins <tom@launchbird.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Invalid_argument("equal: abstract value")?
Date: 01 Jan 2004 14:10:11 +1100 [thread overview]
Message-ID: <1072926610.4197.81.camel@pelican> (raw)
In-Reply-To: <200312311621.51555.tom@launchbird.com>
On Thu, 2004-01-01 at 09:21, Tom Hawkins wrote:
> On Wednesday 31 December 2003 03:55 pm, Tom Hawkins wrote:
> Big_int.big_int_of_string "123" = Big_int.big_int_of_string "456"
>
> Sure enough, 'Invalid_argument("equal: abstract value")'. So what's
> the reasoning?
A bigint is (well, at least contains) an abstract
primitive defined in C, not an algebraic data type.
The compiler doesn't know how to compare bigints.
This could be fixed the same way as for finalisers ..
provide a table of hooks for custom blocks.
Another candidate other than comparison is obviously
serialisation to extend Marshal for abstract/opaque types.
The problem is .. there's no limit to where you'd like
dynamic polymorphism.. you'd end up with Python not Ocaml.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
next prev parent reply other threads:[~2004-01-01 3:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-31 21:55 Tom Hawkins
2003-12-31 22:21 ` Tom Hawkins
2004-01-01 3:10 ` skaller [this message]
2004-01-01 13:36 ` Damien Doligez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1072926610.4197.81.camel@pelican \
--to=skaller@ozemail.com.au \
--cc=caml-list@inria.fr \
--cc=tom@launchbird.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox