[Haskell-beginners] Attoparsec parser question

Francesco Ariis fa-ml at ariis.it
Wed May 24 16:20:23 UTC 2017


On Wed, May 24, 2017 at 12:18:21PM +0000, PICCA Frederic-Emmanuel wrote:
> Hello

Hello Frederic,

    maybe next time attach a simple .hs file which replicates the issue
(with import modules, etc.), this way it is simpler to diagnose.

Just by scanning the code, this raises a red flag:

> detectorP ∷ ToPyFAI a ⇒ a → Parser a
> detectorP a = do
>   _ ← "Detector: " *> string (toPyFAI a) <* endOfLine
>   pure a

"Detector: " is a plain String, so i guess putting a `string` before it
(or whatever is needed) should solve the issue.

Does that solve the problem?
-F


More information about the Beginners mailing list