RE: [Haskell-cafe] GADTs and Typeclasses

2007-04-16 Thread Simon Peyton-Jones
| Will I run into problems using typeclasses with GADTs? No, you shouldn't, provided you use the HEAD compiler. I did a fairly major upgrade, after the 6.6 fork, which makes the interaction between type classes and GADTs work properly. This upgrade isn't in 6.6, and I regard the

[Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Simon Peyton-Jones
Friends I have agreed to give a 3-hr tutorial on Haskell at the Open Source Convention 2007 http://conferences.oreillynet.com/os2007/ I'm quite excited about this: it is a great opportunity to expose Haskell to a bunch of smart folk, many of whom won't know much about Haskell. My

[Haskell-cafe] type inference futility

2007-04-16 Thread Paul Wankadia
The following code has ambiguity, but I can't figure out how to get around it. Am I missing something trivial? Am I going in the wrong direction? Thank you in advance for your time and for any help that you can offer. data MehQueue = MehQueue class MehBase a where new :: IO a instance

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Steffen Mazanek
What about demonstrating the use of an Haskell interpreter as a pimped up calculator? multTable = putStr $ unlines [unlines [show x ++ ' ':show y ++ ' ':show (x*y)|y-[1..10]] | x-[1..10]] 2007/4/16, Simon Peyton-Jones [EMAIL PROTECTED]: Friends I have agreed to give a 3-hr tutorial on

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Thomas Hartman
Give them a program that selects a bunch of files based on some filtering criteria, and then does something to each file. Kind of like find + xargs, but using haskell instead. Good recipe for sysadmins. There was a recent example involving parsing raw emails into a thread here

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Dougal Stanton
On 16/04/07, Thomas Hartman [EMAIL PROTECTED] wrote: Maybe that could be simplified and something could be based on that. A one-liner using PCRE regex might also be of use. Unless it can be performed with astounding dexterity, I don't think try to beat, for example, Perl at its own game

Re: [Haskell-cafe] k-minima in Haskell

2007-04-16 Thread Ronny Wichers Schreur
Yitz writes (in the Haskell Cafe): This gives O(log k * (n + k)) execution in constant memory. I guess that should be O(k) memory. Cheers, Ronny Wichers Schreur ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] Re: [Haskell] Re: ANN: wl-pprint-1.0: Wadler/Leijen pretty printer

2007-04-16 Thread Duncan Coutts
On Mon, 2007-04-16 at 10:08 +, Arthur van Leeuwen wrote: Goody! UU.PPrint is now on hackage! Regrettably, this does seem like a bit of a waste of time, as UU.PPrint was already cabalised as part of the Haskell Utrecht Tools at http://www.cs.uu.nl/wiki/HUT/ which also contains the parser

Re: [Haskell-cafe] type inference futility

2007-04-16 Thread Felipe Almeida Lessa
On 4/16/07, Paul Wankadia [EMAIL PROTECTED] wrote: The following code has ambiguity, but I can't figure out how to get around it. Am I missing something trivial? Am I going in the wrong direction? Thank you in advance for your time and for any help that you can offer. How about changing x

Re: [Haskell-cafe] Parallel executing of actions

2007-04-16 Thread Mitar
Hi! On 4/16/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote: Since all the threads block on a single MVar how do they run in parallel? The idea is that before the threads block on the MVar, they run their action x to completion. The rendering crashes. I will have to precompute the values

Re: [Haskell-cafe] Parallel executing of actions

2007-04-16 Thread Pepe Iborra
On 16/04/2007, at 12:30, Mitar wrote: Hi! On 4/16/07, Bertram Felgenhauer [EMAIL PROTECTED] wrote: Since all the threads block on a single MVar how do they run in parallel? The idea is that before the threads block on the MVar, they run their action x to completion. The rendering

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Thomas Hartman
There may be something to this point of view. On the other hand, it is easier for me to see examples that can connect back to something I am already familiar with. That said, I will mention something where perl *seemed* to be a fit, but later proved frustrating. To whit -- Doing something at

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Neil Bartlett
Well, given that concurrency is a hot topic at the moment, how about something based on STM? E.g. perhaps some kind of instant messaging server? Or Twitter except scalable. By ruthlessly eliminating features, you could get the core of one of these down to something that could be built in three

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Ketil Malde
On Mon, 2007-04-16 at 13:27 +0200, Thomas Hartman wrote: To recap: transform a piece of simple code that works in serial, so it works in parallel. Maybe even a couple, or three ways: using forks, using threads, using map reduce. This made me think of one of my favorite observations. You

