brendanhay / gogol

A comprehensive Google Services SDK for Haskell.
Other
281 stars 105 forks source link

GHC 9.6 compatability #190

Closed m4dc4p closed 1 year ago

m4dc4p commented 1 year ago

GHC 9.6 does not include some instances expected by gogol. Current code fails to compile with the following error (when compiling the gogol library):

src/Gogol/Auth/ApplicationDefault.hs:172:12: error: [GHC-39999]
    • No instance for ‘Alternative (Either String)’
        arising from a use of ‘<|>’
    • In the expression: x <|> y
      In a case alternative: _ -> x <|> y
      In a stmt of a 'do' block:
        case (x, y) of
          (Left xe, Left ye)
            -> Left
                 $ "Failed parsing service_account: "
                     ++ xe ++ ", Failed parsing authorized_user: " ++ ye
          _ -> x <|> y
    |
172 |     _ -> x <|> y
    |            ^^^

This PR fixes the problem.