Prohibiting invalid states with GADT - the airlock exercise

Nice, but now I have questions (:

  • Why is the Sage.Refl thing needed? (I mean - why runtime check - would be nice with static check)
  • Does one use Sage.both to open several files? - how does that code look?
  • And why use object types - do you use the row polymorphism? EDIT: Ah - instead of two type parameters for respectively read and write, you have two fields in the object type, rd and wr