wxhaskell

putStrLn doesn't print to console

浪尽此生 提交于 2019-12-05 09:55:48
I am experimenting with wxHaskell. I wasn't able to run the app under ghci, so I have to use application to test it. I wanted to test the program with println debugging. However, it seems that putStrLn doesn't work in GUI: {-# LANGUAGE Haskell2010 #-} module Main where import Graphics.UI.WX drawUI dc view = do circle dc (point 10 10) 5 [penKind := PenSolid, color := red] putStrLn "painted" helloGui :: IO () helloGui = do f <- frame [ text := "Example", resizeable := False, bgcolor := white, layout := space 400 300, on paint := drawUI] return () main :: IO () main = do putStrLn "Started" start

can't get wxHaskell to work from ghci on Mac

人走茶凉 提交于 2019-12-05 08:14:07
I'm trying to run an example using EnableGUI function . % 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

What are the relative merits of wxHaskell and Gtk2HS?

旧街凉风 提交于 2019-12-04 15:49:33
问题 Which is better for developing GUI applications with Haskell, wxWidgets (via wxHaskell) or GTK (via Gtk2HS)? What are the pros and cons of each? Does it vary depending on which platform you are targeting (I would primarily be working on OS X but would like my programs to work on Linux and Windows too)? 回答1: [Disclaimer: I am a wxHaskell maintainer] Both are stable and fairly complete GUI bindings, and you could choose either for most projects with confidence. Both have some degree of 'higher

What are the relative merits of wxHaskell and Gtk2HS?

只谈情不闲聊 提交于 2019-12-03 10:47:51
Which is better for developing GUI applications with Haskell, wxWidgets (via wxHaskell ) or GTK (via Gtk2HS )? What are the pros and cons of each? Does it vary depending on which platform you are targeting (I would primarily be working on OS X but would like my programs to work on Linux and Windows too)? [Disclaimer: I am a wxHaskell maintainer] Both are stable and fairly complete GUI bindings, and you could choose either for most projects with confidence. Both have some degree of 'higher-level' Haskell bindings, but in both cases you will need to drop into rather imperative 'C' style coding

Why does Stack not recognize the dependency it just installed?

依然范特西╮ 提交于 2019-11-30 17:51:19
问题 So I'm trying to use reactive-banana + wxHaskell for GUI programming. As a newbie to Haskell and its dev tools, I'm very perplexed by stack. So I try stack install wx , which prompts me to install wxcore , which prompts me to install wxc and wxdirect . After I stack install wxdirect , I try running stack install wxc , but lo and behold: While constructing the BuildPlan the following exceptions were encountered: -- Failure when adding dependencies: wxdirect: needed (>=0.90.1.1), not present in

Screen capture in Haskell?

女生的网名这么多〃 提交于 2019-11-27 13:57:37
问题 Is it possible to capture the screen (or a window) using Haskell in a Windows environment? (ie, taking a screenshot every few minutes or so). If so, how would one go about doing this (again, in Haskell, for a Windows environment)? More info: I'm a beginner to Haskell. A friend wants to cut development costs by having me whip together some programs for his accounting firm, but he insists that I use Haskell. He wants a tool that will allow him to monitor the desktops of different Windows XP