Let All Trees Grow

Tree type definitions in Haskell as answers to a homework question of CSC 253/453.  They make a good demonstration how a type system can be used by a programmer to communicate its program design to the compiler, so the compiler can check correctness of the implementation automatically.

It is also a good exercise to try writing the HasMap instance for these definitions.  Can you find which one of them has a “growth” problem and cannot be used in practice?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s