Stereo image matching in Haskell