
Thanks for the pointer!
I was able to compile and run the sample program Resize.hs (“ghc –make
Resize.hs”), but when I load that module into GHCi and run main, I get a
run-time error:
*Main> main
2016-01-02 16:24:42.245 ghc[52790:1003] *** Assertion failure in
+[NSUndoManager _endTopLevelGroupings],
/SourceCache/Foundation/Foundation-1056.17/Misc.subproj/NSUndoManager.m:328
2016-01-02 16:24:42.245 ghc[52790:1003] +[NSUndoManager(NSInternal)
_endTopLevelGroupings] is only safe to invoke on the main thread.
2016-01-02 16:24:42.246 ghc[52790:1003] (
0 CoreFoundation 0x00007fff913b225c
__exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff93581e75
objc_exception_throw + 43
2 CoreFoundation 0x00007fff913b2038
+[NSException raise:format:arguments:] + 104
3 Foundation 0x00007fff90bb9361
-[NSAssertionHandler
handleFailureInMethod:object:file:lineNumber:description:] + 189
4 Foundation 0x00007fff90b238ac
+[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 156
5 AppKit 0x00007fff914a7a23
-[NSApplication run] + 688
6 libwx_osx_cocoau_core-3.0.0.2.0.dylib 0x0000000113101ce3
_ZN5wxApp10CallOnInitEv + 143
7 libwx_baseu-3.0.0.2.0.dylib 0x00000001135eb396
_Z7wxEntryRiPPw + 47
8 libwxc.dylib 0x0000000115dfbd3c
ELJApp_InitializeC + 124
9 libHSwxcore-0.92.2.0-14assQ7lWYy0vwBRqyjk7D-ghc7.10.3.dylib
0x0000000114e8a5cc cc2eh_info + 132
)
2016-01-02 16:24:42.321 ghc[52790:1003] *** Assertion failure in
+[NSUndoManager _endTopLevelGroupings],
/SourceCache/Foundation/Foundation-1056.17/Misc.subproj/NSUndoManager.m:328
*Main>
A little googling found an issue: Crash when running a sample program in
ghci on OSX https://github.com/bsl/GLFW-b/issues/53. One comment
recommends the following in ghci:
:set -fno-ghci-sandbox
When I use this command in a fresh ghci process (not after a crash), the
sample works. However, when I run “main” a second time, the window doesn’t
appear. Instead, I get some sort of undead process (called “ghc”) that I
have to kill manually.
I installed wxWidgets via “brew update && brew install wxWidgets” and
wxHaskell via “cabal update && cabal install wx”. I’m running Mac OS 10.9.5.
Has anyone gotten this latest wxHaskell to play well with ghci on Mac OS?
-- Conal
On Sat, Jan 2, 2016 at 4:58 AM, Henk-Jan van Tuyl
I don't have a Mac OS computer available, I hope someone else will tell us. There are a lot of sample programs at https://github.com/wxHaskell/wxHaskell/tree/master/samples
Regards, Henk-Jan van Tuyl
On Sat, 02 Jan 2016 06:08:21 +0100, Conal Elliott
wrote: Fantastic news! Thanks for the update. Does wxHaskell work (non-fatally)
with GHCi on Mac OS also? Are there sample programs for an easy test run? -- Conal
On Fri, Jan 1, 2016 at 3:34 PM, Henk-Jan van Tuyl
wrote: L.S.,
For people who gave up on wxHaskell in the past, because wxHaskell didn't run (properly) in GHCi: I just found out, that wxHaskell programs run properly in GHCi on Windows, if you use the newest wxHaskell plus GHC 7.10.3 (both the 32 bit and the 64 bit version).
Regards, Henk-Jan van Tuyl
-- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/
http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming --