Existential types: want better syntactic support (autoboxing?)

Sebastian Sylvan sebastian.sylvan at gmail.com
Mon Jan 30 12:13:27 EST 2006


Seems like a convenient feature to me.

Also, you may want to have a function which works on a list of any
values which are both readable and showable.
Say (mockup syntax):

foo :: <Show a, Read a> => [a]
foo = [ 1, True, myRocketLauncher ]

Which would create a newtype called "ShowReadAble" or something with
extistential types and also instantiate that type in both Show and
Read.

I do agree that this is something I'd like in a lot of cases, and it
probably would be used quite a bit more if it were convenient (and
standardised!).

I leave it to someone else to figure out how to make this play nice
with e.g. type inference.

/S

--
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell-prime mailing list