On Tue, 28 Mar 2000, Fergus Henderson wrote: > `struct HsStablePtrSomeUserDefinedTypeConstructor *'. > > Actually on second thoughts I think that should perhaps be just > > `struct HsSomeUserDefinedTypeConstructor *' > > and likewise for all the other mappings from `StablePtr' types; "HsInt *"? Certainly no, because it is not a pointer to HsInt. You can't dereference it and get HsInt, it's an abstract type - it would be misleading. Do you want to mirror every type constructor and provide a C type for each to use as a tag of StablePtr only? StablePtrs are most often used either polymorphically or with complex types (because simple monomorphic types like Int will be usually passed unboxed). Exactly the cases where your C pointer trick is hard! And generally StablePtrs should not be used very frequently. IMHO it's much more complications than advantages. -- Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Manuel M. T. Chakravarty
- Re: Additions to the FFI API Fergus Henderson
- Re: Additions to the FFI API Manuel M. T. Chakravarty
- Re: Additions to the FFI API Fergus Henderson
- Re: Additions to the FFI API Fergus Henderson
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Manuel M. T. Chakravarty
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Fergus Henderson
- Re: Additions to the FFI API Qrczak
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Fergus Henderson
- No more additions to the FFI API... Andy Gill
- Re: No more additions to the FFI AP... Manuel M. T. Chakravarty
- Re: No more additions to the FFI AP... Fergus Henderson
- Re: No more additions to the FF... Sven Panne
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Marcin 'Qrczak' Kowalczyk
- Re: Additions to the FFI API Fergus Henderson