[wxhaskell-users] type safe handling of flags
I don't know whether I proposed it already ... I wrote a package called enumset. It provides low-level bitsets like they are used by wxWidget. The definition is essentially: newtype EnumSet storage index = EnumSet storage E.g. with data Style = Bold | Italic | Underlined deriving (Enum) the type (EnumSet Word32 Style) represents a subset of {Bold, Italic, Underlined} stored as a bitfield in a Word32. http://hackage.haskell.org/packages/archive/enumset/0.0.4/doc/html/Data-EnumSet.html The other modules can be used to manage bitfields where not individual bits must be processed, but there are groups of bits, where each group represents a value. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxhaskell-users mailing list wxhaskell-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-users
[wxhaskell-users] Fwd: UI updates from non-UI threads: an addition to wx?
Including wxhaskell-users. Anyone interested in async UI update functionality? Cheers, Maciek -- Forwarded message -- From: maciek.makow...@gmail.com Date: Fri, Aug 24, 2012 at 10:41 PM Subject: UI updates from non-UI threads: an addition to wx? To: wxhaskell-devel wxhaskell-de...@lists.sourceforge.net Getting wxHaskell to handle UI updates from non-UI threads was a frustrating experience; it's embarassing how long it took me to realise that the solution presented in this StackOverflow answer: http://stackoverflow.com/a/3182588/424978 is probably the only viable one. I've packaged it into a tiny module that provides Gtk2hs-style `postGUIAsync` function: https://github.com/mmakowski/habaz/blob/master/src/Graphics/UI/WX/Async.hs. Is there any interest in incorporating this into wxHaskell proper? It might save other users some head scratching. Regards, Maciek -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ wxhaskell-users mailing list wxhaskell-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxhaskell-users