Re: [Haskell-cafe] read with pattern

2005-04-21 Thread Cale Gibbard
It's not really clear to me what you're asking. The function read is a method of the typeclass Read, and it has type Read a => String -> a. There are a number of instances of the typeclass Read in the standard prelude (http://www.haskell.org/onlinereport/standard-prelude.html) Notably, instance

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Alexandre Weffort Thenorio
Well I think one of the best tools to programme on for Windows is UltraEdit, it will give you colors and other stuff (provided you get the correct file for it which is out on the net). Emacs also exists for windows and is not bad, but I don't know if that is the best tool (I sure like it but I hat

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Pierre Barbier de Reuille
You may want to have a look there : http://www.haskell.org/libraries/#ide It references some tools to develop in haskell ... Pierre Keith Wansbrough a écrit : [sorry if you receive this twice; mailing list problems] SCOTT J. wrote: Thanks for your assistance. I'm using now Notepad.exe . Before I di

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Keith Wansbrough
[sorry if you receive this twice; mailing list problems] SCOTT J. wrote: Thanks for your assistance. I'm using now Notepad.exe . Before I did it in Wordpad. I use Windows XP. I'm trying to solve this nasty problem WordPad probably saved your file in RTF rather than TXT. Keep using Notepad for

Re: [Haskell-cafe] Haskell Questions

2005-04-21 Thread Daniel Fischer
Am Donnerstag, 21. April 2005 20:00 schrieben Sie: > Daniel, > Thanks for your offer to help me. > > There was a site with some challenges on extending Thompsons code, and the > first question they asked was the following: > > -- > Extend matchTyp

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Tom Harke
You forgot to bind a name to your do-expression. Try: foo = do x <- a y <- b return (x,y) On Thu, 21 Apr 2005, SCOTT J. wrote: ] Hi, ] ] I'm beginning to study Haskell, For the following ] ] a = [1,2,3] ] ] b = "there" ] ] ] ] do x <- a ] ] y <- b ] ] retu

[Haskell-cafe] read with pattern

2005-04-21 Thread Walt Potter
I'd like to find a reference to reading with patterns such as read::[(Int,Int)] Thanks, Walt ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread SCOTT J.
Thanks for your assistance. I'm using now Notepad.exe . Before I did it in Wordpad. I use Windows XP. I'm trying to solve this nasty problem   - Original Message - From: SCOTT J. To: haskell-cafe@haskell.org Sent: Thursday, April 21, 2005 5:16 PM Subject: [Haskell-c

[Haskell-cafe] a newbie's question

2005-04-21 Thread SCOTT J.
Hi, I'm trying to investigate the list monad. I program   instance Monad [] where xs >= f  =  concat ( map f xs ) return x = [x] a = [1,2,3] b = "there" do { x  <-  a  y  <-  b return (x , y) }  And I get the error Syntax error in input (unexpected backslash (lambda))   Jan

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread robert dockins
Hi, I'm beginning to study Haskell, For the following a = [1,2,3] b = "there" do x <- a y <- b return (x , y) Winhugs cannot run it. Gives Syntax error in input (unexpected backslash ( lambda)) Your problem is that you're using monads to grab the contents of a and b, while a and b are

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Paul Hudak
Thomas Davie wrote: On Apr 21, 2005, at 3:47 PM, SCOTT J. wrote: Hi, I'm beginning to study Haskell, For the following a = [1,2,3] b = "there" do x <- a y <- b return (x , y) Winhugs cannot run it. Gives Syntax error in input (unexpected backslash ( lambda)) Your problem is that you're using

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Thomas Davie
On Apr 21, 2005, at 3:47 PM, SCOTT J. wrote: Hi, I'm beginning to study Haskell, For the following a = [1,2,3] b = "there" do x <- a y <- b return (x , y) Winhugs cannot run it. Gives Syntax error in input (unexpected backslash ( lambda)) Your problem is that you're using monads to grab

[Haskell-cafe] a newbie's question

2005-04-21 Thread SCOTT J.
Hi,   I'm beginning to study Haskell, For the following   a = [1,2,3] b = "there"   do x <- a   y <- b  return (x , y) Winhugs cannot run it. Gives  Syntax error in input (unexpected backslash (lambda))

Re: [Haskell-cafe] Haskell Questions

2005-04-21 Thread Daniel Fischer
Am Donnerstag, 21. April 2005 12:37 schrieb Mike Richards: > Hi, > > I'm working on a version of Simon Thompson's code from "The Craft of > Functional > > programming" to handle polymorhpic data types. > > Heres the question Im working on - Ive tried doing the first part, but i > would > > really a

[Haskell-cafe] Haskell Questions

2005-04-21 Thread Mike Richards
Hi, I'm working on a version of Simon Thompson's code from "The Craft of Functional programming" to handle polymorhpic data types. Heres the question Im working on - Ive tried doing the first part, but i would really apprecate it if someone could let me know if ive implemented it wrong. Mike

Re: [Haskell-cafe] a question about import and parsec...

2005-04-21 Thread Daniel Fischer
Am Donnerstag, 21. April 2005 03:58 schrieb Greg Wolff: > I'm new at using Haskell and I'm trying to make use of the parsec > library. I've started by working through the examples in the user guide > which don't work as written in ghci when I run them. I've made > modifications that have gotten t