Haskell port of New Tong Wen Tang