Multi-dimensional linear interpolation in Haskell