Ticket #27 (new defect)

Opened 5 years ago

Last modified 5 years ago

mkUpdater sleeps for constant behaviours

Reported by: povman Owned by:
Priority: minor Milestone:
Version: Keywords:
Cc:

Description

I wrote a little sample program:

main = do
    c <- makeClock
    a <- mkUpdater (cGetTime c) (fmap (const (print "ping")) time)
    a

which, to my dismay, exited without printing "ping"! I have therefore added a new behaviour and a rewrite rule which allows me to implement my test thusly:

main = do
    c <- makeClock
    a <- mkUpdater (cGetTime c) (bConst (print "blah"))
    a

Attachments

constantBehaviours.patch (2.9 kB) - added by povman 5 years ago.

Change History

Changed 5 years ago by povman

Changed 5 years ago by povman

Just realised I didn't need bConst (and removed it from the patch):

main = do
    c <- makeClock
    a <- mkUpdater (cGetTime c) (pure (print "blah"))
    a
Note: See TracTickets for help on using tickets.