Closed piyush-kurur closed 12 years ago
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.
I noticed that in many places you are using datatypes of the following kind
If your datatype has only one type field. It is better to use newtype (as it is more efficient)
Here as far as implementation is concerned Foo is essentially Int where as data Foo = Foo Int will have an additional thunk.