[Haskell-cafe] Non-deterministic behaviour of aeson's parser

MigMit miguelimo38 at yandex.ru
Sat May 18 19:17:33 CEST 2013


My result: 2000 lines of "Right ()"

ghc-pkg list aeson says "aeson-0.6.1.0"


On May 18, 2013, at 8:25 PM, Roman Cheplyaka <roma at ro-che.info> wrote:

> I am observing a non-deterministic behaviour of aeson's parser.
> 
> I'm writing here in addition to filing a bug report [1] to draw
> attention to this (pretty scary) problem.
> 
> To try to reproduce this problem, do this:
> 
>  git clone https://gist.github.com/5604887.git aeson
>  cd aeson
>  ghc aeson.hs
>  ./aeson | sort | uniq -c
> 
> This is my result:
> 
>    32 Left "key \"module\" not present"
>    55 Left "When parsing the record SymValue of type Main.SymValueInfo the key fixity was not present."
>  1913 Right ()
> 
> Can others reproduce this in their environments?
> 
> Does anyone have ideas about where the bug may lie?
> Many aeson's dependencies do unsafe IO stuff that could lead to
> such consequences.
> 
> Roman
> 
> [1]: https://github.com/bos/aeson/issues/125
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe




More information about the Haskell-Cafe mailing list