def render_reexport(m, r):
    """Turns a reeexport into an entry for ghc-pkg's exposed-modules field.

    We also use this format in the haskell_exposed_modules output group.
    Args:
      m: A string module name.
      r: A struct, as in the values of HaskellInfo.exposed_modules.

    Returns:
      A string.
    """
    return "{} from {}:{}".format(
        m,
        r.original_package_key,
        r.original_module,
    )