anchor.diff:      };
   
       casks = mkOption {
  -      type = with types; listOf str;
  +      type = with types; listOf (coercedTo str (name: { inherit name; }) (submodule caskOptions));
         default = [];
  -      example = [ "hammerspoon" "virtualbox" ];
  -      description = "Homebrew casks to install.";
  +      example = literalExpression ''
  +        # Adapted examples from https://github.com/Homebrew/homebrew-bundle#usage
  +        [
  +          # 'brew install --cask'
  +          "google-chrome"
  +          # 'brew install --cask --appdir=~/my-apps/Applications'
  +          {
  +            name = "firefox";
  +            args = { appdir = "~/my-apps/Applications"; };
  +          }
  +          # always upgrade auto-updated or unversioned cask to latest version even if already installed
  +          {
  +            name = "opera";
  +            greedy = true;
  +          }
  +        ]
  +      '';
  +      description = ''
  +        Homebrew casks to install.
  +
  +        Casks defined as strings, e.g., <literal>"google-chrome"</literal>, are a shorthand for:
  +
  +        <code>{ name = "google-chrome"; }</code>
  +      '';
       };
   
       masApps = mkOption {
  
positive.code:             else ", restart_service: :${config.restart_service}"
            );
        };
    };
  in
  
  
negative.code:       type = types.lines;
        default = "";
        example = ''
          # 'brew cask install' only if '/usr/libexec/java_home --failfast' fails
          cask "java" unless system "/usr/libexec/java_home --failfast"
        '';
        description = "Extra lines to be added verbatim to bottom of the generated Brewfile.";
      };
    };
  
  