Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compatibility with template-haskell 2.17 for yesod #1730

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

felixonmars
Copy link
Contributor

@felixonmars felixonmars commented Jun 30, 2021

Fixes the following build failure with template-haskell 2.17:

[6 of 6] Compiling Yesod.Default.Util ( Yesod/Default/Util.hs, dist/build/Yesod/Default/Util.dyn_o )

Yesod/Default/Util.hs:116:17: error:
    • Couldn't match type ‘[Stmt] -> Exp’ with ‘Exp’
      Expected: Q Exp
        Actual: Q ([Stmt] -> Exp)
    • In the expression: return $ DoE $ map NoBindS exps
      In a case alternative: exps -> return $ DoE $ map NoBindS exps
      In a stmt of a 'do' block:
        case catMaybes mexps of
          [] -> error $ concat ["Called ", func, ....]
          exps -> return $ DoE $ map NoBindS exps
    |
116 |         exps -> return $ DoE $ map NoBindS exps
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Yesod/Default/Util.hs:116:32: error:
    • Couldn't match expected type: Maybe ModName
                  with actual type: [Stmt]
    • In the second argument of ‘($)’, namely ‘map NoBindS exps’
      In the second argument of ‘($)’, namely ‘DoE $ map NoBindS exps’
      In the expression: return $ DoE $ map NoBindS exps
    |
116 |         exps -> return $ DoE $ map NoBindS exps
    |                                ^^^^^^^^^^^^^^^^

Before submitting your PR, check that you've:

  • Bumped the version number

After submitting your PR:

  • Update the Changelog.md file with a link to your PR
  • Check that CI passes (or if it fails, for reasons unrelated to your change, like CI timeouts)

Copy link
Member

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@snoyberg snoyberg merged commit bffa6de into yesodweb:master Jun 30, 2021
@felixonmars felixonmars deleted the ghc9 branch June 30, 2021 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants