himura / twitter-types

This library treats the Twitter JSON API in the Haskell way.
24 stars 28 forks source link

Fix build error in Web.Twitter.Types #50

Closed sternenseemann closed 4 years ago

sternenseemann commented 4 years ago

Fixes the following build error:

Web/Twitter/Types.hs:363:27: error:
    • Could not deduce (MonadFail ((->) String))
        arising from a use of ‘fail’
      from the context: Integral a
        bound by the type signature for:
                   parseIntegral :: forall a. Integral a => Text -> Parser a
        at Web/Twitter/Types.hs:362:1-47
    • In the first argument of ‘either’, namely
        ‘(fail $ "couldn't parse stringized int: " ++ show v)’
      In the expression:
        either
          (fail $ "couldn't parse stringized int: " ++ show v) (return . fst)
      In the expression:
        either
          (fail $ "couldn't parse stringized int: " ++ show v) (return . fst)
          $ decimal v
    |
363 | parseIntegral v = either (fail $ "couldn't parse stringized int: " ++ show v) (return . fst) $ decimal v
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

A new release with this fix would be great :)