Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Functional > cheesy hack to ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 2821 of 2841
Post > Topic >>

cheesy hack to get first class polymorphism?

by raould <raould@[EMAIL PROTECTED] > Apr 24, 2008 at 04:24 PM

Not that you need such a hack since there seems to have been a slew of
folks coming up with extentions to HM that play nice. But I was
wondering if one could approximate

/* horrible pseudocode */
id x = x : 'a -> 'a.
foo i:int s:string = Pair(id i, id s) : int -> string ->
Pair(int,string).

in regular old non-System-F supporting HM systems by generating (sorta
like C++ template expansion) a new version of id for every type it is
applied to in foo. Sort of a macro expansion.

?




 5 Posts in Topic:
cheesy hack to get first class polymorphism?
raould <raould@[EMAIL   2008-04-24 16:24:01 
Re: cheesy hack to get first class polymorphism?
Paul Rubin <http://phr  2008-04-24 19:06:13 
Re: cheesy hack to get first class polymorphism?
torbenm@[EMAIL PROTECTED]  2008-04-25 09:27:37 
Re: cheesy hack to get first class polymorphism?
Jon Harrop <jon@[EMAIL  2008-04-28 14:43:27 
Re: cheesy hack to get first class polymorphism?
Jon Harrop <jon@[EMAIL  2008-04-28 14:43:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 21:29:11 CDT 2008.