Cabalized version of the ATermLib library from Strafunski