2012-04-28
parsecが見つからなかったののメモ
勉強のためCSVパーサーを写経してたらこんなエラーが出てきた。
csv_parser.hs:33:8:
Could not find module `Text.ParserCombinators.Parsec'
Perhaps you meant
Text.ParserCombinators.ReadPrec (from base)
Text.ParserCombinators.ReadP (from base)
Use -v to see a list of the files searched for.
どうもParsecモジュールがないらしい。cabalでインストールしてなかったのか...。
pacmanの中をサーチしてみる。
pacman -Ss haskell | parsec -> Monadic parser combinators
なんかあったので
pacman -Ss parsec
目を凝らすとhaskell-parsecなるものがあったので
pacman -S haskell-parsec
でインストールした。これでghciでエラーが出ずにcsv-parserプログラムを実行できた。
parseTest file "foo,bar,baz\r\n"
実行例でこれをすると他のライブラリを順次ロードしていってparseTestをすることができた。便利なインタプリタだなと思う。
参考リンク
@see Issue 819: Could not find module `Text.ParserCombinators.Parsec’ - Darcs bug tracker
csv-parser写経先:
@see http://d.hatena.ne.jp/kazu-yamamoto/20100104/1262597082


