[Haskell-cafe] Name overloading

Edward Kmett ekmett at gmail.com
Wed Jan 13 14:22:15 EST 2010


>
> On Wed, Jan 13, 2010 at 2:14 PM, Bulat Ziganshin <
> bulat.ziganshin at gmail.com> wrote:
>
> class Open a where
>  open :: a
>
> instance Open (Int -> String) where ...
> instance Open (String -> Int) where ...
>

The problem with this approach is that you'll need to supply type
annotations with basically every use of open, which is even more verbose
than prepending the type name.

-Edward Kmett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100113/ab9dc672/attachment.html


More information about the Haskell-Cafe mailing list