import org.simantics.scl.compiler.types.Types;
import org.simantics.scl.compiler.types.kinds.Kind;
import org.simantics.scl.compiler.types.kinds.Kinds;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import gnu.trove.map.hash.TObjectIntHashMap;
import gnu.trove.set.hash.TIntHashSet;
* This class represents an abstract syntax tree node for a type variable.
* The only property of a type variable is its name.
*/
-public class TVarAst extends TypeAst {
+public class TVarAst extends TypeAst {
+ private static final Logger LOGGER = LoggerFactory.getLogger(TVarAst.class);
public final String name;
public TVarAst(String name) {
if(name.charAt(i) != ',') {
con = context.resolveTypeConstructor(name.substring(1, name.length()-1));
if(con == null) {
- System.err.println("Didn't find type constructor " + name + ".");
+ LOGGER.warn("Didn't find type constructor " + name + ".");
return Types.metaVar(Kinds.STAR);
}
break block;
else {
con = context.resolveTypeConstructor(name);
if(con == null) {
- System.err.println("Didn't find type constructor " + name + ".");
+ LOGGER.warn("Didn't find type constructor " + name + ".");
return Types.metaVar(Kinds.STAR);
}
}
else {
Type con = context.resolveTypeConstructor(name);
if(con == null) {
- System.err.println("Didn't find effect constructor " + name + ".");
+ LOGGER.warn("Didn't find effect constructor " + name + ".");
return Types.metaVar(Kinds.EFFECT);
}
return con;