[Haskell] postgresql foreign function call segfaults