Closed davidweichiang closed 1 year ago
When a datatype has a parameter
data box a = Box a;
and it is applied to itself, like box (box Unit), it is currently treated as recursive even though it's not.
box (box Unit)
define copy_mono = \x: box (box Unit). (x, x); -- causes an error define copy_poly = \x. (x, x); -- ok extern e: box (box Unit); -- causes an error let x = (Box (Box ())) in (copy_mono x, copy_poly x)
When a datatype has a parameter
and it is applied to itself, like
box (box Unit)
, it is currently treated as recursive even though it's not.