Solving type equation with recursive types for a variable 'a does not work when 'a occurs below a union/intersection/negation
The problem is in decompose and solve_rectype in Types. The Positive module giving the least fix point solution of a system of equation (aka Courcelle) does not work when variable occurs below type connective.
See for instance:
debug tallying  [ (Int, 'a),'b ; 'b, 'a ] ;;