[Haskell-cafe] Re: type synonym liberalization (was "class []"
proposal)
Bulat Ziganshin
bulat.ziganshin at gmail.com
Wed Aug 23 03:12:59 EDT 2006
Hello Arie,
Wednesday, August 23, 2006, 2:54:54 AM, you wrote:
>> With the proper interpretation, type synonyms like
>> type ABlockStream = BlockStream b => b
>> type AMemoryStream = MemoryStream m => m
> How does your proposal compare to introducing existential types proper? As in
> type ABlockStream = exists b. BlockStream b => b
existential variables pack dictionary inside the data item (object)
itself, like in the OOP languages. so this the _semantic_ change.
Brandon's idea is just _syntax_ sugar, one of the possible ways to
simplify writing of signatures for regular Haskell polymorphic
functions, what pass dictionaries apart of objects
read the http://haskell.org/haskellwiki/OOP_vs_type_classes
and look for "existential" there
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list