> process
>    :: [Activity]
>    -> SF [InputEvent] SystemOutput
> process activities
>    = proc inputEvents -> do
>        rec
>            let senses = map (\state -> (inputEvents, state)) states
>            states <- par route activities -< senses
>        returnA -< states
>
> route
>    :: [Sense]
>    -> [sf]
>    -> [(Sense, sf)]
> -- route a sfs = fmap (\sf -> (head a, sf)) sfs
> route = zip

For those who are interested, I found a "solution" (more of a hack, really):

route a  sfs = zip (take num a) sfs
    where
        num = length sfs

In other words, constraining the size of the input list to that of the
signal functions list was the answer. This isn't an ideal solution
though since it silently throws away any "extra" input that might be
introduced by buggy callers, and I still don't understand the problem
with my original code.

-- 
  M. George Hansen
  technopolit...@gmail.com

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to