Здравствуйте, я хочу использовать сишный popen в Хаскеле. У меня два вопроса: 1) почему при компиляции такого кода:
{-# INCLUDE <unistd.h> #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Popen() where
import Foreign.C.Types
import Foreign.C.String
import IO
foreign import stdcall unsafe "popen" c_popen :: CString -> CString -> IO (Ptr CFile)
foreign import stdcall unsafe "pclose" c_pclose :: Ptr CFile -> IO()
я получаю:
[1 of 1] Compiling Popen ( /home/aswed/new.hs, interpreted )
ghc: panic! (the 'impossible' happened)
(GHC version 6.12.1 for i386-unknown-linux):
convToABI: convention not supported
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Debian-specific note: please remove old .hi files and try again.
For details, see /usr/share/doc/ghc6/README.Debian