[Ur] Polymorphic function types?

Ron de Bruijn rmbruijn at gmail.com
Thu Oct 13 10:48:30 EDT 2011


Hi,

The manual talks about a construction called a polymorphic function type, but 
this construction appears to have zero examples (nothing in the demos, the 
tutorial or mailing list).

Just creating valid syntax by applying the rules also doesn't appear to work.

con name::Type = int (* ok *)

Applying the 'polymorphic function type' rule (int is x and Type is clearly a 
kind, the arrow is ->, and int is clearly a tau).
con nametwo::Type = int ? Type -> int (* not OK *)

Now, I don't expect this to do anything useful, but I did expect to get a 
type-error, not a syntax error.

I kind of expect that Ur polymorphic function types are the same as these: 
http://en.wikibooks.org/wiki/Haskell/Polymorphism#Higher_rank_types . Is that 
correct? If so, can you show how for example the ST monad would work in Ur syntax?

-- 
Best regards,
   Ron de Bruijn



More information about the Ur mailing list