At 2001-09-23 15:56, Marcin 'Qrczak' Kowalczyk wrote: >> But do you have an example of a Haskell type for a foreign import >> function, for which the corresponding C function type would be ambiguous? > >Ptr CChar (as an argument). It could be either char * or const char *. It's always char*. A Haskell function passed a Ptr CChar is not prevented from modifying the contents of the pointer simply due to its type-declaration. In C, a char* can be implicitly converted to a const char* where necessary (but not the other way around). -- Ashley Yakeley, Seattle WA _______________________________________________ Glasgow-haskell-users mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Marcin 'Qrczak' Kowalczyk
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Marcin 'Qrczak' Kowalczyk
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Manuel M. T. Chakravarty
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Ashley Yakeley
- Re: Ptr and ForeignPtr Questions Ashley Yakeley