2008/5/1 Galchin, Vasili <vigalchin at gmail.com>: > Here is a simpler case of what I want to do .. > > 1) To function1 pass in (Maybe Int). > > 2) If "Nothing" then pass nullPtr to C function. > > 3) If "Just 1", then pass a pointer to a "1" to teh same C function. Check out Foreign.maybeWith.