Set<Type> constructors = env.lookupConstructor(adt, constructor);
if (constructors.size() == 0) {
throw new UndeclaredType(name + "." + constructor, this);
} else if (constructors.size() > 1) {
throw new AmbiguousFunctionReference(name + "."
+ constructor, this);
} else {
return constructors.iterator().next();
}