Use lattice generics and better syntax location support