Re: [Haskell-cafe] Data.Text.IO.hGetContents problem on windows

2011-09-19 Thread David Virebayre
Re-bonjour Café, Bryan, > I have a program that works fine on linux, but doesn't on windows. > Is there something I'm doing wrong ? Checking the source code for Data.Text.IO.hGetContents, I see that the only time hFileSize is used is in chooseGoodBuffering when the buffering is in block mode, so

[Haskell-cafe] Data.Text.IO.hGetContents problem on windows

2011-09-19 Thread David Virebayre
Bonjour Café, bonjour Bryan I have a program that works fine on linux, but doesn't on windows. On windows XP with the latest Haskell platform, I get: : hFileSize: invalid argument (Bad file descriptor) I think the problem is with hGetContents from Data.Text.IO, but my google-fu failed to help me

[Haskell-cafe] instance Enum Double considered not entirely great?

2011-09-19 Thread Evan Laforge
So I've been excising occurrences of the [n..m] syntax from my code. The reason is that I had been using [0..5] as a shorthand for [0, 1, 2, 3, 4, 5], mostly in tests. This works for integral types and it appears to work for floating point types. Then I tried switching to a fixed point format, an

Re: [Haskell-cafe] Animas/Yampa - Using Zip as a Routing Function in a Parallel Switch with Feedback

2011-09-19 Thread M. George Hansen
> process >    :: [Activity] >    -> SF [InputEvent] SystemOutput > process activities >    = proc inputEvents -> do >        rec >            let senses = map (\state -> (inputEvents, state)) states >            states <- par route activities -< senses >        returnA -< states > > route >    ::

[Haskell-cafe] Animas/Yampa - Using Zip as a Routing Function in a Parallel Switch with Feedback

2011-09-19 Thread M. George Hansen
Greetings, I've been playing around with functional reactive programming using Animas/Yampa and ran into a strange situation. I'm using a parallel switch to route input to a collection of signal functions and using the output as feedback (to simulate state). Everything works as expected until I at

Re: [Haskell-cafe] Library support for sorting with Text.Data.ICU.Collate.MCollator?

2011-09-19 Thread Richard Cobbe
On Mon, Sep 19, 2011 at 04:29:03PM +0300, Michael Snoyman wrote: > On Mon, Sep 19, 2011 at 4:26 PM, Richard Cobbe wrote: > > I'm trying to sort a list of Text values using a collator obtained from the > > Text.Data.ICU.Collate module in the text-icu package on Hackage. > > Unfortunately, I can't u

Re: [Haskell-cafe] Library support for sorting with Text.Data.ICU.Collate.MCollator?

2011-09-19 Thread Michael Snoyman
On Mon, Sep 19, 2011 at 4:26 PM, Richard Cobbe wrote: > I'm trying to sort a list of Text values using a collator obtained from the > Text.Data.ICU.Collate module in the text-icu package on Hackage. > Unfortunately, I can't use the normal Data.List.sortBy function with one of > these collators, be

[Haskell-cafe] Library support for sorting with Text.Data.ICU.Collate.MCollator?

2011-09-19 Thread Richard Cobbe
I'm trying to sort a list of Text values using a collator obtained from the Text.Data.ICU.Collate module in the text-icu package on Hackage. Unfortunately, I can't use the normal Data.List.sortBy function with one of these collators, because the collators return (IO Ordering), not Ordering. It's e

[Haskell-cafe] 9th Ghent Functional Programming Group meeting on Tuesday, the 4th of October, 2011

2011-09-19 Thread Jasper Van der Jeugt
Hello all, We are glad to invite you to our 9th GhentFPG [1] meeting, which takes place on Thursday, the 4th of October, 2011 at 19:30 in the Technicum building of Ghent University. You do not have to be a Functional Programming guru to attend, everyone eager to learn is welcome. As before, the e

Re: [Haskell-cafe] The applicative instances for Either?

2011-09-19 Thread Ketil Malde
Daniel Fischer writes: >> Is there any information, or otherwise accessible source specifying >> exactly when this was changed, > Checking the sources, it wasn't in base-4.2.0.2 (ghc-6.12.3), but it was in > base-4.3.1.0 (ghc-7.0.2), so it was introduced with base-4.3 Thanks to you, and every