translate datatype definitions

Insert "upcasts" where appropriate such that, given the Scala equivalent
of
  data Nat = Zero | Suc Nat
the term `Zero` typechecks in Isabelle.