code: def _parse_pkg_string(pkg):
      '''
      Parse pkg string and return a tuple of package name, separator, and
      package version.
  
      Cabal support install package with following format:
  
      * foo-1.0
      * foo < 1.2
      * foo > 1.3
  
      For the sake of simplicity only the first form is supported,
      support for other forms can be added later.
      '''
      pkg_name, separator, pkg_ver = pkg.partition('-')
      return (pkg_name.strip(), separator, pkg_ver.strip()f _parse_pkg_string(pkg):
      '''
      Parse pkg string and return a tuple of package name, separator, and
      package version.
  
      Cabal support install package with following format:
  
      * foo-1.0
      * foo < 1.2
      * foo > 1.3
  
      For the sake of simplicity only the first form is supported,
      support for other forms can be added later.
      '''
      pkg_name, separator, pkg_ver = pkg.partition('-')
      return (pkg_name.strip(), separator, pkg_ver.strip())
docs: Parse pkg string and return a tuple of package name, separator, and
      package version.
  
      Cabal support install package with following format:
  
      * foo-1.0
      * foo < 1.2
      * foo > 1.3
  
      For the sake of simplicity only the first form is supported,
      support for other forms can be added later.