Re: [Haskell-cafe] Strange context reduction with partial application and casting

2011-07-03 Thread dm-list-haskell-cafe
At Sat, 2 Jul 2011 17:23:50 -0400, Brent Yorgey wrote: On Sat, Jul 02, 2011 at 09:02:13PM +0200, Daniel Fischer wrote: - disabling the monomorphism restriction :set -XNoMonomorphismRestriction let g = f This is the recommended solution. The confusion caused by the MR far outweighs

Re: [Haskell-cafe] Strange context reduction with partial application and casting

2011-07-03 Thread Daniel Fischer
On Sunday 03 July 2011, 09:19:11, dm-list-haskell-c...@scs.stanford.edu wrote: At Sat, 2 Jul 2011 17:23:50 -0400, Brent Yorgey wrote: On Sat, Jul 02, 2011 at 09:02:13PM +0200, Daniel Fischer wrote: - disabling the monomorphism restriction :set -XNoMonomorphismRestriction

Re: [Haskell-cafe] Data.Time

2011-07-03 Thread Malcolm Wallace
On 2 Jul 2011, at 22:13, Yitzchak Gale wrote: [1]http://hackage.haskell.org/package/timezone-series [2]http://hackage.haskell.org/package/timezone-olson I'd just like to add that these timezone packages are fantastic. They are extremely useful if you need accurate conversion between

[Haskell-cafe] [Haskell-Cafe] Constructive Probability Theory and RandProc's σ-algebras

2011-07-03 Thread Edward Kmett
On Sun, Jul 3, 2011 at 11:05 AM, David Banas dba...@banasfamily.net wrote: v0.4 of `RandProc` has just been posted to Hackage: http://hackage.haskell.org/package/randproc [NB: I transfered this discussion from haskell to haskell-cafe, and started another thread] I have been spending some

[Haskell-cafe] video for linux two (v4l2) bindings

2011-07-03 Thread Claude Heiland-Allen
Greetings all, I uploaded 4 new packages that may be of interest: bindings-linux-videodev2 0.1 - bindings to Video For Linux Two (v4l2) kernel interfaces http://hackage.haskell.org/package/bindings-linux-videodev2-0.1 bindings-mmap 0.1 - bindings to mmap for POSIX

[Haskell-cafe] ANNOUNCE: regex-applicative-0.1

2011-07-03 Thread Roman Cheplyaka
I am glad to announce the initial release of regex-applicative. Hackage: http://hackage.haskell.org/package/regex-applicative Repository: https://github.com/feuerbach/regex-applicative Issues: https://github.com/feuerbach/regex-applicative/issues regex-applicative is aimed to be an

Re: [Haskell-cafe] video for linux two (v4l2) bindings

2011-07-03 Thread Christopher Done
Sounds awesome! I was recently thinking I wanted a v4l-binding. In the past I've patched vgrabbj so that I could pipe it and use it from Haskell, but wanted a direct binding. I just had a quick try with cabal-install and got the below. I'm not sure where linux/posix_types is supposed to come

Re: [Haskell-cafe] video for linux two (v4l2) bindings

2011-07-03 Thread Daniel Fischer
On Sunday 03 July 2011, 21:34:17, Christopher Done wrote: I just had a quick try with cabal-install and got the below. I'm not sure where linux/posix_types is supposed to come from. Is this error obvious to you? glibc-devel or the equivalent package for your distro, I think.

Re: [Haskell-cafe] Confused about my IterIO code

2011-07-03 Thread John Ky
Thanks David, Right - it invokes its iter repeatedly because mkInumC does that and mkInum is defined as: mkInum = mkInumC id noCtl So to do it all manually is: inumReverseLines :: (Monad m) = Inum L.ByteString L.ByteString m a inumReverseLines = mkInumM $ loop where loop = do eof -

[Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Jason Dagit
Hello, I have a GUI program that when I compile it and run it there are no problems. When I load it into GHCI and type, main, it loads the main window but there are no window decorations and the program hangs to the point where I have to kill the ghci process. You see a spinning cursor when you

Re: [Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 5:16 PM, Jason Dagit dag...@gmail.com wrote: Hello, I have a GUI program that when I compile it and run it there are no problems.  When I load it into GHCI and type, main, it loads the main window but there are no window decorations and the program hangs to the point

Re: [Haskell-cafe] Strange context reduction with partial application and casting

2011-07-03 Thread Ryan Ingram
On Sun, Jul 3, 2011 at 2:05 AM, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: But as I understand it, the concern is ghci, where truly local bindings are probably rare and type signatures are commonly omitted. So putting :s -XNoMonomorphismRestriction in the .ghci file probably

Re: [Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Alexander Solla
On Sun, Jul 3, 2011 at 5:16 PM, Jason Dagit dag...@gmail.com wrote: Hello, I have a GUI program that when I compile it and run it there are no problems. When I load it into GHCI and type, main, it loads the main window but there are no window decorations and the program hangs to the point

Re: [Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 8:31 PM, Alexander Solla alex.so...@gmail.com wrote: On Sun, Jul 3, 2011 at 5:16 PM, Jason Dagit dag...@gmail.com wrote: Hello, I have a GUI program that when I compile it and run it there are no problems.  When I load it into GHCI and type, main, it loads the main

[Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread Jason Dagit
Hello, I'm trying to get some GUI code working on OSX and numerous forums around the internet keep reiterating that on OSX to correctly handle GUI events you need to use the original thread allocated to your process to check for events and to call the Cocoa framework functionality. Specifically,

Re: [Haskell-cafe] Data.Time

2011-07-03 Thread Ashley Yakeley
On 2011-07-02 14:03, Yitzchak Gale wrote: Not exactly. A TimeZone in Data.Time doesn't really represent a time zone - it represents a specific clock setting in a time zone. I still regret this! I should have called it TimeOffset or somesuch. To get a TimeZoneSeries, representing a time zone

Re: [Haskell-cafe] GUI Program Hangs in GHCI

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 9:06 PM, Jason Dagit dag...@gmail.com wrote: On Sun, Jul 3, 2011 at 8:31 PM, Alexander Solla alex.so...@gmail.com wrote: On Sun, Jul 3, 2011 at 5:16 PM, Jason Dagit dag...@gmail.com wrote: Hello, I have a GUI program that when I compile it and run it there are no

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread Felipe Almeida Lessa
On Mon, Jul 4, 2011 at 2:02 AM, Jason Dagit dag...@gmail.com wrote: My second question is, if there is no current workaround then how can we remedy this situation?  It seems like there could be an api function like: runOnOriginalThread :: IO a - IO a Isn't there something on Cocoa that would

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 10:02 PM, Jason Dagit dag...@gmail.com wrote: Hello, I'm trying to get some GUI code working on OSX and numerous forums around the internet keep reiterating that on OSX to correctly handle GUI events you need to use the original thread allocated to your process to

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread David Barbour
On Jul 3, 2011, Jason Dagit dag...@gmail.com wrote: to correctly handle GUI events you need to use the original thread allocated to your process to check for events and to call the Cocoa framework functionality. I looked at the threading documentation in Control.Concurrent for GHC and it's

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 10:31 PM, David Barbour dmbarb...@gmail.com wrote: On Jul 3, 2011, Jason Dagit dag...@gmail.com wrote: to correctly handle GUI events you need to use the original thread allocated to your process to check for events and to call the Cocoa framework functionality. I

Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?

2011-07-03 Thread Jason Dagit
On Sun, Jul 3, 2011 at 10:22 PM, Felipe Almeida Lessa felipe.le...@gmail.com wrote: On Mon, Jul 4, 2011 at 2:02 AM, Jason Dagit dag...@gmail.com wrote: My second question is, if there is no current workaround then how can we remedy this situation?  It seems like there could be an api function