Re: Why are strings linked lists?

2003-11-27 Thread Bernard James POPE
Ben writes: > Hi, can someone tell me why Haskell strings are linked lists? I have > had some problems with Haskell strings: You may want to try Data.PackedString which comes with GHC (if you are using GHC that is). Cheers, Bernie. ___ Haskell mailing

Re: Why are strings linked lists?

2003-11-27 Thread Donald Bruce Stewart
ajb: > G'day all. > > Quoting Ben Escoto <[EMAIL PROTECTED]>: > > > Hi, can someone tell me why Haskell strings are linked lists? > > Because that's the way it was done in Miranda, almost 20 years ago. > > OK, to be fair, it does make string-to-string operations a bit more > convenient. Apart

Re: Why are strings linked lists?

2003-11-27 Thread ajb
G'day all. Quoting Ben Escoto <[EMAIL PROTECTED]>: > Hi, can someone tell me why Haskell strings are linked lists? Because that's the way it was done in Miranda, almost 20 years ago. OK, to be fair, it does make string-to-string operations a bit more convenient. Apart from undergraduate homewo

Why are strings linked lists?

2003-11-27 Thread Ben Escoto
Hi, can someone tell me why Haskell strings are linked lists? I have had some problems with Haskell strings: 1. Today I spend a few hours trying to track down a memory leak. It turns out I just didn't realize how much space a string takes up. On my machine "replicate 500 'a'" will u

Re: How to best add logging/debugging code?

2003-11-27 Thread Derek Elkins
On Thu, 27 Nov 2003 14:19:53 + Malcolm Wallace <[EMAIL PROTECTED]> wrote: > > > Is there a list of problems anywhere with using trace? For > > > example does it affect evaluation order? > > Apart from changing the evaluation order of expressions, trace has > other drawbacks, noted I think b

Re: Incomplete output when hPutStr is lifted

2003-11-27 Thread Tomasz Zielonka
On Thu, Nov 27, 2003 at 04:09:00PM -0300, andrew cooke wrote: > > Hi, > > If I compile and run the code below, the file "foo" contains 10 lines > of output (as I would expect), but the file "bar" contains just 9 - > the final line is missing. If I add a "join", as in the comment, then > all 10 l

Re: Functional dependencies interfere with generalization

2003-11-27 Thread Ken Shan
On 2003-11-27T07:51:37-0800, Brandon Michael Moore wrote: > I agree that the typechecker could handle this better, but I don't see why > you should need types like this. You should be able to use > > rr :: (R a b) => a -> (b,b) > > and > > data RAB a = forall b. (R a b) => RAB (a,b) > > equall

Re: Hugs98 November 2003 Debian Packages

2003-11-27 Thread Ferenc Wagner
Isaac Jones <[EMAIL PROTECTED]> writes: > Let me know if anyone is interested in Woody (stable) backports. Yes, I am. I could probably make them myself, but if you are willing to do so, I will let my 200 MHz machine do something else... :) Best wishes and big thanks anyway, Feri. __

Incomplete output when hPutStr is lifted

2003-11-27 Thread andrew cooke
Hi, If I compile and run the code below, the file "foo" contains 10 lines of output (as I would expect), but the file "bar" contains just 9 - the final line is missing. If I add a "join", as in the comment, then all 10 lines appear. I don't understand why, completely - my best guess is that it'

Re: Functional dependencies interfere with generalization

2003-11-27 Thread Brandon Michael Moore
On Wed, 26 Nov 2003, Ken Shan wrote: > Hello, > > Consider the following code, which uses type classes with functional > dependencies: > > {-# OPTIONS -fglasgow-exts #-} > module Foo where > class R a b | a -> b where r :: a -> b > > -- 1 > rr :: (R a b1, R a b2) => a -> (b1,

Re: How to best add logging/debugging code?

2003-11-27 Thread Malcolm Wallace
> > Is there a list of problems anywhere with using trace? For > > example does it affect evaluation order? Apart from changing the evaluation order of expressions, trace has other drawbacks, noted I think by Lennart(?) but I can't remember exactly where. One issue is this: Consider an express

Hugs98 November 2003 Debian Packages

2003-11-27 Thread Isaac Jones
Hugs98 November 2003 packages for the Debian GNU/Linux System (unstable) are now available on the Haskell Experimental Debian archive. This package will be uploaded to the Debian servers as soon as the servers are available again. Let me know if anyone is interested in Woody (stable) backports.

RE: How to best add logging/debugging code?

2003-11-27 Thread Simon Marlow
> Manuel M T Chakravarty wrote: > > > There is `Debug.Trace.trace' for this: > > > > http://haskell.org/ghc/docs/latest/html/base/Debug.Trace.html > > > > However, if you want to log as opposed to debug, you may > > want to have the output go to somewhere else but stdout. > > Hence, it might

Test

2003-11-27 Thread onemind555
___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell

Re: How to best add logging/debugging code?

2003-11-27 Thread Andy Fugard
Manuel M T Chakravarty wrote: There is `Debug.Trace.trace' for this: http://haskell.org/ghc/docs/latest/html/base/Debug.Trace.html However, if you want to log as opposed to debug, you may want to have the output go to somewhere else but stdout. Hence, it might be useful to have a variant of th