Jens Petersen <[EMAIL PROTECTED]> writes:
> > The problem is that the child process doesn't receive all the data which
> > the parent sends. It's as if "hPutStr vonh txt" sends the data lazily
> > somehow, and "hClose vonh" closes the pipe prematurely.
> >
> > It varies from run to run exactly w
--- Pixel <[EMAIL PROTECTED]> wrote:
> Lennart Augustsson <[EMAIL PROTECTED]> writes:
>
> > > Diego Yanivello wrote:
> > >
> > > > hi,is there (in Haskell) a function like
> existFile :: FilePath ->
> > > > IO (Bool) ? Thanks!
> >
> > Using such a function is generally a bad idea
> b
Thank you for making my point. All these are indeed examples of broken code.
(Not because it's Perl. :)
-- Lennart
Pixel wrote:
> Lennart Augustsson <[EMAIL PROTECTED]> writes:
>
> > Just because many applications use this doesn't make it safe or good.
> > Presumably you are testing for th
Lennart Augustsson <[EMAIL PROTECTED]> writes:
> Just because many applications use this doesn't make it safe or good.
> Presumably you are testing for the existence of the file to do something
> to it (read, create, delete...). It's better to do the operation you want to
> do and have it fail i
Just because many applications use this doesn't make it safe or good.
Presumably you are testing for the existence of the file to do something
to it (read, create, delete...). It's better to do the operation you want to
do and have it fail if the file is missing (or existing if you create). You
hi,
is there (in Haskell) a function
like
existFile :: FilePath -> IO
(Bool) ?
Thanks!
***
Empirical Software Engineering: An International Journal
- CALL FOR PAPERS -
***
http://www.kluweronline.com/issn/1382-3256
. Co
On Tue, 19 Mar 2002 09:56:49 +
"Colin Runciman" <[EMAIL PROTECTED]> wrote:
> > Are there any tools to perform program slicing on Haskell?
> > I often find myself wanting to find all "fromJusts" invoked
> > from the current function, or all functions that use a
> > particular member of my mona
Daan Leijen writes:
> 1) Are e1 and e2 equal?
>
> > f (x:xs) y = x
> > g (x:xs)= \y -> x
> >
> > e1 = seq (f []) 1
> > e2 = seq (g []) 1
> ...
> 1)
> answer:
> "e1" equals the value 1, while "e2" is undefined.
> ...
> opinion:
> I think that the pattern matching translation rules
> a
Hi all,
I have put together some interesting Haskell puzzles!
Not many people were able to solve all three puzzles
so don't be discouraged you don't know all the answers.
Have fun,
Daan.
-
- All three puzzles are "Haskell 98"; you can solve
Dean
| From Simon Marlow's reply, I gather that the current
| implementations of Concurrent Haskell provide "concurrency"
| but not "parallelism", and that provision of parallelism is
| not likely in the near term.
That's more or less right. The trouble is that for shared-memory
parallelism
[EMAIL PROTECTED] writes
> On holiday, I started reading about Gaussian integers (as you do) and I
> thought this should be a piece of cake for Haskell. I get the following
> error in Hugs:
> [..]
>
> data Integral a => Gaussian a = Gaussian a a
> deriving (Eq, Show)
>
> instance Num (Gaussia
[EMAIL PROTECTED] wrote:
> I've already declared Gaussian a as being of class Eq so why does it need
> to be told again?
>
> data Integral a => Gaussian a = Gaussian a a
>deriving (Eq, Show)
>
> instance Num (Gaussian a) where
>Gaussian a b - Gaussian a' b' = Gaussian (a-a') (b-b')
>
On holiday, I started reading about Gaussian integers (as you do) and I
thought this should be a piece of cake for Haskell. I get the following
error in Hugs:
ERROR "D:\Temp\comptst2.hs" (line 4): Cannot build superclass instance
*** Instance: Num (Gaussian a)
*** Context supplied
Thanks for all the advice. In the end, I couldn't make $! work for me
(it always seems to be harder than I think it will be to use it, and $!
and deepSeq makes my code run slowly). But a continuation passing style
foldl worked wonderfully.
I now have:
> cpsfold f a [] = a
> cpsfold f a (x:x
> Are there any tools to perform program slicing on Haskell?
> I often find myself wanting to find all "fromJusts" invoked
> from the current function, or all functions that use a
> particular member of my monad's ADT.
Assuming that what you want to see are the applications of
these functions tha
16 matches
Mail list logo