Regex & String Libraries in Haskell

后端 未结 4 820
你的背包
你的背包 2021-02-10 10:32

I\'m trying to introduce Haskell into my daily life by using it to write incidental scripts and such.

readProcess is handy for getting the results of exterior commands,

4条回答
  •  名媛妹妹
    2021-02-10 11:13

    When I was first teaching myself Haskell I found that learning to use a parser combinator library for string processing was a fantastic investment. They can do everything regular expressions can do, and much more, and writing combinator parsers is a great way to build up intuitions about type classes like monads, applicative functors, etc.

    I tend to use Attoparsec these days, but Parsec is probably a better starting point because it's more widely documented and discussed, provides nicer error messages, etc.

提交回复
热议问题