Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Cale Gibbard
Right, forgot about seq there, but the point still holds that there are a very limited number of functions of that type, and in particular, the functions can't decide what to do based on the type parameter 'a'. - Cale On 14 Oct 2005 05:49:27 -, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread John Meacham
On Fri, Oct 14, 2005 at 03:17:12AM -0400, Cale Gibbard wrote: Right, forgot about seq there, but the point still holds that there are a very limited number of functions of that type, and in particular, the functions can't decide what to do based on the type parameter 'a'. actually, without

Re[2]: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Sebastian, Thursday, October 13, 2005, 2:49:46 AM, you wrote: SS I'm wondering what incremental and moderate extension means? SS Does it mean completely backwards compatible or can it mean SS completely new features including ones which subsume existing ones SS (I'm specifically interested

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Stephane, Thursday, October 13, 2005, 11:24:30 AM, you wrote: SB As someone who is not an academic researcher and not a student in CS, SB I would like to express a personal opinion; we don't need a new SB standard. To me, Haskell needs more libraries, more users (which means SB more

Re[2]: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Sebastian, Thursday, October 13, 2005, 4:09:55 PM, you wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). SS First of all I would like to urge the people who do end up working on SS this to seriously consider replacing H98's

Re[2]: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread Bulat Ziganshin
Hello Simon, Thursday, October 13, 2005, 1:42:24 PM, you wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). SM Highly unlikely, IMHO. A new revision of the Haskell standard is not SM the place for testing new research, rather it's a clear

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Ben Rudiak-Gould
Cale Gibbard wrote: As an example of this sort of thing, I know that there are only 4 values of type a - Bool (without the class context). They are the constant functions (\x - True), (\x - False), and two kinds of failure (\x - _|_), and _|_, where _|_ is pronounced bottom and represents

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Sebastian Sylvan
On 10/13/05, Huong Nguyen [EMAIL PROTECTED] wrote: Hi all, I want to write a small functionto test whether an input is a String or not. For example, isString::(Show a) =a -Bool This function will return True if the input is a string and return False if not Any of you have idea about

Re: [Haskell-cafe] Examples of using STUArray + help with converting code

2005-10-14 Thread Joel Reymont
If I don't cast then how do I convert this code? doubleToInts d = runST ( do arr - newDoubleArray (1,2) writeDoubleArray arr 1 d i1 - readIntArray arr 1 i2 - readIntArray arr 2 return (i1,i2)) Or can I just read an array of ints from the double array using the

