>
> It's just annoying that turning a partial function into a total one
> looses so much strictness, since it prevents strictness propagation. Of
> course, this is easily solved using a `strict' Maybe:
> data Perhaps a = Just' !a | Nothing'
>
> Are other people experiencing the same thin
Hello Mirko,
Friday, May 12, 2006, 4:42:02 PM, you wrote:
>> PS: I am still curious: does threadDelay use
>> the wall clock or the per-process clock (CPU time)?
> I think it uses wall clock time. Proof:
>> And regardless of the answer - how could one obtain
>> the opposite behaviour? (I don't f
PS: I am still curious: does threadDelay use
the wall clock or the per-process clock (CPU time)?
And regardless of the answer - how could one obtain
the opposite behaviour? (I don't find this discussed
in the visible docs. Or am I missing something?)
I think it uses wall clock time. Proof:
*N
Arjen van Weelden wrote:
> Personally, I'm often surprised by the laziness introduced by Maybe.
Yes. That's why I chose the return type Boolean in my original post,
and I included the remark on "Just x with x in whnf".
Mirko used a list, where whnf is not enough.
PS: I am still curious: does th
Donald Bruce Stewart wrote:
rahn:
Donald Bruce Stewart wrote:
watchdogIO :: Int -- milliseconds
-> IO a -- expensive computation
-> IO a -- cheap computation
-> IO a
I'm not satisfied by the given function completely. Suppose the wrappers
for pure c
rahn:
> Donald Bruce Stewart wrote:
>
> >watchdogIO :: Int -- milliseconds
> > -> IO a -- expensive computation
> > -> IO a -- cheap computation
> > -> IO a
>
> I'm not satisfied by the given function completely. Suppose the wrappers
> for pure comput
Donald Bruce Stewart wrote:
watchdogIO :: Int -- milliseconds
-> IO a -- expensive computation
-> IO a -- cheap computation
-> IO a
I'm not satisfied by the given function completely. Suppose the wrappers
for pure computations
watchdog1 :: Int
Donald Bruce Stewart wrote:
> forkIO + killThread && threadDelay
OK that's nice and solves my problem. Thanks!
Is the delay measured on the wall clock
or on the user (per-process) clock?
--
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
http://www.imn.htwk-leipzig.de/~waldmann/ ---
waldmann:
> What is the idiomatic way to say in (ghc) Haskell:
> "run this computation for at most x seconds"
> (e. g. it returns Boolean; imagine a primality test)
> so I want something :: Int -> a -> Maybe a
> with the guarantee that the result is
> Just x with x in whnf, or Nothing.
> I gu
What is the idiomatic way to say in (ghc) Haskell:
"run this computation for at most x seconds"
(e. g. it returns Boolean; imagine a primality test)
so I want something :: Int -> a -> Maybe a
with the guarantee that the result is
Just x with x in whnf, or Nothing.
I guess one answer is "that'
10 matches
Mail list logo