Menu

#27 DBDirect generates uncompilable code

open
nobody
None
7
2005-02-14
2005-02-14
No

Hi,

Most of the code DBDirect generates works fine.
However, the attached file doesn't build; the error is:

./DBMFGPro/Exr_rate.hs:4:
Multiple declarations of `DBMFGPro.Exr_rate.exr_rate'
./DBMFGPro/Exr_rate.hs:28
./DBMFGPro/Exr_rate.hs:102

And indeed, it looks like ghc has a valid complaint here.

Discussion

  • John Goerzen

    John Goerzen - 2005-02-14

    Erroneous code

     
  • Bjorn Bringert

    Bjorn Bringert - 2005-02-14

    Logged In: YES
    user_id=123762

    The problem seems to be that when you have a field with the
    same name as the name of the table it is in, DBDirect
    generates colliding identifiers for them. It should be
    simple fix to the functions at the end of
    src/Database/HaskellDB/DBSpec/DBInfo.hs

    The functions for making names unique seem to be somewhat
    overcomplicated, anyone care to fix them?

     
  • Bjorn Bringert

    Bjorn Bringert - 2005-02-14
    • priority: 5 --> 7
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.