brew cask commands don't function because a package has a broken header

I was getting the follow error when running brew upgrade or cask commands

Error: Cask 'haskell-for-mac' is unreadable: undefined method `dots_to_slashes' for "1473.1526101439":Cask::DSL::Version

After running brew uninstall, brew purge, brew doctor and having no luck resolving the issue I headed over to

/usr/local/Caskroom

and then just did

rm -rf haskell-for-mac

Problem solved - not what I would have expected but it worked.