How to associate static information for cond forms?
I'm trying to use Rhombus static in my program, and there was only one place that I was unable to do so. I'm implementing the algorithm J for Hindley-Milner type inference, and I have something such as: method unify(ty1 :: Type, ty2 :: Type): let ty1 = prune(ty1) let ty2 = prune(ty2) cond | ty1 == ty2: #void | ty1 is_a TFunction && ty2 is_a TFunction: let ty1 :~ TFunction = ty1 // HERE: how do I get rid of this? let ty2 :~ TFunction = ty2 // HERE: how do I get rid of this? guard ty1.parameters.length() == ty2.parameters.length() | error(@str{Can't match @ty1 with @ty2}) for (x in ty1.parameter
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.