Course/HaskDB — Issue #2: Using newtype instead of data
Author: piyush-kurur
Created: 2012-03-07 06:29:10+00:00
State: open

I noticed that in many places you are using datatypes of the following kind

data Foo = Foo Int

If your datatype has only one type field. It is better to use newtype (as it is more efficient)

newtype Foo = Foo Int

Here as far as implementation is concerned Foo is essentially Int where as data Foo = Foo Int will have an additional thunk.