import org.simantics.scl.compiler.common.precedence.Precedence;
import org.simantics.scl.compiler.constants.BooleanConstant;
import org.simantics.scl.compiler.constants.Constant;
-import org.simantics.scl.compiler.constants.JavaConstructor;
import org.simantics.scl.compiler.constants.JavaStaticField;
import org.simantics.scl.compiler.constants.JavaStaticMethod;
import org.simantics.scl.compiler.constants.NoRepConstant;
public class Builtins extends ConcreteModule {
- public static SCLValue[] TUPLE_CONSTRUCTORS = new SCLValue[Constants.MAX_TUPLE_LENGTH+1];
- public static SCLValue[] LIST_CONSTRUCTORS = new SCLValue[Constants.MAX_LIST_LITERAL_LENGTH+1];
+ public static final SCLValue[] TUPLE_CONSTRUCTORS = new SCLValue[Constants.MAX_TUPLE_LENGTH+1];
+ public static final SCLValue[] LIST_CONSTRUCTORS = new SCLValue[Constants.MAX_LIST_LITERAL_LENGTH+1];
- public static final Builtins INSTANCE = new Builtins();
+ public static Builtins INSTANCE = new Builtins();
public static SCLValue Nothing;
public static SCLValue Just;
addTypeDescriptor("Variant", new StandardTypeConstructor(Types.VARIANT, Kinds.STAR, TypeDesc.forClass(Variant.class)));
addEffectConstructor("Proc", new EffectConstructor(Types.PROC));
+ addEffectConstructor("Exception", new EffectConstructor(Types.EXCEPTION));
//addTypeDescriptor("->", new StandardTypeConstructor(Kinds.STAR_TO_STAR_TO_STAR, Constants.FUNCTION));
addTypeDescriptor("[]", new StandardTypeConstructor(Types.LIST, Kinds.STAR_TO_STAR, Constants.LIST));
new Constructor(Locations.NO_LOCATION, MaybeType.INSTANCE, Just.getName(), new Type[] {MaybeType.INSTANCE.parameters[0]}, null)
);
+ // *** Dynamic ***
+
+ addValue("Dynamic", DynamicConstructor.INSTANCE);
+
// *** Vector ***
TypeClass VecCompC = new TypeClass(Locations.NO_LOCATION,
return documentation;
}
+ public static void flush() {
+ INSTANCE = new Builtins();
+ }
+
}