Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
As-binding #-types
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1996-09-12 (11:17)
From: christo@n...
Subject: As-binding #-types

  The manual says you can use "as" to bind row variables in a type, so
"#myclass as 'a -> 'a" would be the type of a function to and from equal
types, instead of possibly different descendants of "#myclass".

  But I've had trouble using this type expression in type definitions.

  #type 'a mytype = Mk of #myclass;;
  Unbound row variable in #myclass

is an error as expected, but

  #type 'a mytype = Mk of #myclass as 'a;;
  Unbound row variable in #myclass

yields the same problem.  Shouldn't this be possible?

Frank Christoph                 Next Solution Co.      Tel: 0424-98-1811                             Fax: 0424-98-1500