You are better to use simple typeclasses. It depends on what you are trying to do, but when I want an open type, I use classes + type families.<br><br><br><div class="gmail_quote">2011/3/18 Stephen Tetley <span dir="ltr">&lt;<a href="mailto:stephen.tetley@gmail.com">stephen.tetley@gmail.com</a>&gt;</span><br>

<br>
&gt; Anyway, a new question arose. If I have already declared a type, can I add new constructors to it from other modules?<br>
&gt;<br>
&gt; Maybe there are some GHC extensions to solve both these problems.<br>
<br>
</div>&quot;no can do&quot;.<br>
<br>
There are ways to encode extensible types (e.g the &quot;finally tagless&quot;<br>
sytle), but on balance you are better to design extensibility for<br>
functions - easy to add more functions - than make your code much more<br>
complicated so it can be extensible for types.<br>
<br>
Parser combinators and pretty print combinators are great and largely<br>
simple examples of extensibility with functions.<br>
<div><div></div><div class="h5"><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>