Mode-locking in a laser with a coherent absorber