from typing import IO


def compile_cmd(file: IO[str], backend: str, cmds: str):
  """Compile agda code in a file.
  """
  cmds_ = cmds.strip().split(',') if cmds else None
  return ('compile', {'backend': backend, 'file': file, 'cmds': cmds_})