List union implementation
Your base cases are both invalid and unnecessary:


union' [] _ = []
union' _ [] = []



There isn't anything bad about using where, especially when you consider that union' needs no base cases.  Your question is, really, whether union' should be implemented using some kind of nub or not.  If you're reinventing-the-wheel as an exercise, why wouldn't you want to reimplement nub as well?

The real question you should be asking is how to avoid ++.