Search code examples
mysqlhaskell

MySQL with Haskell


I'm C# developer and I'm learning Haskell right now. I want to rewrite one of my projects in Haskell just for fun. In this project I have some work to do with MySQL so I want to ask: what is the best tool to use MySQL in Haskell. Also it will be awesome to look at some code how can I use it (I have Windows 7).


Solution

  • There are plenty of different bindings and libraries for interaction with databases in Haskell, most of them are described on the Haskell wiki.

    If you're looking for a relatively simple binding to MySQL, then I'd recommend you have a look at either of the following:

    There's a good chapter on how to use the HDBC interface in the Using Databases chapter of the Real World Haskell book, which should be enough to get you started: there are plenty of examples of code there.