Re: [Haskell-cafe] Re: Translating perl - haskell, string fill ins with an error on invalid inputseems awfullycomplex. Is there a way to simplify?

2007-04-16 Thread Thomas Hartman
With regards to the variable interpolation in strings problem, it's probably worth watching http://groups.google.de/group/fa.haskell/browse_thread/thread/34741c2a5c311a17/286dbd62748ef1c1?lnk=stq=%22haskell+cafe%22+%22template+system%22rnum=1hl=en#286dbd62748ef1c1 which mentions some

Re: [Haskell-cafe] type inference futility

2007-04-16 Thread Paul Wankadia
Felipe Almeida Lessa [EMAIL PROTECTED] wrote: How about changing x - new to x - new :: IO MehQueue ? Is it impossible for the compiler to infer the type from the methods called? (-fweird-strange-sick-twisted-eerie-godless-evil-stuff!-and-i-want-in.)

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Ketil Malde
On Mon, 2007-04-16 at 11:06 +0100, Dougal Stanton wrote: A one-liner using PCRE regex might also be of use. Unless it can be performed with astounding dexterity, I don't think try to beat, for example, Perl at its own game will produce worthwhile results. One possibility is a task where

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Sebastian Sylvan
On 4/16/07, Ketil Malde [EMAIL PROTECTED] wrote: On Mon, 2007-04-16 at 13:27 +0200, Thomas Hartman wrote: To recap: transform a piece of simple code that works in serial, so it works in parallel. Maybe even a couple, or three ways: using forks, using threads, using map reduce. This made me

[Haskell-cafe] Type classes and type equality

2007-04-16 Thread Neil Mitchell
Hi, I'm looking for a type class which checks whether two types are the same or not. My first guess is: class Same a b where same :: a - b - Bool instance Same a a where same _ _ = True instance Same a b where same _ _ = False In Hugs this seems to work with overlapping instances (not

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Hans van Thiel
On Mon, 2007-04-16 at 09:34 +0100, Simon Peyton-Jones wrote: Friends I have agreed to give a 3-hr tutorial on Haskell at the Open Source Convention 2007 http://conferences.oreillynet.com/os2007/ I'm quite excited about this: it is a great opportunity to expose Haskell to a

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Neil Mitchell
Hi I think its important to cover whats different about Haskell. Things like laziness are cool, but are harder to convince a strict programmer that they are useful. Types however are obviously very handy, if you can focus on why a Haskell program is so obviously correct easily. 1) the type

[Haskell-cafe] partial kinds and instances

2007-04-16 Thread Matthew Pocock
Hi, I saw that it's possible to peal off kinds from the right-hand side when instantiating classes. Is it possible to peel them off from the left-hand side? Or in any order? I have been told in #haskell by people who seems to know that Very Bad Things happen if you do this without also making

Re: [Haskell-cafe] Re: Translating perl - haskell, string fill ins with an error on invalid inputseems awfullycomplex.Is there a way to simplify?

2007-04-16 Thread Claus Reinke
With regards to the variable interpolation in strings problem, .. as i mentioned, it is not difficult to hack something up, and in many cases, efficiency doesn't matter much for this part of the problem (though a standard, efficient, well-designed library would be welcome). but if we compare

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Derek Elkins
Hans van Thiel wrote: On Mon, 2007-04-16 at 09:34 +0100, Simon Peyton-Jones wrote: Friends I have agreed to give a 3-hr tutorial on Haskell at the Open Source Convention 2007 http://conferences.oreillynet.com/os2007/ I'm quite excited about this: it is a great opportunity to expose

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Nicolas Frisby
One technique I find compelling is (ab)using the type class system for meta programming. Something from Lightweight Static Resources, Faking It, or Hinze's Full Circle slides might be really attractive. Perhaps Danvy's Haskell printf? The hook might be: Yeah, you've heard of strong static typing

Re: [Haskell-cafe] Re: Translating perl - haskell, string fill ins with an error on invalid inputseems awfullycomplex.Is there a way to simplify?

2007-04-16 Thread Thomas Hartman
I put this on the haskell wiki at http://haskell.org/haskellwiki/Poor_Man%27s_Heredoc_in_Haskell So far I have only linked this from http://haskell.org/haskellwiki/Simple_unix_tools I feel like the wiki deserves a section on Haskell Template Solutions distinct from this. However, there is a

RE: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Taillefer, Troy (EXP)
Simon, Hopefully a video of this tutorial would be made available as a learning resource for those of use who can't make it to this Convention. Troy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Simon Peyton-Jones Sent: Monday, April 16, 2007 4:34

