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

Compiling with beam-0.7.2.2 fails #5

Open
tshinohara opened this issue Aug 29, 2018 · 2 comments
Open

Compiling with beam-0.7.2.2 fails #5

tshinohara opened this issue Aug 29, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@tshinohara
Copy link

Looks like some API changes causeing compile error.

    Configuring beam-mysql-0.1.0.0...
    Preprocessing library for beam-mysql-0.1.0.0..
    Building library for beam-mysql-0.1.0.0..
    [2 of 4] Compiling Database.Beam.MySQL.Syntax ( Database/Beam/MySQL/Syntax.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-2.2.0.1/build/Database/Beam/MySQL/Syntax.o )

    .stack-work/downloaded/j6hLIMXda_k-/beam-mysql-1c267d7b612ceb5cf2305a5050e0f2a68b3f281b/Database/Beam/MySQL/Syntax.hs:149:7: error:
        • Couldn't match expected type ‘Maybe
                                          (Sql92DeleteExpressionSyntax MysqlDeleteSyntax)
                                        -> MysqlDeleteSyntax’
                      with actual type ‘MysqlDeleteSyntax’
        • In the expression:
            MysqlDeleteSyntax
              $ emit "DELETE FROM "
                  <>
                    mysqlIdentifier tbl
                      <>
                        maybe
                          mempty
                          (\ where' -> emit " WHERE " <> fromMysqlExpression where')
                          where_
          In an equation for ‘deleteStmt’:
              deleteStmt tbl where_
                = MysqlDeleteSyntax
                    $ emit "DELETE FROM "
                        <>
                          mysqlIdentifier tbl
                            <>
                              maybe
                                mempty
                                (\ where' -> emit " WHERE " <> fromMysqlExpression where')
                                where_
          In the instance declaration for
            ‘IsSql92DeleteSyntax MysqlDeleteSyntax’
        |
    149 |       MysqlDeleteSyntax $
        |       ^^^^^^^^^^^^^^^^^^^...

    .stack-work/downloaded/j6hLIMXda_k-/beam-mysql-1c267d7b612ceb5cf2305a5050e0f2a68b3f281b/Database/Beam/MySQL/Syntax.hs:151:78: error:
        • Couldn't match type ‘Text’ with ‘MysqlExpressionSyntax’
          Expected type: Maybe MysqlExpressionSyntax
            Actual type: Maybe Text
        • In the third argument of ‘maybe’, namely ‘where_’
          In the second argument of ‘(<>)’, namely
            ‘maybe
               mempty
               (\ where' -> emit " WHERE " <> fromMysqlExpression where')
               where_’
          In the second argument of ‘(<>)’, namely
            ‘mysqlIdentifier tbl
               <>
                 maybe
                   mempty
                   (\ where' -> emit " WHERE " <> fromMysqlExpression where')
                   where_’
        |
    151 |       maybe mempty (\where' -> emit " WHERE " <> fromMysqlExpression where') where_
        |                                                                              ^^^^^^
@tathougies tathougies added the bug Something isn't working label Sep 7, 2018
@tathougies
Copy link
Owner

Good call... Will fix

@joshvera
Copy link
Contributor

joshvera commented Jan 8, 2019

I believe this was fixed in #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants