String Alignment implemented in Haskell