> > On Mon, Feb 14, 2011 at 1:41 PM, John Meacham <j...@repetae.net> wrote: > >> Isn't this what data families (as opposed to type families) do? > > On Tue, Feb 15, 2011 at 7:02 AM, Conal Elliott <co...@conal.net> wrote:
> Yes, it's one things that data families do. Another is introducing *new* > data types rather than reusing existing ones. - Conal Roman Leshchinskiy once used a newtype to make a type family injective and remarked: "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." [1] Of course, introducing a newtype also requires introducing new types instead of reusing existing ones.. Sebastian [1]: http://unlines.wordpress.com/2010/11/15/generics-for-small-fixed-size-vectors/
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users