Title: RE: Blackholes and Hawk

Keith,

The code with the dependency is here:

forcedRC r c amplitude pulseWidth stepSize resultSize = take resultSize (view (bundle2 (idx, q))) where
        s = (delay 0.0 (inv Signal.** q)) *+ (pulse pulseWidth amplitude 10)
        g1 = s Signal.** (o */ c)
        g2 = g1 Signal.** (o */ r)
        q = integrate 0.0 stepSize g2

Notice that s depends on q, and q depends on s via a chain of dependencies. The integrate function on the last line calls the code I included before.

Here is a Hawk example with one:

resetCounter :: Signal Bool -> Signal Int
resetCounter reset = output
        where
                output =
                        select reset
                                (constant 0)
                                (delay 0 (increment output))

In this example output depends on select which depends on output.

The Hawk site says that GHC is supported. Perhaps there is a difference between my example and the Hawk one that is significant.

Mike

> -----Original Message-----
> From: Keith Wansbrough [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 07, 2000 4:25 PM
> To: Michael A. Jones
> Cc: 'Keith Wansbrough'; '[EMAIL PROTECTED]'
> Subject: Re: Blackholes and Hawk
>
>
> > Keith,
> > 
> > I found the mutual dependency in my program. I was in the
> function calling
> > the code I put below. However, Hawk does this sort of thing
> all the time.
> > The Hawk site says to use 4.04, and I am using 4.05.
> > 
> > Does 4.04 do a better job of preventing these deadlocks? If
> so, where can I
> > download 4.04? The GHC site only has 4.05 available for Windows.
>
> Where is the mutual dependency?  It's not clear from your
> explanation above.
>
> The compiler version should have no effect on this.  Either
> your code has a mutual dependency (black hole) or not;
> there's no way to compile such code and avoid the depencdency.
>
> --KW 8-)
> --
> : Keith Wansbrough, MSc, BSc(Hons) (Auckland) -------------------:
> : PhD Student, Computer Laboratory, University of Cambridge, UK. :
> : Native of Antipodean Auckland, New Zealand: 174d47'E, 36d55'S. :
> : http://www.cl.cam.ac.uk/users/kw217/ mailto:[EMAIL PROTECTED] :
> :----------------------------------------------------------------:
>
>

Reply via email to