Discrete Optimization in Haskell