21 Dec
2007
21 Dec
'07
7:13 p.m.
Hi Oleg! Thanks a lot for your answer, you turn out to end up solving every problem I get stuck in :) This bit was the essential part of it. On Dec 20, 2007 11:47 AM, <oleg@okmij.org> wrote:
-- it is important to give the signature to (,) below: we pack the cons -- function of the right type! cons :: forall a b. (Typeable a, Typeable b) => Signal a -> Signal b -> Signal (a,b) cons (Signal sig1) (Signal sig2) = Signal (PrimSignal (Cons (toDyn ((,)::a->b->(a,b))) sig1 sig2))
mapSnd :: (Typeable a, Typeable b) => Signal (b, a) -> Signal a mapSnd = mapSY snd