:module +Text.Regex.Posix

環境
問題

Real World Haskell の P.202 に

ghci> :module +Text.Regex.Posix

と書いてあるが、実行してみると

Prelude> :module +Text.Regex.Posix.String
Could not find module `Text.Regex.Posix.String':
  Use -v to see a list of the files searched for.

という具合に、エラーになる。

解決方法

libghc6-regex-posix-dev パッケージをインストールする。
インストール後、再度実行してみたところ、うまくいった。

Prelude>  :module +Text.Regex.Posix
Prelude Text.Regex.Posix>