[Haskell] Re: Boxing (Day) Question

Ashley Yakeley ashley at semantic.org
Tue Dec 27 02:58:08 EST 2005


In article <43B0962E.6070201 at augustsson.net>,
 Lennart Augustsson <lennart at augustsson.net> wrote:

> Yes, I think it would work.  But I'd think it would be awkward.
> Now you need to know the size of each unboxed type to make polymorphic
> functions (and that's not even portable).

Yes, your polymorphic types and functions are limited to a particular 
kind of storage. But it's similar to C in this respect. If you wanted to 
do allocation yourself, for instance, you could use typed pointers, 
which would all have the same kind. This could be an alternative way of 
doing FFI.

It also might be interesting to allow user definition of certain kinds 
of unboxed datatypes, similar to C++ enumerations.

-- 
Ashley Yakeley, Seattle WA



More information about the Haskell mailing list