Hi Stephen,<br>I wasn't aware of Data.Dynamic.<br>I tried:<br><br><i>viewEvent :: Dynamic -> IO ()<br>viewEvent event = do<br> case fromDynamic event of<br> Nothing -> return ()<br> Just (Message s) -> putStrLn $ show s</i><br>
<br>But still got the same error (Ambiguous type variable `t0' in the constraint: (Typeable t0) arising from a use of `fromDynamic')...<br><br>Best,<br>Corentin<br><br><br><div class="gmail_quote">On Mon, Sep 10, 2012 at 11:33 PM, Stephen Tetley <span dir="ltr"><<a href="mailto:stephen.tetley@gmail.com" target="_blank">stephen.tetley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Whilst dynamic typing isn't idiomatic for Haskell, it seems like<br>
you've decided you want it. So why not use Data.Dynamic rather than<br>
roll you're own dynamic typing with Typeable?<br>
</blockquote></div><br>