record Point
  x Int
  y Int

-- this generates:
-- in Haskell:
--   data Point = Point { PointX :: Int, PointY :: Int }
-- in OCaml:
--   type point = { x: int, y: int };;
-- in Rust:
--   struct Point { x: isize, y: isize }
-- in JSON:
--   { "x": ..., "y": ... }
-- in SQL:
--   CREATE ROW Point ( id INTEGER NOT NULL, x INTEGER, y INTEGER)

enum Job
  boss(Department)
  grunt

-- this generates:
-- in Haskell:
--   data Job = JobBoss Department | JobGrunt
-- in OCaml:
--   data job = JobBoss of Department | JobGrunt;;
-- in Rust:
--   enum Job { Boss(Box<Department>), Grunt }
-- in JSON: ???
--   { "boss": [ ... ] }
--   or
--   { "grunt": null }
-- in SQL: ???

enum List(a)
  cons(a, List(a))
  nil

-- this generates:
-- in Haskell:
--   data List a = ListCons a | ListNil
-- in OCaml:
--   data 'a list = ListCons of ('a * 'a list) | ListNil;;
-- in Rust:
--   enum List<a> { Cons(a, Box<List<a>>), Nil }
-- in JSON:
--   { "cons": 
