Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-20 Thread oleg
Daniel Schuessler wrote: > The thing I don't understand yet is the last line: Why is it OK to discard the > leftover input from the (f x) Iteratee and yield just the leftover input from > the first one (m0)? First of all, the question is about an older version of Iteratee. For example, the follo

Re: [Haskell-cafe] QuickCheck, (Ord a)=> [a] -> Property problem

2011-04-20 Thread larry.liuxinyu
Hi, Thanks a lot. The following type protocol also works. prop_foo :: (Ord a)=>(Num a) => [a] -> Property Somebody told me that: Eduard Sergeev • BTW, more recent QuickCheck (from Haskell Platform 2011.2.0.X - contains QuickCheck-2.4.0.1) seems to identifies the problem correctly: *** Failed! F

[Haskell-cafe] Haskell Weekly News: Issue 178

2011-04-20 Thread Daniel Santa Cruz
Welcome to issue 178 of the HWN, a newsletter covering developments in the Haskell community. This release covers the week of April 10 to 16, 2011. You can find the HTML version at: http://bit.ly/feMLgB Announcements Simon Marlow commented (http://goo.gl/XythI) on plans to have a

Re: [Haskell-cafe] http://trac.haskell.org/ not redering correctly

2011-04-20 Thread Conrad Parker
On 21 April 2011 05:34, Andrew Coppin wrote: >>> I notice that there's duplicate reports of the HTML documentation in the >>> Haskell Platform having chunks missing >> >> Which ticket numbers are these? Trac allows one of them to be closed >> as a duplicate. Perhaps you can do that, or at least pr

Re: [Haskell-cafe] impoosible dependencies

2011-04-20 Thread Albert Y. C. Lai
On 11-04-20 05:51 PM, Kevin Quick wrote: cabal: dependencies conflict: ghc-6.12.3 requires unix ==2.4.0.2 however unix-2.4.0.2 was excluded because ghc-6.12.3 requires unix ==2.4.1.0 [and later] cabal: dependencies conflict: ghc-6.12.3 requires array ==0.3.0.2 however array-0.3.0.2 was exclud

Re: [Haskell-cafe] impoosible dependencies

2011-04-20 Thread Carter Schonwald
Kevin, what version of cabal install are you using? I ask because prior to the 1.10.* version series, cabal would have a much harder time "correctly" choosing versions of dependencies, which at least for me often manifested as such confusions in caba regarding selecting versions. Prior to said cab

Re: [Haskell-cafe] impoosible dependencies

2011-04-20 Thread Rogan Creswick
On Wed, Apr 20, 2011 at 4:18 PM, Kevin Quick wrote: > > With --verbose=3 this appears to be post-link running cabal-dev itself: > > $ cabal install cabal-dev --verbose=3 > Could you send me (or post to hpaste) the complete output of 'cabal install cabal-dev --verbose=3' ? --Rogan > ... > > ***

Re: [Haskell-cafe] impoosible dependencies

2011-04-20 Thread Kevin Quick
On Wed, 20 Apr 2011 15:18:21 -0700, Rogan Creswick wrote: On Wed, Apr 20, 2011 at 2:51 PM, Kevin Quick wrote: $ cabal update $ cabal install hakyll Resolving dependencies... cabal: dependencies conflict: ghc-6.12.3 requires unix ==2.4.0.2 however unix-2.4.0.2 was excluded because ghc-6.12.3 r

Re: [Haskell-cafe] impoosible dependencies

