Type equality constraints

Contents
  • Constructors with constraints
  • Constrain now, use later
  • Same args, different constraints
  • Type equality constraints
  • Type simplification
  • Constructors with equality constraints

This lesson explains:

  • What it means for data constructors to have constraints;
  • A special constraint called type equality, written as (~);
  • Why placing a type equality constraint on a constructor has interesting ramifications.

Sign up for access to the full page, plus the complete archive and all the latest content.