[Haskell-cafe] overloaded list literals?
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Sep 6 11:38:27 EDT 2010
Hello Stefan,
Monday, September 6, 2010, 3:47:11 PM, you wrote:
> In general, it is kind of unfortunate that type classes and type
> constructors share a namespace, even though there is no way to ever mix them up.
btw, i also had proposal to automatically convert typeclasses used in
type declarations into constraints, so that:
putStr :: StringLike -> IO ()
treated as
putStr :: StringLike s => s -> IO ()
and
length :: ListLike a -> Int
treated as
length :: ListLike (c a) => c a -> Int
Together with proposals i mentioned previously, it will allow to treat
existing code dealing with lists/strings as generic code working
with any sequential container type
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list