Send Beginners mailing list submissions to beginners@haskell.org To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-requ...@haskell.org
You can reach the person managing the list at beginners-ow...@haskell.org When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..." Today's Topics: 1. Re: Do IO actions *have* to be glued by the do syntax? (Quanyang Liu) 2. Re: Do IO actions *have* to be glued by the do syntax? (Olumide) 3. Re: Do IO actions *have* to be glued by the do syntax? (Andrew Bernard) 4. Re: Do IO actions *have* to be glued by the do syntax? (Sumit Sahrawat, Maths & Computing, IIT (BHU)) 5. Re: Do IO actions *have* to be glued by the do syntax? (Sumit Sahrawat, Maths & Computing, IIT (BHU)) 6. Re: haskell + python numpy (PICCA Frederic-Emmanuel) 7. pipe and IO (PICCA Frederic-Emmanuel) ---------------------------------------------------------------------- Message: 1 Date: Tue, 22 Mar 2016 20:06:14 +0800 From: Quanyang Liu <lqy...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Do IO actions *have* to be glued by the do syntax? Message-ID: <87y49ahg3t....@gmail.com> Content-Type: text/plain Hi Olumide, I didn't mean quip... If that offended you, I apologize. But if you learn to find the answer out yourself, it will be more efficient, since you don't need to wait for others... For your question, a single query with 'haskell do' as keyword should be enough. On Tue, Mar 22 2016 at 19:46:00 +0800, Olumide wrote: > Can I also add that this sort of elitist, unhelpful quip of a > pseudo-answer is the reason that I've largely avoided asking Haskell > beginner questions on stackoverflow. > > Haskell is a wonderful language with a steep learning curve and I > believe that it is the intention of this group grow the user base of > the language by create a place where beginners will not be afraid to > ask questions. And hasty ill-thought, poorly worded answers like > Quanyang's won't help the language get there sooner. > > - Olumide -- Thanks, Quanyang ------------------------------ Message: 2 Date: Tue, 22 Mar 2016 12:20:45 +0000 From: Olumide <50...@web.de> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Do IO actions *have* to be glued by the do syntax? Message-ID: <56f1389d.6040...@web.de> Content-Type: text/plain; charset=windows-1252; format=flowed Quanyang, Thanks for your apology. I apologize too. I do try to find out answers by myself but was unsuccessful in this case probably because the answer lay in a topic/chapter of the book (Monads) that I am yet to read. (I am reading LYH chapter-by-chapter.) Sometimes our best attempts to find an answer will _fail_ ... and that's why this mailing list exists. We should give each other the benefit of the doubt and assume that someone that's asked a question has made some sort of effort to understand before asking. Regards, - Olumide On 22/03/2016 12:06, Quanyang Liu wrote: > Hi Olumide, > > I didn't mean quip... If that offended you, I apologize. > > But if you learn to find the answer out yourself, it will be more > efficient, since you don't need to wait for others... > > For your question, a single query with 'haskell do' as keyword should be > enough. > > On Tue, Mar 22 2016 at 19:46:00 +0800, Olumide wrote: >> Can I also add that this sort of elitist, unhelpful quip of a >> pseudo-answer is the reason that I've largely avoided asking Haskell >> beginner questions on stackoverflow. >> >> Haskell is a wonderful language with a steep learning curve and I >> believe that it is the intention of this group grow the user base of >> the language by create a place where beginners will not be afraid to >> ask questions. And hasty ill-thought, poorly worded answers like >> Quanyang's won't help the language get there sooner. >> >> - Olumide > ------------------------------ Message: 3 Date: Tue, 22 Mar 2016 23:40:44 +1100 From: Andrew Bernard <andrew.bern...@gmail.com> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Do IO actions *have* to be glued by the do syntax? Message-ID: <dd019eac-cb82-479e-8cb7-4ef1e0ef7...@gmail.com> Content-Type: text/plain; charset="utf-8" Hello Sumit, What is the Leavenworth guide? Googling for ?leavenworth guide haskell? provides no hint at all. Well, it does give a lot of travel guides! Andrew On 22/03/2016, 22:46, "Beginners on behalf of Sumit Sahrawat, Maths & Computing, IIT (BHU)" <beginners-boun...@haskell.org on behalf of sumit.sahrawat.ap...@iitbhu.ac.in> wrote: Also, if you haven't, search for the Leavenworth guide. It takes this very question in one of the miscellaneous discussions. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160322/d34c3266/attachment-0001.html> ------------------------------ Message: 4 Date: Tue, 22 Mar 2016 19:32:57 +0530 From: "Sumit Sahrawat, Maths & Computing, IIT (BHU)" <sumit.sahrawat.ap...@iitbhu.ac.in> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Do IO actions *have* to be glued by the do syntax? Message-ID: <cajbew8pdi5q9_6ggtij1ih06mxhnuvh7z118xjatx9zxegb...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Is talking about the learnhaskell guide. The autocorrect showed its magic there :) It's a huge brr Chris Allen, who's currently writing a huge book about Haskell. Regards, Sumit -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160322/e4af46b5/attachment-0001.html> ------------------------------ Message: 5 Date: Tue, 22 Mar 2016 19:34:35 +0530 From: "Sumit Sahrawat, Maths & Computing, IIT (BHU)" <sumit.sahrawat.ap...@iitbhu.ac.in> To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell <beginners@haskell.org> Subject: Re: [Haskell-beginners] Do IO actions *have* to be glued by the do syntax? Message-ID: <CAJbEW8NYiFer3rW0G9Dmo=mvuvmpjsskojx2h_gzg7h9-bd...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" Again, I meant 'guide by'. On 22-Mar-2016 7:32 pm, "Sumit Sahrawat, Maths & Computing, IIT (BHU)" < sumit.sahrawat.ap...@iitbhu.ac.in> wrote: > Is talking about the learnhaskell guide. The autocorrect showed its magic > there :) > > It's a huge brr Chris Allen, who's currently writing a huge book about > Haskell. > > Regards, > Sumit > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160322/f45da612/attachment-0001.html> ------------------------------ Message: 6 Date: Tue, 22 Mar 2016 16:34:30 +0000 From: PICCA Frederic-Emmanuel <frederic-emmanuel.pi...@synchrotron-soleil.fr> To: Daniel Bergey <ber...@alum.mit.edu>, "beginners@haskell.org" <beginners@haskell.org> Subject: Re: [Haskell-beginners] haskell + python numpy Message-ID: <a2a20ec3b8560d408356cac2fc148e53b305c...@sun-dag3.synchrotron-soleil.fr> Content-Type: text/plain; charset="us-ascii" Hello, thanks for the pointer, I will see if one of these package can be usefull for me :) Cheers Frederic ------------------------------ Message: 7 Date: Tue, 22 Mar 2016 16:37:04 +0000 From: PICCA Frederic-Emmanuel <frederic-emmanuel.pi...@synchrotron-soleil.fr> To: "beginners@haskell.org" <beginners@haskell.org> Subject: [Haskell-beginners] pipe and IO Message-ID: <a2a20ec3b8560d408356cac2fc148e53b305c...@sun-dag3.synchrotron-soleil.fr> Content-Type: text/plain; charset="us-ascii" Hello, Still playing with the Pipe module here the code I try to write getDataFrameHkl3D' :: DataFrameHkl3DH5SixsUhv -> Int -> IO DataFrameHkl3D getDataFrameHkl3D' d i = do positions <- get_position (h5mu d) i return $ DataFrameHkl3D { df_n = i , df_image = positions } getDataFrameHkl3D :: DataFrameHkl3DH5SixsUhv -> Producer DataFrameHkl3D IO () getDataFrameHkl3D d = do n <- lift $ hkl_h5_len (h5mu d) forM_ [0..n] $ \i -> yield $ getDataFrameHkl3D' d i but when I compile it I get this error message src/hkl3d.hs:274:3: Couldn't match type `IO DataFrameHkl3D' with `DataFrameHkl3D' Expected type: Proxy X () () DataFrameHkl3D IO () Actual type: Proxy X () () (IO DataFrameHkl3D) IO () In a stmt of a 'do' block: forM_ [0 .. n] $ \ i -> yield $ getDataFrameHkl3D' d i In the expression: do { n <- lift $ hkl_h5_len (h5mu d); forM_ [0 .. n] $ \ i -> yield $ getDataFrameHkl3D' d i } In an equation for `getDataFrameHkl3D': getDataFrameHkl3D d = do { n <- lift $ hkl_h5_len (h5mu d); forM_ [0 .. n] $ \ i -> yield $ getDataFrameHkl3D' d i } I do not know how to fix my code... Frederic ------------------------------ Subject: Digest Footer _______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners ------------------------------ End of Beginners Digest, Vol 93, Issue 18 *****************************************