Ptr and ForeignPtr Questions
Manuel M. T. Chakravarty
Mon, 24 Sep 2001 12:14:25 +1000
Ashley Yakeley <firstname.lastname@example.org> wrote,
> At 2001-09-23 04:02, Manuel M. T. Chakravarty wrote:
> >> I would assume that Ptr types would always be mapped to non-const
> >> pointers. Do you have an example of a Haskell type for a foreign import
> >> function, for which the corresponding C function type would be ambiguous?
> >Take, for example, the following excerpt of the Linux man
> 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?
Hmm, we must be misunderstanding each other. Given that you
foreign import strcat :: Ptr CChar -> Ptr CChar -> IO (Ptr CChar)
How do you want to know whether the C prototype is
char *strcat(char *dest, const char *src);
char *strcat(char *dest, char *src);