public static final TCon ADDITIVE = con("Prelude", "Additive");
public static final TCon MONAD = con("Prelude", "Monad");
+ public static final TCon MONAD_E = con("Prelude", "MonadE");
public static final TCon INTEGRAL = con("Prelude", "Integral");
public static final TCon RING = con("Prelude", "Ring");
public static final TCon ORDERED_RING = con("Prelude", "OrderedRing");
public static final TUnion NO_EFFECTS = new TUnion();
public static final TCon PROC = con(BUILTIN, "Proc");
+ public static final TCon EXCEPTION = con(BUILTIN, "Exception");
public static final TCon BRANCH_POINT = con(BUILTIN, "BranchPoint");
+
+ public static final TCon CHRContext = con(BUILTIN, "CHRContext");
+
private volatile static TCon[] tupleCache = new TCon[] {
UNIT, null
}
};
-
+
public static boolean isPrimitive(Type type) {
return type == BOOLEAN || type == BYTE || type == CHARACTER || type == SHORT ||
type == INTEGER || type == LONG || type == FLOAT || type == DOUBLE || type == STRING;
public static Type union(Type effect1, Type effect2) {
return new TUnion(effect1, effect2);
}
+
+ public static Type union(Type effect1, Type effect2, Type effect3) {
+ return new TUnion(effect1, effect2, effect3);
+ }
public static Type union(List<Type> effects) {
if(effects.size() == 0)
return parseType(new TypeElaborationContext(environment), text);
}
- public static Type parseType(ITypeEnvironment environment, THashMap<String, TVar> localTypeVars, String text) throws SCLTypeParseException {
- return parseType(new TypeElaborationContext(localTypeVars, environment), text);
- }
-
public static Type parseType(String text) throws SCLTypeParseException {
return parseType(new TypeElaborationContext(DUMMY_TYPE_ENVIRONMENT), text);
}
-
- public static Type parseType(THashMap<String, TVar> localTypeVars, String text) throws SCLTypeParseException {
- return parseType(new TypeElaborationContext(localTypeVars, DUMMY_TYPE_ENVIRONMENT), text);
- }
private static Type parseType(TypeElaborationContext context, String text) throws SCLTypeParseException {
SCLParserImpl parser = new SCLParserImpl(new StringReader(text));