Option 1) Use old formulas
You can use the git story to get the formula for pandoc 1.16.0.2.
Go to the local directory where the formulas are stored:
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
Check out the pandoc story
git log pandoc.rb
It seems that the latest fixer of version 1.16.0.2 is commit 53d113c339280e6bc43325afd24333 .
1) To get all the dependencies in the correct version, you must check all the formulas in this commit (you can also check only the dependency graph).
git checkout 53d113c339
2) The cabal-install formula uses the old homebrew construct, removing it with:
brew edit cabal-install
and removing the bottle section.
3) By default, the house makes an update before installation, so you need to specify so as not to update before installation:
HOMEBREW_NO_AUTO_UPDATE=1 brew install pandoc
This will take a lot of time because you need to compile everything, there are no bottles for the latest macOS versions (Sierra and High Sierra). Depending on your version of macOS, you may run into some compilation issues ...
Option 2) Use old bottles
There are bottles available for OS X Mavericks (10.9), OS X Yosemite (10.10) and OS X El Capitan (10.11). You can install them manually, but you will also need to install the dependencies ( cabal-install 1.22.6.0 and ghc 7.10.3 ) with the correct versions. To install the old bottle box of the old formula, copy the old bottle to ~/Library/Caches/Homebrew/ and install it with:
HOMEBREW_NO_AUTO_UPDATE=1 brew install bottle_name
Option 3) Create your own retro formula
Another option is to rewrite the current pandoc formula for the desired version.
Conclusion
Each of these options is a possible way, but none of them is simple. There is no easy way to install an older version of Pandoc with Homebrew. You should use the Haskell version manager, such as Stack .