addEffectConstructor("Proc", new EffectConstructor(Types.PROC));
addEffectConstructor("Exception", new EffectConstructor(Types.EXCEPTION));
+ addTypeAlias("Pure", TVar.EMPTY_ARRAY, Types.NO_EFFECTS);
+
//addTypeDescriptor("->", new StandardTypeConstructor(Kinds.STAR_TO_STAR_TO_STAR, Constants.FUNCTION));
addTypeDescriptor("[]", new StandardTypeConstructor(Types.LIST, Kinds.STAR_TO_STAR, Constants.LIST));
addTypeDescriptor("@", new StandardTypeConstructor(Types.PUNIT, Kinds.STAR, Constants.TUPLE[0]));
import org.simantics.scl.compiler.elaboration.chr.CHRRuleset;
import org.simantics.scl.compiler.elaboration.modules.Documentation;
import org.simantics.scl.compiler.elaboration.modules.SCLValue;
+import org.simantics.scl.compiler.elaboration.modules.TypeAlias;
import org.simantics.scl.compiler.elaboration.modules.TypeClass;
import org.simantics.scl.compiler.elaboration.modules.TypeClassInstance;
import org.simantics.scl.compiler.elaboration.modules.TypeDescriptor;
import org.simantics.scl.compiler.module.debug.ModuleDebugInfo;
import org.simantics.scl.compiler.top.ModuleInitializer;
import org.simantics.scl.compiler.types.TCon;
+import org.simantics.scl.compiler.types.TVar;
+import org.simantics.scl.compiler.types.Type;
+import org.simantics.scl.compiler.types.Types;
import org.simantics.scl.runtime.profiling.BranchPoint;
import gnu.trove.map.hash.THashMap;
return effectConstructors.put(name, effectConstructor) != null;
}
+ public void addTypeAlias(String name, TVar[] parameters, Type body) {
+ typeDescriptors.put(name, new TypeAlias(Types.con(moduleName, name), parameters, body));
+ }
+
public boolean addTypeClass(String name, TypeClass typeClass) {
return typeClasses.put(name, typeClass) != null;
}