2011-04-20 Thread Rogan Creswick
On Wed, Apr 20, 2011 at 2:51 PM, Kevin Quick wrote: > $ cabal update > $ cabal install hakyll > Resolving dependencies... > cabal: dependencies conflict: ghc-6.12.3 requires unix ==2.4.0.2 however > unix-2.4.0.2 was excluded because ghc-6.12.3 requires unix ==2.4.1.0 > $ > > Any advice (other than

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-20 Thread John A. De Goes
It's not OK and it's an artifact of the weak-typing and ill-defined semantics that pervade iteratee libraries. It's possible to do a lot of bad stuff, including binding with an iteratee yielding a remainder without consuming input. Regards, John A. De Goes Twitter: @jdegoes LinkedIn: http://l

[Haskell-cafe] impoosible dependencies

2011-04-20 Thread Kevin Quick
Hmmm... $ cabal update $ cabal install hakyll Resolving dependencies... cabal: dependencies conflict: ghc-6.12.3 requires unix ==2.4.0.2 however unix-2.4.0.2 was excluded because ghc-6.12.3 requires unix ==2.4.1.0 $ Any advice (other than upgrading to 7.0.3, which is not an option at the moment

Re: [Haskell-cafe] Question about the Monad instance for Iteratee (from the enumerator package)

2011-04-20 Thread John Millikin
It's forbidden for an iteratee to yield extra input that it hasn't consumed; however, this is unfortunately not enforced by the type system. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Data.Binary.IncrementalGet remake

2011-04-20 Thread Lennart Kolmodin
Hi, On Wed, Apr 20, 2011 at 8:35 PM, Antoine Latter wrote: > On Wed, Apr 20, 2011 at 1:03 PM, Sergey Mironov wrote: > > Hello cafe. > > > > Haskell wiki told me about continuation-based parser > > Data.Binary.IncrementalGet [1] from binary-strict package. I found the > > idea very useful and tr

Re: [Haskell-cafe] http://trac.haskell.org/ not redering correctly

2011-04-20 Thread Andrew Coppin
I notice that there's duplicate reports of the HTML documentation in the Haskell Platform having chunks missing Which ticket numbers are these? Trac allows one of them to be closed as a duplicate. Perhaps you can do that, or at least provide those details in email here. When I get a minute I'l

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 20:27, Bas van Dijk wrote: > On 20 April 2011 18:34, Johan Tibell wrote: >> On Wed, Apr 20, 2011 at 6:11 PM, Bas van Dijk wrote: >>> I still need to add appropriate conditions for checking whether the >>> program is using the threaded RTS. What is the recommended approach >>> fo

Re: [Haskell-cafe] Data.Binary.IncrementalGet remake

2011-04-20 Thread Antoine Latter
On Wed, Apr 20, 2011 at 1:03 PM, Sergey Mironov wrote: > Hello cafe. > > Haskell wiki told me about continuation-based parser > Data.Binary.IncrementalGet [1] from binary-strict package. I found the > idea very useful and tried to use it. Original library by Lennart > Kolmodin raises some question

Re: [Haskell-cafe] Hackage haddock not running?

2011-04-20 Thread Antoine Latter
Maybe the cabal-devel list is also a good one to include on this? Either way I've added them to the CC list. On Wed, Apr 20, 2011 at 12:26 PM, Chris Smith wrote: > I've noticed a lot of packages recently missing documentation links on > Hackage.  It looks like the job to build these hasn't been r

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 18:34, Johan Tibell wrote: > On Wed, Apr 20, 2011 at 6:11 PM, Bas van Dijk wrote: >> I still need to add appropriate conditions for checking whether the >> program is using the threaded RTS. What is the recommended approach >> for this? >> >> I see GHC.Conc.IO uses a dynamic chec

[Haskell-cafe] Data.Binary.IncrementalGet remake

2011-04-20 Thread Sergey Mironov
Hello cafe. Haskell wiki told me about continuation-based parser Data.Binary.IncrementalGet [1] from binary-strict package. I found the idea very useful and tried to use it. Original library by Lennart Kolmodin raises some questions. The lib's main data structures are: data IResult a = IFailed S

[Haskell-cafe] Hackage haddock not running?

2011-04-20 Thread Chris Smith
I've noticed a lot of packages recently missing documentation links on Hackage. It looks like the job to build these hasn't been running since perhaps about Saturday. Are appropriate people aware of this? -- Chris Smith ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Johan Tibell
On Wed, Apr 20, 2011 at 6:11 PM, Bas van Dijk wrote: > I still need to add appropriate conditions for checking whether the > program is using the threaded RTS. What is the recommended approach > for this? > > I see GHC.Conc.IO uses a dynamic check: > > foreign import ccall unsafe "rtsSupportsBound

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 17:55, Johan Tibell wrote: > On Wed, Apr 20, 2011 at 5:22 PM, Bas van Dijk wrote: >> On 20 April 2011 17:04, Johan Tibell wrote: >>> Not that evtRead and evtWrite maps to different things on different >>> platforms. >> >> Do you mean "Not" or "Note"? > > Yes, sorry. Ok thanks.

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Johan Tibell
On Wed, Apr 20, 2011 at 5:22 PM, Bas van Dijk wrote: > On 20 April 2011 17:04, Johan Tibell wrote: >> Not that evtRead and evtWrite maps to different things on different >> platforms. > > Do you mean "Not" or "Note"? Yes, sorry. ___ Haskell-Cafe mail

Re: [Haskell-cafe] QuickCheck, (Ord a)=> [a] -> Property problem

2011-04-20 Thread Nick Smallbone
"larry.liuxinyu" writes: > prop_foo :: (Ord a) => [a] -> Property > prop_foo xs = not (null xs) ==> maximum xs == minimum xs > > This is an extreme case that the property is always wrong. > > However, QuickCheck produces: > *Main> test prop_foo > OK, passed 100 tests. > > Why this happen? If I us

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 17:04, Johan Tibell wrote: > On Tue, Apr 19, 2011 at 10:36 PM, Bas van Dijk wrote: >> On 19 April 2011 15:06, John Obbele wrote: >>        -- Step 3 is the most important step. Submitting the transfer: >>        handleUSBException $ c'libusb_submit_transfer transPtr >> >>      

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Johan Tibell
On Tue, Apr 19, 2011 at 10:36 PM, Bas van Dijk wrote: > On 19 April 2011 15:06, John Obbele wrote: >        -- Step 3 is the most important step. Submitting the transfer: >        handleUSBException $ c'libusb_submit_transfer transPtr > >        -- TODO: Now we need to do the complicated stuff de

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 14:10, Bas van Dijk wrote: > I haven't implemented asynchronous transfers yet that actually > transfer user data... And now I have: asynchronously implemented readControl and writeControl: https://github.com/basvandijk/usb/blob/async/System/USB/Internal.hs#L1360 Next up are rea

[Haskell-cafe] hackage not building documentation?

2011-04-20 Thread Doug Burke
I uploaded a package to hackage last Saturday (16th) and the docs are not displayed yet (Wed, 20th), but it doesn't appear to be because of a build failure: http://hackage.haskell.org/package/swish Is this a known issue? Thanks, Doug ___ Haskell-

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread Bas van Dijk
On 20 April 2011 12:16, John Obbele wrote: > On Tue, Apr 19, 2011 at 10:36:50PM +0200, Bas van Dijk wrote: >> Great! I have wished for an asynchronous implementation since version >> 0.1 of usb but didn't really had a need for it nor the time to >> implement it. However recently at work I have beg

Re: [Haskell-cafe] An example of enumerator processing some data between input and output

2011-04-20 Thread Paul Sujkov
Hi Oleg, thank you for the answer, things are getting much clearer now. On 20 April 2011 09:08, wrote: > > Paul Sujkov wrote: > > > I played a bit with the enumerator package, and I'm quite stuck with the > > question how to duplex data to two (or more) consumers > > Many packages have the comb

Re: [Haskell-cafe] Need comments on a libusb asynchronous select/poll loop

2011-04-20 Thread John Obbele
On Tue, Apr 19, 2011 at 10:36:50PM +0200, Bas van Dijk wrote: > Great! I have wished for an asynchronous implementation since version > 0.1 of usb but didn't really had a need for it nor the time to > implement it. However recently at work I have begun using my usb > library in an application which

Re: [Haskell-cafe] QuickCheck, (Ord a)=> [a] -> Property problem

2011-04-20 Thread Daniel Fischer
On Wednesday 20 April 2011 11:43:08, larry.liuxinyu wrote: > Hi, > > I found there is similar question as: > http://groups.google.com/group/haskell-cafe/browse_thread/thread/7439262 > e9ac80dd2/91ca18e11ff00649?lnk=gst&q=QuickCheck+Ord+a#91ca18e11ff00649 > > I am still think it's very strange. Fo

[Haskell-cafe] QuickCheck, (Ord a)=> [a] -> Property problem

2011-04-20 Thread larry.liuxinyu
Hi, I found there is similar question as: http://groups.google.com/group/haskell-cafe/browse_thread/thread/7439262e9ac80dd2/91ca18e11ff00649?lnk=gst&q=QuickCheck+Ord+a#91ca18e11ff00649 I am still think it's very strange. For example: prop_foo :: (Ord a) => [a] -> Property prop_foo xs = not (null