A Haskell library for semirings