Fast Reading from File

2001-04-09 Thread Saswat Anand
I have a need to read large lists of numbers from a file and operate on them. I tried the following: read' =do s - readFile "temp" print $ sum $ map (fst.head.readDec)(lines s) But this is quite slow even for 1000 numbers. Are there any other ways to do it faster? Will it help

RE: Profiling burn-rate

2001-04-09 Thread Julian Seward (Intl Vendor)
| Is there any way to profile the "burn-rate" of a Haskell program? | | Profiling as I understand it tells you what the "live" information | on the heap is. It doesn't tell you what garbage collector has just | freed. So, if a function were generating tons of intermediate values | which it then

Re: Dimensional analysis with fundeps

2001-04-09 Thread Dylan Thurston
On Mon, Apr 09, 2001 at 09:36:45AM -0700, anatoli wrote: It seems that fundeps are powerful enough to do compile-time dimensional analysis in Haskell. That is, one can devise types that represent dimensions of quantities, such as (meter / second) or (kilogram * meter / second^2), and have

Re: Dimensional analysis with fundeps

2001-04-09 Thread Ashley Yakeley
At 2001-04-09 09:36, anatoli wrote: It seems that fundeps are powerful enough to do compile-time dimensional analysis in Haskell. I'm very impressed and slightly frightened. And there was me complaining that since you can't parameterise types in Haskell by integer (or other values) the way

Re: Dimensional analysis with fundeps

2001-04-09 Thread Ashley Yakeley
At 2001-04-09 09:36, anatoli wrote: 4) Allow several unit systems (such as SI and Imperial) to coexist. That's easy. Just hide the 'Dimensioned' constructor so no-one can see what system you're using. -- type One = Succ Zero type Mass rep = Dimensioned One Zero Zero rep type Length

Dimensional analysis with fundeps

2001-04-09 Thread Tom Pledger
I like it! : | 3) Allow arbitrary user-defined "fundamental" dimensions |(for things like dollars or radians) -- this may be |very tricky; | | 4) Allow several unit systems (such as SI and Imperial) |to coexist. Some suggestions/quibbles... If you clearly make the type

Re: Dimensional analysis with fundeps

2001-04-09 Thread John . Velman
1) What is a fundep? 2) This is a very interesting topic, and rather complex. It has come up (dimensions, units, -- not Haskell implementations of them) in some recent work on STEP (ISO 10303). I'm only now trying to come up to some speed on Haskell, and only now trying to recall what I used

GHC-5.00, first attempts

2001-04-09 Thread Ralf Hinze
Dear all, here are the results from my first attempts to install ghc-5.00 on my linux machine: o Using the binary package: I was not able to install the documentation: make install-docs ./mkdirhier /home/ralf/Lang/share/ghc-5.00 cp -r html/* /home/ralf/Lang/share/ghc-5.00 chmod -R 644

Re: failed when trying to compile FranTk with ghc

2001-04-09 Thread Jan Kort
luc wrote: I tried FranTk with ghc 4.08 and got : (this is the "fixed" FrankTk, alledged working with 4.06, if im not wrong) are there any difference with 4.06 and 4.08 ? Below is a list of fixes to get FranTk working with ghc4.08. Jan Run configure like normal, i.e.: ./configure