[nem-en] Going forward
Michal Moskal
michal.moskal at gmail.com
Wed Nov 22 08:04:03 CET 2006
On 11/22/06, Igor Tkachev <it at rsdn.ru> wrote:
> But we still have a couple of issues.
>
> 1. First one needs to be done for colorizer to colorize user types.
> I have env at my context and I need a method to tell me if the
> string provided is a type or not. For example, it should return
> true for the 'List' string if System.Collections namespace is open.
> For the System.Collections.List it should return true in any case.
> It's OK if we get two methods for short and full names.
>
> Actually this one is only colonizing functionality which is missing
> right now comparing to C#.
What about List['a]? What if there is no 'a in current context? What
about 'a (when it is, or is not in the current context)? If you want
to handle that correctly you need the current TyVarEnv, which is
stored in the current TypeBuilder. If you have it handy, then there is
BindType method in it. It will however report errors in case of
problems. I can also prepare a method there that return option[TyVar]
or something.
If you just want List and the like to be colorized, you can try
GlobalEnv.LookupType method. It can be a bit improved to check number
of type parameters.
--
Michał
More information about the devel-en
mailing list