[Haskell-cafe] System.Random

2007-04-16 Thread Ketil Malde
Hi, I've recently stumbled upon some issues with the System.Random module, and thought I'd try to remedy them. However, I'm not quite sure what an optimal resolution is. Problem 1 is that I often get the same random number on consecutive program runs [1]. Looking at the code for initialization

RE: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Simon Peyton-Jones
Hopefully! Do suggest it to the OSCON organisers: the one I'm in touch with is Vee McMillen [EMAIL PROTECTED] Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of | Taillefer, Troy (EXP) | Sent: 16 April 2007 15:08 | To: Simon Peyton-Jones;

[Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Stefan Monnier
No we don't! At least not anywhere near as much of an exaggeration as that statement would be about an strongly typed imperative language (sequencing can't be type checked*, imperative programs are mostly sequencing, thus imperative programs are mostly unchecked). Actually, side effects *can*

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Mark T.B. Carroll
Neil Mitchell [EMAIL PROTECTED] writes: (snip) I think its important to cover whats different about Haskell. Things like laziness are cool, but are harder to convince a strict programmer that they are useful. (snip) Mmmm, it took me a while to really find laziness useful, and that was normally

[Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread apfelmus
Simon Peyton-Jones wrote: I have agreed to give a 3-hr tutorial on Haskell at the Open Source Convention 2007 http://conferences.oreillynet.com/os2007/ I'm quite excited about this: it is a great opportunity to expose Haskell to a bunch of smart folk, many of whom won't know much

[Haskell-cafe] ghci Crashing...

2007-04-16 Thread Gaetano Caruana
Hi all. I am new to this list ;) Today I have encountered something new that has never happened to me in the past 6 months that I have been using ghci and Haskell. I wrote this function: type Line = (Point,Point) type Point = (Float,Float) circleLineIntersection :: Float - Float - Float -

Re: [Haskell-cafe] ghci Crashing...

2007-04-16 Thread Henning Thielemann
On Mon, 16 Apr 2007, Gaetano Caruana wrote: Hi all. I am new to this list ;) Today I have encountered something new that has never happened to me in the past 6 months that I have been using ghci and Haskell. I wrote this function: type Line = (Point,Point) type Point = (Float,Float)

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Justin Bailey
I found this blog post, which describes a way to protect against SQL injection attacks using the type system, to be really enlightening. http://blog.moertel.com/articles/2006/10/18/a-type-based-solution-to-the-strings-problem Justin ___ Haskell-Cafe

Re: [Haskell-cafe] type inference futility

2007-04-16 Thread Peter Berry
On 16/04/07, Paul Wankadia [EMAIL PROTECTED] wrote: Is it impossible for the compiler to infer the type from the methods called? Your code: main :: IO () main = do x - new From the use of 'new', the compiler can infer that the type of x is an instance of MehBase, and...

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Aaron Tomb
Having just read Simon Marlow's paper on the Haskell Web Server, I think it might be interesting to at least mention it, and how simple it is, while still performing well. Also, I second the comment several have made so far that talking about concurrency is important. Haskell does it

[Haskell-cafe] Re: release plans

2007-04-16 Thread Chad Scherrer
What do you think of this plan? Are there features/bug-fixes that you really want to see in 6.8? I'm most anxious for parallel GC - do you think it will be another release or two before this is a reality? Thanks, Chad ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Bryan O'Sullivan
Mark T.B. Carroll wrote: I'm afraid no examples come easily to mind, though. Here's a simple one: reading a flattened graph from disk. If your flattened representation contains forward references, you have to fix them up in a strict language. In a lazy language, you can refer to elements

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Mark T.B. Carroll
Bryan O'Sullivan [EMAIL PROTECTED] writes: Mark T.B. Carroll wrote: I'm afraid no examples come easily to mind, though. Here's a simple one: reading a flattened graph from disk. If your flattened representation contains forward references, you have to fix them up in a strict language.

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Bryan O'Sullivan
Neil Bartlett wrote: E.g. perhaps some kind of instant messaging server? Or Twitter except scalable. A twitter-alike will quite probably get people's attention. And of course anything that breaks the it's good for compilers! stereotype is to be commended :-) Also on the subject of

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Derek Elkins
Mark T.B. Carroll wrote: Bryan O'Sullivan [EMAIL PROTECTED] writes: Mark T.B. Carroll wrote: I'm afraid no examples come easily to mind, though. Here's a simple one: reading a flattened graph from disk. If your flattened representation contains forward references, you have to fix them up

