]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/types/TFun.java
Merged changes from feature/scl to master.
[simantics/platform.git] / bundles / org.simantics.scl.compiler / src / org / simantics / scl / compiler / types / TFun.java
index e26c5b07ac923922a8c4e4270ede948b3b1f3cbb..6fc9b42b22bb165481e7cb0da6f8c1e0122c3ce2 100644 (file)
@@ -209,6 +209,22 @@ public class TFun extends Type {
         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();
@@ -243,4 +259,9 @@ public class TFun extends Type {
     public Kind getKind(Environment context) {
         return Kinds.STAR;
     }
+    
+    @Override
+    public Type[] skeletonCanonicalChildren() {
+        return new Type[] {Skeletons.canonicalSkeleton(domain), Skeletons.canonicalSkeleton(range)};
+    }
 }