GHCi runtime linker found a duplicate definition error

Today I started to play with attoparsec package and tried to write simple parser. I wrote really toy data type like this:

I tried to type:
*SimpleParser> End
in ghci and will get End as I expected. Instead End I got following error:

As we can see in error output GHCi runtime linker found duplicate definition of _hs_bytestring_long_long_uint_hex. Let's see what's wrong bytestring package with:
cabal info bytestring
It will give us output like this:

We can note that there two installed versions of bytestring package. Let's remove old version with:
sudo ghc-pkg unregister --force bytestring-
That's all. After this error with GHCi runtime linker found a duplicate definition error...... will disappear. Hope this blog post will be useful for all who will meet error like this. Happy coding!