sml: make type visitable
sml: make use of new primitives class in model