Implemented Bayesian weights calculator in Haskell.