基本问题:
我正在尝试使用OSX 10.10.4 上的标准 mac 指令gtk
安装 Haskell 的软件包。具体来说,我想运行,所以我需要. 早期阶段和工作都很好,但是当我threadscope
gtk
homebrew
gtk buildtools
cabal install gtk
或使用
cabal install --with-gcc=gcc-4.8 gtk
我收到以下编译错误:
Graphics/UI/Gtk/Embedding/Plug.chs:120:6:
Couldn't match expected type ‘Ptr ()’
with actual type ‘Maybe DrawWindow’
In the first argument of ‘gtk_plug_new’, namely
‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
In the second argument of ‘($)’, namely
‘gtk_plug_new
(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
Graphics/UI/Gtk/Embedding/Plug.chs:137:6:
Couldn't match expected type ‘Ptr ()’
with actual type ‘Maybe DrawWindow’
In the second argument of ‘\ (Display arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_plug_new_for_display argPtr1 arg2’, namely
‘(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
In the second argument of ‘($)’, namely
‘(\ (Display arg1) arg2
-> withForeignPtr arg1
$ \ argPtr1 -> gtk_plug_new_for_display argPtr1 arg2)
display
(fromNativeWindowId (fromMaybe nativeWindowIdNone socketId))’
Graphics/UI/Gtk/Embedding/Plug.chs:151:3:
Couldn't match type ‘Ptr ()’ with ‘Maybe DrawWindow’
Expected type: IO (Maybe DrawWindow)
Actual type: IO (Ptr ())
In the second argument of ‘($)’, namely
‘(\ (Plug arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_plug_get_id argPtr1)
(toPlug self)’
In the expression:
liftM toNativeWindowId
$ (\ (Plug arg1)
-> withForeignPtr arg1 $ \ argPtr1 -> gtk_plug_get_id argPtr1)
(toPlug self)
cabal: Error: some packages failed to install:
在我将Haskellgtk
平台threadscope
从. 起初我假设安装冲突,但我反复使用彻底的删除说明从我的系统中删除了 Haskell 平台,并重新尝试安装,但没有成功。我什至使用 删除并重新安装了底层和相关软件包,但还是没有成功。ghc 7.8.4
ghc 7.10.2
threadscope
gtk+
homebrew
我不确定类型Ptr ()
和Maybe DrawWindow
起源,因此不确定冲突可能来自哪里。欢迎任何关于可能出错的想法!