Better If Expressions

Better If Expressions

Earlier in the chapter you implemented conditionals inside of type families using IfThenElse. Instead of making this a single type family, try to use a mixture of GADTs and Type Families to explore other ways to encode conditionals that give you more flexibility, or more closely resemble term level conditionals.

Hint 1

Some high level hint text

Hint 2

Some more detailed hint text

Hint 3

Even more detailed hint text


A complete solution for the exercise