Hi Stephen,<br>I wasn&#39;t aware of Data.Dynamic.<br>I tried:<br><br><i>viewEvent :: Dynamic -&gt; IO ()<br>viewEvent event = do<br>   case fromDynamic event of<br>        Nothing -&gt; return ()<br>        Just (Message s) -&gt; putStrLn $ show s</i><br>
<br>But still got the same error (Ambiguous type variable `t0&#39; in the constraint:  (Typeable t0) arising from a use of `fromDynamic&#39;)...<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">&lt;<a href="mailto:stephen.tetley@gmail.com" target="_blank">stephen.tetley@gmail.com</a>&gt;</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&#39;t idiomatic for Haskell, it seems like<br>
you&#39;ve decided you want it. So why not use Data.Dynamic rather than<br>
roll you&#39;re own dynamic typing with Typeable?<br>
</blockquote></div><br>