Start to translate http://bluishcoder.co.nz/2011/02/27/linear-datatypes-in-ats.html