right now infer() only works with Types not TypeRefs.
The only challenge here is in the App case when you construct t1 -> t2 then unify that with something else. The issue is t1 and t2 might have different shifts so what shift do you give to their composition t1 -> t2? This suggests types should internally point to other typerefs instead of other rawtyperefs, tho this would only be needed for inference and not for top down search so thats a little weird. Though perhaps that would be very little overhead anyways actually like essentially zero overhead.
right now
infer()only works withTypes notTypeRefs.The only challenge here is in the App case when you construct
t1 -> t2then unify that with something else. The issue is t1 and t2 might have different shifts so what shift do you give to their compositiont1 -> t2? This suggests types should internally point to other typerefs instead of other rawtyperefs, tho this would only be needed for inference and not for top down search so thats a little weird. Though perhaps that would be very little overhead anyways actually like essentially zero overhead.