Put a Just around it?

transMit s now key (Just newmsgs) q m

On Sat 27 Jul 2013 20:05:43 JST, Joerg Fritsch wrote:
> If I have the following type signature
> transMit :: Serialize a => Socket -> POSIXTime -> KEY -> Maybe a -> TPSQ -> 
> TMap a -> IO ()
>
>
> And the function is called with
> transMit s now key newmsgs q m
> where newmsgs is whatever type a I get but _not_ a Maybe a
>
> then I get the error
> Could not deduce (a ~ Maybe a)
> from the context (Serialize a)
>
> Can I somehow when I call transmit cast newmsgs into a Maybe newmsgs or so so 
> that the function call fits the type signature?
>
> --Joerg
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

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

Reply via email to