order

A simple example Haskell application (Pizza store)

I’m currently trying to cram Haskell into my brain, and in an effort to do so, I’ve been writing a fake POS (point of sales) application. It has a command-line UI that prompts the user to add Pizzas and a Customer to an Order.

I need to re-organize the code, but this is what about 50% of the code looks like right now. The other 50% is in a module that defines what a Pizza is, and also defines its helper functions.

Haskell problem: putStr not evaluated in the proper order (lazy)

I just ran into a problem where the putStr function in Haskell was not printed out in the order I wanted it to be. I wanted to prompt a user for input, then read their input, but the putStr output didn’t appear until later, after I hit the Enter key. (putStr is preferred here over putStrLn because it does not add a newline character after the output.)

MySQL drop table and foreign keys tip - the FOREIGN_KEY_CHECKS variable

MySQL “DROP TABLE” FAQ: Help, my MySQL database tables have a lot of foreign keys, and as a result it's a pain to use the MySQL DROP TABLE command in my scripts; they keep failing because of all the foreign keys. Is there something I can do to work around this DROP TABLE foreign keys problem?