[nem-en] Re: Bug 776

Michal Moskal michal.moskal at gmail.com
Sun Oct 8 23:43:40 CEST 2006


On 10/8/06, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> ---------- Forwarded message ----------
> From: vc <vc at rsdn.ru>
> Date: Oct 8, 2006 5:59 PM
> Subject: RE: Bug 776
> To: Kamil Skalski <kamil.skalski at gmail.com>
>
>
>    > It's
>    >   ty = par.MonoBindType (f.ty);
>
>    What is 'Mono'?

Mono refers to MType (mono-type), which is a type that is not
type-variable (class TyVar, MType derives from it).

Type variable is is a type that is not yet instantiated. It is used
during type inference process. For example if we have:

mutable foo = null;

then foo gets a fresh type variable as type. However, if we have:

foo[T] (x : T) : void
  ... x ...

then x has type MType.TyVarRef, which is quite different and fully
instantiated. On the other hand when foo is used in call, it gets type
(fresh ty var) -> void.

In short MonoBindType will just refuse to bind <[ _ ]> I guess.

-- 
   Michał


More information about the devel-en mailing list