<br><br><div class="gmail_quote">On Sat, Jun 16, 2012 at 3:31 PM, Corentin Dupont <span dir="ltr">&lt;<a href="mailto:corentin.dupont@gmail.com" target="_blank">corentin.dupont@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">
Hi Alexander,<br>sorry my initial example was maybe misleading. What I really what to do is to associate each event with an arbitrary data type. For example, consider the following events:<br>NewPlayer<br>NewRule<br>Message<br>

User<br><br>I want to associate the following data types with each, to pass to there respective handlers:<br>NewPlayer ---&gt; Player<br>
NewRule ---&gt; Rule<br>
Message ---&gt; String<br>
User ---&gt; String<br><br>Message and User have the same data type associated, that&#39;s why we can&#39;t use this type as a key to index the event...<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div>
<br></div><div>In that case, you definitely want FunctionalDependencies or TypeFamilies, and will probably want to drop the constraint (Handler e d) on Event e (if it doesn&#39;t work), and maybe enforce it with explicit exports.</div>
</div>