[MLton] Type error: variable applied to wrong number of type
args
Matthew Fluet
fluet@cs.cornell.edu
Thu, 8 Sep 2005 18:36:24 -0400 (EDT)
It seems to be related to flex-type resolution; if you add a type
ascription to the bindtype function, the error goes away.
and bindtype v (i, { name, reader=_, writer=_, tyvars, typ }, l) =
case typ of
(BIND typ) => l &&
(if i = 0 then " type " else
case Vector.sub (v, i-1) of ({typ = BIND _, ... } : bind_typ) => " and "
^^^^^^^^^^
| _ => " withtype ")
++ tyvart tyvars && name && " = " ++ inline typ && "\n"
| (DATATYPE v) => l &&
(if i = 0 then " datatype " else " and ")
++ tyvart tyvars && name && " = " ++ foldli const v