[Haskell-cafe] The implementation of functional languages

2004-09-20 Thread mattr
I am working thru Implementing Functional Languages: a tutorial and I want to look up one of the references to get more details. I am looking for the book The implementation of Functional Programming languages by S. L. Peyton Jones. Anyone know how I can get it? I would be willing to pay for

Re: [Haskell-cafe] no dynamic binding

2004-09-20 Thread Tomasz Zielonka
On Sun, Sep 19, 2004 at 08:54:57PM +0200, Georg Martius wrote: Hi, it might be better to use a simple abstact data type for it like: You probably meant algebraic data type. Abstractness isn't essential here. Best regards, Tom -- .signature: Too many levels of symbolic links

Re: [Haskell-cafe] no dynamic binding

2004-09-20 Thread Tomasz Zielonka
On Sun, Sep 19, 2004 at 02:46:12PM -0400, Abraham Egnor wrote: You can use exisential types to do what you'd like. From memory, so there are probably errors: newtype ServerCommand = forall a. ServerCommandClass a = ServerCommand a This can't be newtype, you must use 'data'. instance

[Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Einar Karttunen
Hello Strings in haskell seem to be one major source of problems. I try to outline some of the problems I have faced and possible solutions. Size Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient.

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Henning Thielemann
On Mon, 20 Sep 2004, Einar Karttunen wrote: Size Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. Efficiency is always a reason to mess everything. But the inefficiency applies to lists of every data

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Einar Karttunen
On 20.09 12:59, Henning Thielemann wrote: Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. Efficiency is always a reason to mess everything. But the inefficiency applies to lists of every data type, so

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread MR K P SCHUPKE
Would it not bet better is String were a typeclass instead of a data type. Then the string operations could be redefined by implementation, so you may have strings as lists or strings as arrays? Keean. ___ Haskell-Cafe mailing list [EMAIL

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Henning Thielemann
On Mon, 20 Sep 2004, MR K P SCHUPKE wrote: Would it not bet better is String were a typeclass instead of a data type. It would be nice to have a Sequence type class which provides a uniform interface for common operations on List and Array, Lists of Arrays and so on. Then String could be based

Re: [Haskell-cafe] The implementation of functional languages

2004-09-20 Thread Marius Nita
On Sep 20, 2004, at 1:26 AM, mattr wrote: I am working thru Implementing Functional Languages: a tutorial and I want to look up one of the references to get more details. I am looking for the book The implementation of Functional Programming languages by S. L. Peyton Jones. Anyone know how I

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Dylan Thurston
On Mon, Sep 20, 2004 at 01:11:34PM +0300, Einar Karttunen wrote: Size Handling large amounts of text as haskell strings is currently not possible as the representation (list of chars) is very inefficient. You know about the PackedString functions, right?

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread Einar Karttunen
On 20.09 15:05, Dylan Thurston wrote: You know about the PackedString functions, right? http://www.haskell.org/ghc/docs/6.0/html/base/Data.PackedString.html Yes, but they are quite broken. I am using FastPackedString from darcs for many purposes, which is like PackedString in many ways.

Re: [Haskell-cafe] Strings - why [Char] is not nice

2004-09-20 Thread ajb
G'day all. Quoting Henning Thielemann [EMAIL PROTECTED]: Efficiency is always a reason to mess everything. OTOH, when efficiency matters, it REALLY matters. (The flip side of this is that efficiency doesn't always mean what you think it means.) The problem is that the current representation

Re: [Haskell-cafe] The implementation of functional languages

2004-09-20 Thread John Meacham
On Mon, Sep 20, 2004 at 07:53:31AM -0600, Marius Nita wrote: On Sep 20, 2004, at 1:26 AM, mattr wrote: I am working thru Implementing Functional Languages: a tutorial and I want to look up one of the references to get more details. I am looking for the book The implementation of Functional