无法在Mac上的ghci中使wxHaskell正常工作 [英] can't get wxHaskell to work from ghci on Mac
本文介绍了无法在Mac上的ghci中使wxHaskell正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用EnableGUI
功能.
% ghci -framework Carbon Main.hs
*Main> enableGUI >> main
这是我得到的,而不是正在运行的程序:
This is what I get instead of a working program:
2013-01-14 00:21:03.021 ghc[13403:1303] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-945.11/Misc.subproj/NSUndoManager.m:328
2013-01-14 00:21:03.022 ghc[13403:1303] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2013-01-14 00:21:03.024 ghc[13403:1303] (
0 CoreFoundation 0x00007fff8c8ea0a6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff867243f0 objc_exception_throw + 43
2 CoreFoundation 0x00007fff8c8e9ee8 +[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff884966a2 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 189
4 Foundation 0x00007fff884fc8b7 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff8ecb832d -[NSApplication run] + 687
6 libwx_osx_cocoau_core-2.9.4.0.0.dylib 0x000000010ae64c96 _ZN14wxGUIEventLoop5DoRunEv + 40
7 libwx_baseu-2.9.4.0.0.dylib 0x000000010b37e0e5 _ZN13wxCFEventLoop3RunEv + 63
8 libwx_baseu-2.9.4.0.0.dylib 0x000000010b2e91bf _ZN16wxAppConsoleBase8MainLoopEv + 81
9 libwx_osx_cocoau_core-2.9.4.0.0.dylib 0x000000010ae1b04f _ZN5wxApp5OnRunEv + 29
10 libwx_baseu-2.9.4.0.0.dylib 0x000000010b32e8d1 _Z7wxEntryRiPPw + 102
11 libwxc.dylib 0x000000010bc8a9a4 ELJApp_InitializeC + 116
12 ??? 0x000000010beb9702 0x0 + 4494956290
)
2013-01-14 00:21:03.024 ghc[13403:1303] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-945.11/Misc.subproj/NSUndoManager.m:328
当我编译并macosx-app
时,它运行得很好,但是出于明显的原因,我真的希望它在ghci
中工作.
When I'm compile and macosx-app
it, it works rather well, but, for obvious reasons, I really want this to work from ghci
.
我该怎么办? Google没有透露与Haskell一起使用的NSUndoManager
的繁琐问题. :(
What can I do? Google reveals nothing about the misterious problems of NSUndoManager
used with Haskell. :(
推荐答案
ghci -fno-ghci-sandbox
ghci -fno-ghci-sandbox
在OSX 10.8和wx 0.90.0.1上为我工作
works for me on OSX 10.8 , wx 0.90.0.1
感谢Heinrich: https://github.com/jodonoghue/wxHaskell/pull/6
thanks to Heinrich :https://github.com/jodonoghue/wxHaskell/pull/6
这篇关于无法在Mac上的ghci中使wxHaskell正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文