<meta http-equiv="content-type" content="text/html; charset=utf-8"><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div><div class="h5"><div class="gmail_quote">On Mon, Feb 14, 2011 at 1:41 PM, John Meacham <span dir="ltr">&lt;<a href="mailto:john@repetae.net" target="_blank">john@repetae.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex; ">
Isn&#39;t this what data families (as opposed to type families) do?</blockquote></div></div></div></blockquote><br><div class="gmail_quote">On Tue, Feb 15, 2011 at 7:02 AM, Conal Elliott <span dir="ltr">&lt;<a href="mailto:conal@conal.net">conal@conal.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yes, it&#39;s one things that data families do. Another is introducing *new* data types rather than reusing existing ones. - Conal</blockquote>
<div><br></div><div>Roman Leshchinskiy once used a newtype to make a type family injective and remarked: &quot;As an aside, it is well possible to [use] an injective data type family or even a GADT [instead]. ... However, this really messes up GHC’s optimiser and leads to very inefficient code.&quot; [1]</div>
<div><br></div><div>Of course, introducing a newtype also requires introducing new types instead of reusing existing ones..</div><div><br></div><div>Sebastian</div><div><br></div><div>[1]: <a href="http://unlines.wordpress.com/2010/11/15/generics-for-small-fixed-size-vectors/">http://unlines.wordpress.com/2010/11/15/generics-for-small-fixed-size-vectors/</a></div>
</div>