[Haskell-cafe] Type system trickery

Andrew Coppin andrewcoppin at btinternet.com
Sun Jun 21 17:04:39 EDT 2009

David Menendez wrote:
> If you don't need code that's polymorphic between Foobar HasZoo and
> Foobar NoZoo, you could just newtype Foobar and only export smart
> constructors.

Unfortunately I want to be able to print both of them out. (After all, 
the printing algorithm is identical whether Zoo is present or not - 
except that if Zoo isn't there, you don't need to handle Zoo!)

Nice idea though.

More information about the Haskell-Cafe mailing list