2
我試圖運行布賴恩奧沙利文的基於Attoparsec-HTTP解析器(http://www.serpentine.com/blog/2010/03/03/whats-in-a-parser-attoparsec-rewired-2/)的測試,我得到這個錯誤:Attoparsec`many`方法
> runhaskell TestRFC2616.hs
TestRFC2616.hs:13:30:
Not in scope: `many'
Perhaps you meant one of these:
`any' (imported from Prelude),
`B.any' (imported from Data.ByteString.Char8),
many' (imported from Data.Attoparsec)
驚訝,我跑ghci的和得到這個:
> ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m +Data.Attoparsec
Prelude Data.Attoparsec> :t many
<interactive>:1:1:
Not in scope: `many'
Perhaps you meant one of these:
`any' (imported from Prelude),
many' (imported from Data.Attoparsec),
`many1' (imported from Data.Attoparsec)
Prelude Data.Attoparsec>
誰能告訴我發生了什麼事?
'many'',而不是'many''。你可能想要'Control.Applicative'的'many'。 – 2013-09-25 23:21:37