Re: Large lists, heaps, stacks...

2001-10-18 Thread Janis Voigtlaender
Till Doerges writes: > select' :: [a] -> [Integer] -> ([a],[a]) > select' xs poss = sAcc xs (sort poss) 0 ([],[]) > where sAcc :: [a] -> [Integer] -> Integer -> (([a],[a]) -> ([a],[a])) > ... > > Crash> select' "test" [0..] > > (35922 reductions, 63905 cells) > ERROR: Control stack overflow

Re: strong typing?

2001-10-18 Thread hw
Hello S.D.Mechveliani, Thursday, October 18, 2001, 3:10:43 PM, you wrote: SDM> I am not a specialist and can mistake and confuse things, but I SDM> wonder whether a notion of a strongly typed language is so SDM> scientifically important. SDM> The same is with the `compile-time' and `run-time' se

More Unicode nit-picking

2001-10-18 Thread Colin Paul Adams
I have accidentally noticed another problem in the revised Haskell report (actually the library report, this time). in module Char, toLower and toUpper appear to be under-specified (and indeed, the whole module looks a little suspect) Exactly what is wrong with them I find hard to say, and even

Re: Working character by character in Haskell

2001-10-18 Thread Andre W B Furtado
Humn... I agree with both of you, Albert and Tom. I started it from the beginning, using map and don't using reverse anymore. But the C program is still 7x faster than the Haskell one. Here is the code of the Haskell program: main :: IO () main = do bmFile <- openFileEx "in.txt" (BinaryMode Read

Working character by character in Haskell

2001-10-18 Thread Tom Pledger
Andre W B Furtado writes: : | copyFile :: String -> String -> IO String | copyFile [] s = return (reverse s) | copyFile (a:as) s = copyFile as ( (doSomeStuffWith a):s) : | For example, suppose function doSomeStuffWith returns its own | parameter. Using a 1.5MB file in this case, the Haskel

Working character by character in Haskell

2001-10-18 Thread Andre W B Furtado
I'm trying to create a fast program in Haskell that reads the content of a file, do some stuff with its characters (one by one) an then save the final result (the modified characters) in another file. The fastest program I've developed so far is: main :: IO () main = do bmFile <- openFileEx "in.

Constructor class

2001-10-18 Thread Tom Pledger
Raul Sierra writes: | Hi all, | | What is the difference between regular classes and constructor classes | and how do you specify that a class is a constructor class? | | Thanks in advance, | Raul The term `constructor class' is meant to include classes like Functor and Monad, whose ins

Re: strong typing?

2001-10-18 Thread Brian Boutel
"S.D.Mechveliani" wrote: > > I am not a specialist and can mistake and confuse things, but I > wonder > whether a notion of a strongly typed language is so > scientifically important. > The same is with the `compile-time' and `run-time' separation. > There is no scientific reason why all compu

Constructor class

2001-10-18 Thread Raul Sierra
Hi all, What is the difference between regular classes and constructor classes and how do you specify that a class is a constructor class? Thanks in advance, Raul ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/hask

Large lists, heaps, stacks...

2001-10-18 Thread Till Doerges
Hi everybody, I'm having to deal w/ rather long(*) lists. Unfortunately I stumbled across some problems in the process. I tried to implement a function that separates a list into two parts according to a list of indices given. (Does anything like that perhaps exist already in the Prelude?) ---

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-18 Thread Marcin 'Qrczak' Kowalczyk
Thu, 18 Oct 2001 13:49:11 +0200, Karl-Filip Faxen <[EMAIL PROTECTED]> pisze: > There are two solutions that I can see: Annotate classes in class > constraints with exactly which methods were used. Thus for the > expression "x+y" the inference algorithm would record the constraint > "Num{+} a" if

numbers game

2001-10-18 Thread Graham Hutton
Dear all, The following new paper may be of interest to readers of this group: http://www.cs.nott.ac.uk/~gmh/countdown.pdf It shows how to develop a Haskell program to solve the numbers game from countdown, a popular quiz show on British television. The aim wasn't to produce solutions as fa

strong typing?

2001-10-18 Thread S.D.Mechveliani
People write Fergus Henderson: H> [...] H> The whole idea of letting you omit method definitions for methods with H> no default and having calls to such methods be run-time errors is IMHO H> exceedingly odd in a supposedly strongly typed language, and IMHO ought H> to be reconsidered in the next

Re: proofs

2001-10-18 Thread Frank Atanassow
Richard wrote (on 17-10-01 10:20 -0700): > I could teach myself to do it clumsily, but I want to learn from others. > would learning category theory help me do this? pointers to documents? > proof-assistant software? You might look at my page of online programming language theory texts, particul

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-18 Thread Karl-Filip Faxen
Hi! Jon Fairbairn wrote: > I agree too, but being able to omit method definitions is > sometimes useful -- would it be possible to make calls to > those methods a /static/ error? I suspect this would be hard > to do. Yes, quite tricky. The problem is that the class constraints (in an inference

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-18 Thread Jon Fairbairn
> On Tuesday 16 October 2001 07:29, Fergus Henderson wrote: > > [...] > > The whole idea of letting you omit method definitions for methods with > > no default and having calls to such methods be run-time errors is IMHO > > exceedingly odd in a supposedly strongly typed language, and IMHO ought >

Re: Haskell 98 - Standard Prelude - Floating Class

2001-10-18 Thread Wolfgang Jeltsch
On Tuesday 16 October 2001 07:29, Fergus Henderson wrote: > [...] > The whole idea of letting you omit method definitions for methods with > no default and having calls to such methods be run-time errors is IMHO > exceedingly odd in a supposedly strongly typed language, and IMHO ought > to be reco