No such UIKit - Xcode 10.1 - Swift PG
This bug has been around for a great while, judging by the many web searches. This screenshot says it all. Note that the pow function works, even though the message says "No such module UIKit." It works with Playground Settings set to IOS or MacOS.
I couldn't figure out how to post the screenshot although many others have. You'll have to imagine it.
iMac, macOS High Sierra (10.13.1)