[Haskell-beginners] Attoparsec parser and maybe type
PICCA Frederic-Emmanuel
frederic-emmanuel.picca at synchrotron-soleil.fr
Wed Aug 29 13:16:16 UTC 2018
powderWilsonP :: Parser (Maybe PowderWilson)
powderWilsonP = powderWilsonP1 <|> powderWilsonP2
where
powderWilsonP1 :: Parser (Maybe PowderWilson)
powderWilsonP1 = Just <$> ( PowderWilson
<$> doubleP
<*> doubleP
<*> doubleP
<*> doubleP
<*> doubleP
)
powderWilsonP2 :: Parser (Maybe PowderWilson)
powderWilsonP2 = do
skipSpace
_ <- string "---------no results -----------"
pure Nothing
I will test it :))
thanks
More information about the Beginners
mailing list