RE: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Marco Tulio Gontijo e Silva
Em Qui, 2005-10-13 às 09:47 +0100, Bayley, Alistair escreveu: - * Confidentiality Note: The information contained in this message, and any attachments, may contain confidential and/or

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread robert dockins
So this is essentially a parsing problem. You want a user to be able input a string and have it interpreted as an appropriate data value. I think you may want to look at the Parsec library (http://www.cs.uu.nl/~daan/parsec.html). I don't think the direction you are heading will get the

Re: [Haskell-cafe] Examples of using STUArray + help with converting code

2005-10-14 Thread Ketil Malde
Joel Reymont [EMAIL PROTECTED] writes: If I don't cast then how do I convert this code? Uh, what is wrong with divMod? *Main Data.Word (100::Word64) `divMod` (2^32) (2,1410065408) doubleToInts d = runST ( [...] This will only give you a headache. :-) -k -- If I haven't seen

RE: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Bayley, Alistair
From: Marco Tulio Gontijo e Silva [mailto:[EMAIL PROTECTED] Em Qui, 2005-10-13 às 09:47 +0100, Bayley, Alistair escreveu: * Confidentiality Note: The information contained in this message blah blah blah Is this kind of notice

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Wolfgang Jeltsch
Am Donnerstag, 13. Oktober 2005 13:39 schrieb Stephane Bortzmeyer: [...] Regexps and XML are, IMHO, also must haves. By the way, it should be possible to handle regular expressions in an Haskell-like way. I always couldn't understand why one has to write regular expressions as strings which

[Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Stephane Bortzmeyer
On Fri, Oct 14, 2005 at 04:20:24PM +0200, Wolfgang Jeltsch [EMAIL PROTECTED] wrote a message of 23 lines which said: By the way, it should be possible to handle regular expressions in an Haskell-like way. If you like so, but as one more possibility, not as the only way. I always couldn't

[Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Stephane Bortzmeyer
On Fri, Oct 14, 2005 at 04:20:24PM +0200, Wolfgang Jeltsch [EMAIL PROTECTED] wrote a message of 23 lines which said: alpha = ('A' `to` 'Z') ||| ('a' `to` 'z') If you intend to seriously specify a new language for regexps, please consider Unicode. There are more letters than A to Z...

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Philippa Cowderoy
On Fri, 14 Oct 2005, Stephane Bortzmeyer wrote: On Fri, Oct 14, 2005 at 04:20:24PM +0200, Wolfgang Jeltsch [EMAIL PROTECTED] wrote a message of 23 lines which said: By the way, it should be possible to handle regular expressions in an Haskell-like way. If you like so, but as one more

Re: [Haskell-cafe] Examples of using STUArray + help with converting code

2005-10-14 Thread Udo Stenzel
joel reymont wrote: I don't understand the syntax needed to create a new double or float array with newArray from Data.Array.MArray. I also don't yet understand how to cast that double array to read ints from it. doubleToInts d = runST ( do arr - newDoubleArray (1,2)

[Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Stephane Bortzmeyer
On Fri, Oct 14, 2005 at 03:34:33PM +0100, Jon Fairbairn [EMAIL PROTECTED] wrote a message of 37 lines which said: Because the language used inside these strings is standard, multi-language, widely used and documented? 10,000 lemmings can't be wrong? Right, disregard ASCII and specify

Re: [Haskell-cafe] Examples of using STUArray + help with converting code

2005-10-14 Thread Ketil Malde
Joel Reymont [EMAIL PROTECTED] writes: I must be missing something because I don't think the code below converts a double. Yes, sorry, my bad. I was (and is) confused about what you wanted to do. -k -- If I haven't seen further, it is by standing in the footprints of giants

Re: [Haskell-cafe] Examples of using STUArray + help with converting code

2005-10-14 Thread Joel Reymont
I'm just trying to replicate the example using the fresh syntax that does not use readDoubleArray, readIntArray, etc. On Oct 14, 2005, at 4:32 PM, Ketil Malde wrote: Yes, sorry, my bad. I was (and is) confused about what you wanted to do. -- http://wagerlabs.com/

[Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Jon Fairbairn
On 2005-10-14 at 16:56+0200 Stephane Bortzmeyer wrote: On Fri, Oct 14, 2005 at 03:34:33PM +0100, Jon Fairbairn [EMAIL PROTECTED] wrote: Because the language used inside these strings is standard, multi-language, widely used and documented? 10,000 lemmings can't be wrong? Right,

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Niklas Broberg
Regexps and XML are, IMHO, also must haves. By the way, it should be possible to handle regular expressions in an Haskell-like way. Harp? :-) http://www.cs.chalmers.se/~d00nibro/harp /Niklas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Newbie question on Haskell type

2005-10-14 Thread Ralf Hinze
Hi Huong, attached you find a small program for parsing values of various (data) types. It uses a generalized algebraic data type for representing types and a universal data type for representing values. The parser itself is rather simple-minded: it builds on Haskell's ReadS type. I don't know

[Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread Aaron Denney
On 2005-10-13, Stephane Bortzmeyer [EMAIL PROTECTED] wrote: On Thu, Oct 13, 2005 at 11:29:57AM +, Robin Green [EMAIL PROTECTED] wrote a message of 22 lines which said: ... and, in the case of the Standard Prelude section, or equivalent, a specification of well-understood functions

Re: [Haskell] Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread John Meacham
On Thu, Oct 13, 2005 at 02:09:55PM +0200, Sebastian Sylvan wrote: Okay then. Consider this my contribution to the discussion. First of all I would like to urge the people who do end up working on this to seriously consider replacing H98's records system. I may be wrong but the impression I get

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread David Roundy
On Fri, Oct 14, 2005 at 07:15:11PM +, Aaron Denney wrote: On 2005-10-13, Stephane Bortzmeyer [EMAIL PROTECTED] wrote: On Thu, Oct 13, 2005 at 11:29:57AM +, Robin Green [EMAIL PROTECTED] wrote a message of 22 lines which said: ... and, in the case of the Standard Prelude

Re: [Haskell-cafe] Interest in helping w/ Haskell standard

2005-10-14 Thread David Roundy
On Thu, Oct 13, 2005 at 10:42:24AM +0100, Simon Marlow wrote: On 12 October 2005 23:50, Sebastian Sylvan wrote: (I'm specifically interested in seeing SPJ's records proposal included, and a new module system). Highly unlikely, IMHO. A new revision of the Haskell standard is not the place

Re: [Haskell-cafe] Re: Interest in helping w/ Haskell standard

2005-10-14 Thread John Meacham
On Fri, Oct 14, 2005 at 03:34:33PM +0100, Jon Fairbairn wrote: On 2005-10-14 at 16:25+0200 Stephane Bortzmeyer wrote: On Fri, Oct 14, 2005 at 04:20:24PM +0200, Wolfgang Jeltsch [EMAIL PROTECTED] wrote a message of 23 lines which said: By the way, it should be possible to handle

[Haskell-cafe] Emptying a list

2005-10-14 Thread poogle
Before you read any more, let me just say I'm fairly new to Haskell, so forgive me if this is really basic stuff. Hi there, I'm just wondering if there is a command for emptying a list? Also, is there any way to incorporate list operations (concatenation in particular) in a do-statement on