Description
Hello! I have started looking at Beam, thanks for your great contribution to the Haskell world!
I wanted to see what haskellSchema produced. I downloaded the latest master and built it with stack. In ghci, I made a connection to my Postgres test database, then I ran:
λ> runBeamPostgres conn (haskellSchema migrationBackend)
Among other things, it generates the following import statement:
import Database.Beam.Migrate
(BeamMigrateSqlBackend, CheckedDatabaseSettings, Migration,
boolean, createTable, field, int, notNull, runMigrationSilenced,
unCheckDatabase, varchar)
The problem is if we try to run the file containing this import statement, ghc will not find the boolean, int, and varchar types:
error:
Module ‘Database.Beam.Migrate’ does not export ‘boolean’
13 | boolean, createTable, field, int, notNull, runMigrationSilenced,
| ^^^^^^^
error:
Module ‘Database.Beam.Migrate’ does not export ‘int’
13 | boolean, createTable, field, int, notNull, runMigrationSilenced,
| ^^^
error:
Module ‘Database.Beam.Migrate’ does not export ‘varchar’
14 | unCheckDatabase, varchar)
| ^^^^^^^
Apparently, these types are now in the module Database.Beam.Query.DataTypes.
I can always edit the import statement of the generated file, so that it works, so this is not blocking me, but I thought it might help others too if these were fixed. I tried to look in the code myself to see if I could fix it, but it is beyond my Haskell level at the moment :(