Allow for loops to work with user defined types

Note: changed the sast to take a literal string. I was using a `SId(_literal string_)` before but that's not kosher because all `SId`s are supposed to be rewritten to their correct types before being passed through. It's complicated to get them out once we've done that so I implemented it this way.