public TypeAst toTypeAst(TypeUnparsingContext context) {
TypeAst domainAst = domain.toTypeAst(context);
TypeAst rangeAst = range.toTypeAst(context);
- if(Types.canonical(effect) != Types.NO_EFFECTS)
+ if(Types.canonical(effect) != Types.NO_EFFECTS && !context.showSkeletons)
rangeAst = new TEffectAst(effect.toTypeAst(context), rangeAst);
Type dom = Types.canonical(domain);
if(dom instanceof TPred)
return hash;
}
+ @Override
+ public int skeletonHashCode(int hash) {
+ hash = HashCodeUtils.updateWithPreprocessedValue(hash, FUN_HASH);
+ hash = domain.skeletonHashCode(hash);
+ hash = range.skeletonHashCode(hash);
+ return hash;
+ }
+
+ @Override
+ public int skeletonHashCode(int hash, TVar[] boundVars) {
+ hash = HashCodeUtils.updateWithPreprocessedValue(hash, FUN_HASH);
+ hash = domain.skeletonHashCode(hash, boundVars);
+ hash = range.skeletonHashCode(hash, boundVars);
+ return hash;
+ }
+
public Type getCanonicalDomain() {
if(domain instanceof TMetaVar)
domain = domain.canonical();
public Kind getKind(Environment context) {
return Kinds.STAR;
}
+
+ @Override
+ public Type[] skeletonCanonicalChildren() {
+ return new Type[] {Skeletons.canonicalSkeleton(domain), Skeletons.canonicalSkeleton(range)};
+ }
}