Tried to start with defining my 'Post' data type, and then use a
type class 'DBField' with instances for 'Int', 'String' etc that
would generate corresponding SQL definition. Of course this won't
work because 'Post' is a data type, and type class methods work only
on instances of data type (i.e. data types are not first class
values, unlike in Python, so I can't do something like the way
Django does it). An alternative is to have a script that parses the
models.hs file and generates SQL based on its content.
Changed tack. I'm going to start with the database libraries, and
work from the kind of input they want, as that is likely to be a
constraint. I'm starting with HaskellDB and HSQL
Needed to install libmysqlclient-dev to build HSQL-MySQL
End of session -- got HaskellDB, HSQL-MySQL installed etc, but
didn't manage to get the HaskellDB tests working -- won't load my
drivers for some reason.