sebfisch / haskell-regexp

Regular Expression Matching in Haskell
http://sebfisch.github.com/haskell-regexp/
Other
34 stars 5 forks source link

record for matchings #13

Closed sebfisch closed 14 years ago

sebfisch commented 14 years ago

instead of returning [(Index,Int)] the matchings function (as well as the (=~) operator) should return a record of the form

data Matching = Matching { matchingIndex :: Int, matchingLength :: Int }

to make more explicit what the first and second part of the pair mean.

The type synonym for Index (that fails to sufficiently clarify the meaning of the result of matchings) can be deleted after this change.

sebfisch commented 14 years ago

710691a9da73275c0c5b6e3ab8c374b0445a7674