Sven Panne wrote:
[ cut ]
Doing a similar thing for GHC would complicate things for implementors
and users. How e.g. would you write your Makefile rules with .hi files
in an archive?
Yes, it would complicate things for implementors, as they'd have to implement
it. However I don't think adding
Glasgow Haskell is very slow. I know it needs a lot of CPU time anyway,
but when I do ps it is only using 50% of the CPU available, and frequently
less. So I think what is happening is that it is spending half of its time
waiting for the Network Filing System to open and fstat interface files.
Hannah Schroeter wrote:
Hello!
On Mon, May 31, 1999 at 06:01:31PM +0200, Friedrich Dominicus wrote:
Hannah Schroeter wrote:
Hello!
On Fri, May 28, 1999 at 08:00:27AM +0200, Friedrich Dominicus wrote:
I wrote before with my trouble understanding hugsIsEOF. But I don't have
Hello!
On Tue, Jun 01, 1999 at 06:58:32AM +0200, Friedrich Dominicus wrote:
[...]
I want to do the following, read a file line by line and finding out
which line is longer than x-chars. I want to print out which lines are
so long. I think that can just be done line-wise.
Thanks for you
Hannah Schroeter wrote:
[...] So, still no need to fuzz with file handles :-)
... and no need to fuzz with intermediate names, either. :-) If you
define an operator for reversed function composition
(.|) = flip (.)
and read it like a pipe in *nix, you get a one-liner:
longerThan fn
Hannah Schroeter wrote:
Hello!
On Tue, Jun 01, 1999 at 06:58:32AM +0200, Friedrich Dominicus wrote:
[...]
I want to do the following, read a file line by line and finding out
which line is longer than x-chars. I want to print out which lines are
so long. I think that can just be
It would be nice if the prelude defined more general functions like:
splitStr c s = left:case right of [] - []; otherwise - splitStr c (tail right)
where (left,right)=span (/=c) s
joinStr c l = case l of []- []; otherwise - foldl1 (\x y-x++c:y) l
The implementation of lines and unlines
Friedrich Dominicus wrote:
[...] How can I combine the output with a line-number can I put that
into the filter? Or do I have to found another solution?
Don't fear! Mr. One-Liner comes to the rescue:;-)
longerThan fn lenlim = readFile fn = lines .| filter (length .| (lenlim)) .| zip
Keith Wansbrough wrote:
Sven Panne wrote:
Don't fear! Mr. One-Liner comes to the rescue:;-)
longerThan fn lenlim = readFile fn = lines .| filter (length .| (lenlim))
.| zip [1..] .| map (\(n,l) - shows n ") " ++ l) .| unlines .| putStr
Friedrich wrote:
Do you want to
Date: Tue, 01 Jun 1999 17:32:22 +0200
From: Sven Panne [EMAIL PROTECTED]
Don't fear! Mr. One-Liner comes to the rescue:;-)
longerThan fn lenlim = readFile fn = lines .| filter (length .| (lenlim)) .|
zip [1..] .| map (\(n,l) - shows n ") " ++ l) .| unlines .| putStr
Are you sure
~c [EMAIL PROTECTED]
~r Readme
~e
Keith Wansbrough wrote:
Sven Panne wrote:
Don't fear! Mr. One-Liner comes to the rescue:;-)
longerThan fn lenlim = readFile fn = lines .| filter (length .| (lenlim))
.| zip [1..] .| map (\(n,l) - shows n ") " ++ l) .| unlines .| putStr
Friedrich wrote:
Do you want to
On Tue, 1 Jun 1999, Sven Panne wrote:
Friedrich Dominicus wrote:
[...] How can I combine the output with a line-number can I put that
into the filter? Or do I have to found another solution?
Don't fear! Mr. One-Liner comes to the rescue:;-)
How about initiating Haskell
Kevin Atkinson wrote:
For those of you who may be interested:
I am working on an implementation of Nameable Type Parameters written in
Haskell. I currently have them working in a so called Mini Haskell
where all kind information is presented explicitly. I had a few
unification problems
Sven Panne wrote:
Don't fear! Mr. One-Liner comes to the rescue:;-)
longerThan fn lenlim = readFile fn = lines .| filter (length .| (lenlim)) .|
zip [1..] .| map (\(n,l) - shows n ") " ++ l) .| unlines .| putStr
Friedrich wrote:
Do you want to drive me away from learning
__ __ __ __ ___ _
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 Standard
||___|| ||__|| ||__|| __||Copyright (c) 1994-1999
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| ||
16 matches
Mail list logo