Re: [Haskell-cafe] Type classes and type equality

2007-04-16 Thread Jeremy Shaw
At Mon, 16 Apr 2007 13:44:13 +0100, Neil Mitchell wrote: Hi, So my question is if this is safe? Will the compiler always pick the right one? Is there a better way to do this? I noticed that the results can be a bit suprising sometimes. See if you can predict the answers to these (in ghci):

Re: [Haskell-cafe] Type classes and type equality

2007-04-16 Thread Clifford Beshers
Jeremy Shaw wrote: I noticed that the results can be a bit suprising sometimes. See if you can predict the answers to these (in ghci): Interesting examples. Here's another one that I would find problematic: *SameType same Nothing (Just xyzzy) False *SameType same (Nothing ::

Re: [Haskell-cafe] Re: `Expect'-like lazy reading/Parsec matching on TCP sockets

2007-04-16 Thread Ian Lynagh
Hi Scott, On Mon, Apr 09, 2007 at 10:03:55AM -0600, Scott Bell wrote: Have you got a complete (but preferably small) program showing the problem? Great example, thanks! Sorry for the delay in tracking it down. main :: IO () main = do (_, h, _, p) - runInteractiveCommand telnet nyx.nyx.net

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Albert Y. C. Lai
Neil Mitchell wrote: Things like laziness are cool, but are harder to convince a strict programmer that they are useful. Strict programmers like the yield command too. The same behaviour can be obtained by laziness, with easier reasoning. That said, strict programmers may or may not like

[Haskell-cafe] Re: Tutorial on Haskell, PLEAC

2007-04-16 Thread Pixel
Simon Peyton-Jones [EMAIL PROTECTED] writes: I'm quite excited about this: it is a great opportunity to expose Haskell to a bunch of smart folk, many of whom won't know much about Haskell. My guess is that they'll be Linux/Perl/Ruby types, and they'll be practitioners rather than

[Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Pete Kazmier
Simon Peyton-Jones [EMAIL PROTECTED] writes: My guess is that they'll be Linux/Perl/Ruby types, and they'll be practitioners rather than pointy-headed academics. Suggest concrete examples of programs that are * small * useful *

Re: [Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Donald Bruce Stewart
pete-expires-20070615: Simon Peyton-Jones [EMAIL PROTECTED] writes: My guess is that they'll be Linux/Perl/Ruby types, and they'll be practitioners rather than pointy-headed academics. Suggest concrete examples of programs that are * small *

[Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Joel Reymont
On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't think this works very well. I rely quite heavily on being able to compare expected output with test results

[Haskell-cafe] Re: Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Donald Bruce Stewart
joelr1: On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't think this works very well. I rely quite heavily on being able to compare expected output with

[Haskell-cafe] Re: Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Joel Reymont
Are there any examples of such custom drivers? On Apr 16, 2007, at 10:09 PM, Donald Bruce Stewart wrote: That's just the default driver. Plenty of custom drivers exist which compare the output. The QC driver is just a function you implement, after all. -- http://wagerlabs.com/

Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Lennart Augustsson
Why can't you just do 'f 1 2 3 == (4, 5, 6, 7)' to test f? On Apr 16, 2007, at 22:08 , Joel Reymont wrote: On Apr 16, 2007, at 9:29 PM, Donald Bruce Stewart wrote: It's interesting to note that QuickCheck generalises unit testing: zero-arity QC properties are exactly unit tests. I don't

Re: [Haskell-cafe] Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Joel Reymont
That's what HUnit does but it's enticing to be able to standardize on QuickCheck for all of your testing. On Apr 16, 2007, at 10:11 PM, Lennart Augustsson wrote: Why can't you just do 'f 1 2 3 == (4, 5, 6, 7)' to test f? -- http://wagerlabs.com/

[Haskell-cafe] Re: Zero-arity tests in QuickCheck and displaying expected result

2007-04-16 Thread Donald Bruce Stewart
I usually roll a new driver for each project, for example: http://www.cse.unsw.edu.au/~dons/code/fps/tests/QuickCheckUtils.hs and a smp parallel driver, http://www.cse.unsw.edu.au/~dons/code/pqc/Test/QuickCheck/Parallel.hs There's a few examples in Test.QuickCheck too. joelr1: Are

Re: [Haskell-cafe] implementing try for RWST ?

2007-04-16 Thread tpledger
Jeremy Shaw wrote: : | However, I think this is buggy, because changes | to 's' and 'w' will be lost if 'm' raises an | exception. : That's determined by the way you stack your monad transformers when declaring the type: adding error handling to a writer monad, or adding writing to an error

Re: [Haskell-cafe] Re: [web-devel] A light-weight web framework

2007-04-16 Thread S. Alexander Jacobson
DrIFT is a preproxessor so it makes the build process more complex. I'd like to find a pure-haskell solution or a TH solution that doesn't require more build complexity. -Alex- On Tue, 10 Apr 2007, Marc Weber wrote: Right now, you can largely do the same thing, but you have to write the

Re: [Haskell-cafe] Re: [web-devel] A light-weight web framework

2007-04-16 Thread Stefan O'Rear
On Mon, Apr 16, 2007 at 07:09:10PM -0400, S. Alexander Jacobson wrote: On Tue, 10 Apr 2007, Marc Weber wrote: Right now, you can largely do the same thing, but you have to write the XML representations of your data structures manually. -Alex- I'm not sure but doesn't use HAppS kind of

Fwd: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Ryan Dickie
Blast.. i didn't hit reply all so here's a forward of my mail to the group... --ryan -- Forwarded message -- From: Ryan Dickie [EMAIL PROTECTED] Date: Apr 16, 2007 4:24 PM Subject: Re: [Haskell-cafe] Tutorial on Haskell To: Simon Peyton-Jones [EMAIL PROTECTED] I can tell you

Re: [Haskell-cafe] Re: [web-devel] A light-weight web framework

2007-04-16 Thread Neil Mitchell
Hi DrIFT is a preproxessor so it makes the build process more complex. I'd like to find a pure-haskell solution or a TH solution that doesn't require more build complexity. You might want to look at the Data.Derive system. Basically it's a giant library of helpers for writing TH-based

Re: [Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Evan Laforge
- Parsec is not that interesting for those coming from perl, ruby, or python as they rely on regular expressions for everything and just expect that they are part of the language. The thought of writing one's own parser is not as cool as most Haskellers believe it is, regardless of how

[Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Pete Kazmier
Evan Laforge [EMAIL PROTECTED] writes: It illustrates a few nice things about haskell: laziness for the recursive defs and easy backtracking, low syntax overhead and custom operators for DSLs, composability, etc. Although that is true, I somehow feel that showing a perl, ruby, or python

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread David Powers
Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find that the ever changing nature of = makes code hard to read? On 4/15/07, jeff p

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Donald Bruce Stewart
david: Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find that the ever changing nature of = makes code hard to

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Clifford Beshers
Donald Bruce Stewart wrote: david: Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find that the ever changing nature

Re: [Haskell-cafe] and sequencing [newbie]

2007-04-16 Thread Donald Bruce Stewart
clifford.beshers: Donald Bruce Stewart wrote: david: Ah... so the secret is in the hidden variables. On some level I am beginning to fear that Monads resurrect some of the scariest aspects of method overriding from my OO programming days. Do you (all) ever find

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread ajb
G'day all. Quoting Neil Mitchell [EMAIL PROTECTED]: I think its important to cover whats different about Haskell. Things like laziness are cool, but are harder to convince a strict programmer that they are useful. I think you could. What you need to convince a strict programmer of is that

[Haskell-cafe] implementing try for RWST ?

2007-04-16 Thread oleg
The examples presented so far seem to show that the computation will eventually run in the IO monad. One may wonder then why do we need RWST transformer, given that the IO monad can implement both the state and writer. At the very least me need the reader transformer, which is the least demanding

Re: [Haskell-cafe] implementing try for RWST ?

2007-04-16 Thread Brandon S. Allbery KF8NH
On Apr 17, 2007, at 0:03 , [EMAIL PROTECTED] wrote: eventually run in the IO monad. One may wonder then why do we need RWST transformer, given that the IO monad can implement both the state For what it's worth, I got the impression that RWST was an example of a complex monad transformer ---

Re: [Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Alexis Hazell
On Tuesday 17 April 2007 10:30, Pete Kazmier wrote: From a practical point of view, the tasks that I do frequently involve the use of regexps (for better or worse). Likewise. It's true that when regexps are readily available, everything can look like a hammer; but sometimes a nail is just a

Re: [Haskell-cafe] Re: Tutorial on Haskell

2007-04-16 Thread Alexis Hazell
On Tuesday 17 April 2007 14:48, Alexis Hazell wrote: Likewise. It's true that when regexps are readily available, everything can look like a hammer; but sometimes a nail is just a nail. :-) Er. i meant to say, when the regexp /hammer/ is readily available, everything can look like a /nail/.