Update:
Solution also tested and working in Swift 5 and Xcode 11.
Original:
I would like to add that if you are using Carthage to compile a module in Swift 3.2 you should go to a terminal and run:
sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer
To use the Xcode 9 command line tools, then you can run:
carthage update NameOfTheLibrary --platform iOS --no-use-binaries
This will compile the library with your current command line tools, it can be a bit slow but now the project should build.
Note
To revert and use your stable Xcode command line tools simply run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer