{"id":13862772,"url":"https://github.com/mrkkrp/ebal","last_synced_at":"2025-07-14T13:32:20.574Z","repository":{"id":41819477,"uuid":"38976042","full_name":"mrkkrp/ebal","owner":"mrkkrp","description":"*DEPRECATED* Emacs interface to Cabal and Stack","archived":true,"fork":false,"pushed_at":"2018-03-19T14:47:23.000Z","size":106,"stargazers_count":29,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-22T23:32:08.401Z","etag":null,"topics":["cabal","emacs","haskell","stack"],"latest_commit_sha":null,"homepage":"","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrkkrp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-12T20:03:30.000Z","updated_at":"2023-01-28T20:58:10.000Z","dependencies_parsed_at":"2022-09-03T17:00:23.656Z","dependency_job_id":null,"html_url":"https://github.com/mrkkrp/ebal","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/mrkkrp/ebal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Febal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Febal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Febal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Febal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrkkrp","download_url":"https://codeload.github.com/mrkkrp/ebal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrkkrp%2Febal/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265297480,"owners_count":23742586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cabal","emacs","haskell","stack"],"created_at":"2024-08-05T06:01:52.271Z","updated_at":"2025-07-14T13:32:20.264Z","avatar_url":"https://github.com/mrkkrp.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"# Ebal\n\n[![License GPL 3](https://img.shields.io/badge/license-GPL_3-green.svg)](http://www.gnu.org/licenses/gpl-3.0.txt)\n[![MELPA](https://melpa.org/packages/ebal-badge.svg)](https://melpa.org/#/ebal)\n[![Build Status](https://travis-ci.org/mrkkrp/ebal.svg?branch=master)](https://travis-ci.org/mrkkrp/ebal)\n\n*If you're using Stack, please prefer\n[hasky-stack](https://github.com/hasky-mode/hasky-stack) from now on. If\nyou're using Cabal, please prefer\n[hasky-cabal](https://github.com/hasky-mode/hasky-cabal). Ebal has been\ndeprecated in favor of these packages.*\n\nThis is an Emacs interface to Cabal and Stack. Currently, it provides fast\nand easy access to most commands (†—commands available in Stack mode):\n\n* \u003ckbd\u003eM-x ebal-init\u003c/kbd\u003e `cabal init` (useful even in Stack mode)\n* \u003ckbd\u003eM-x ebal-execute\u003c/kbd\u003e—opens a popup menu with the following:\n  * \u003ckbd\u003eb\u003c/kbd\u003e `build` †\n  * \u003ckbd\u003ec\u003c/kbd\u003e `configure`\n  * \u003ckbd\u003ed\u003c/kbd\u003e `sdist` †\n  * \u003ckbd\u003ee\u003c/kbd\u003e `bench` †\n  * \u003ckbd\u003ef\u003c/kbd\u003e `freeze`\n  * \u003ckbd\u003eg\u003c/kbd\u003e `fetch`\n  * \u003ckbd\u003eg\u003c/kbd\u003e `haddock` †\n  * \u003ckbd\u003ei\u003c/kbd\u003e `install` †\n  * \u003ckbd\u003ek\u003c/kbd\u003e `check`\n  * \u003ckbd\u003el\u003c/kbd\u003e `list`\n  * \u003ckbd\u003en\u003c/kbd\u003e `sandbox init`\n  * \u003ckbd\u003eo\u003c/kbd\u003e `info`\n  * \u003ckbd\u003et\u003c/kbd\u003e `test` †\n  * \u003ckbd\u003eu\u003c/kbd\u003e `update` †\n  * \u003ckbd\u003ex\u003c/kbd\u003e `sandbox delete`\n  * \u003ckbd\u003ez\u003c/kbd\u003e `clean` †\n\nNote that `stack init` is called for you automatically in Stack mode when\n`stack.yaml` is missing.\n\n## Installation\n\nIf you would like to install the package manually, download or clone it and\nput on Emacs' `load-path`, then you can require it in your init file like\nthis:\n\n```emacs-lisp\n(require 'ebal)\n```\n\nIt's available via MELPA, so you can just \u003ckbd\u003eM-x package-install RET ebal\nRET\u003c/kbd\u003e.\n\n## Usage\n\nIf you want to use Ebal with Stack, add this to your configuration:\n\n```emacs-lisp\n(setq ebal-operation-mode 'stack)\n```\n\nThe package provides two commands:\n\n* `ebal-init` that acts as a wizard helping create new Cabal project;\n\n* `ebal-execute`—this allows to perform any command while visiting any file\n  or directory in a project.\n\nYou can create key bindings for these commands to simplify interaction. I\nadvise creating of simple key binding at least for `ebal-execute`, since you\nwill call it often.\n\n### `ebal-init`\n\nThe wizard mirrors built-in Cabal command `cabal init`, but thanks to Emacs,\nit provides probably much better experience than the original command line\ntool. It's worth noticing that Ebal doesn't perform generation of `.cabal`\nfile for you, it only gathers arguments for invocation of `cabal init`.\n\n### `ebal-execute`\n\nThe command displays a popup menu that contains name of project and its\nversion. It also displays collection of commands, to invoke any of them, you\nonly need to press a key:\n\n![Ebal Execute](https://raw.githubusercontent.com/mrkkrp/ebal/gh-pages/ebal-execute.png)\n\nSome commands, like `build` can gather additional info to help you to enter\narguments. `build` shows a list of all build targets extracted from your\n`.cabal` file, while `cabal info` will display complete list of installed\npackages to choose from, etc.\n\nThe usage should be pretty straightforward, so let me tell you how to\ncustomize the package.\n\n## Customization\n\nTo customize Ebal, you can either set variables or use the customization\ninterface, which may seem more friendly for some people.\n\nTo use the customization interface type \u003ckbd\u003eM-x customize-group RET ebal\nRET\u003c/kbd\u003e.\n\n----\n\n```\nebal-operation-mode ⇒ cabal\n```\nMode of operation for Ebal package.\n\nThe following values are recognized:\n\n* `cabal`—Ebal works as an interface for Cabal\n* `stack`—Ebal works as an interface for Stack\n\nAll other values of this variable produce the same effect as `cabal`.\n\n----\n\n```\nebal-cabal-executable ⇒ nil\n```\n\nPath to Cabal executable.\n\nIf it's not `nil`, this value is used in invocation of Cabal commands\ninstead of the standard `\"cabal\"` string. Set this variable if your Cabal is\nin a strange place where OS cannot find it.\n\nNote that the path is quoted with `shell-quote-argument` before being used\nto compose command line.\n\n----\n\n```\nebal-stack-executable ⇒ nil\n```\n\nSimilar to `ebal-cabal-executable`, but for Stack.\n\n----\n\n```\nebal-global-option-alist ⇒ nil\n```\n\nAlist that maps names of commands to their default options.\n\nNames of commands are symbols and options are lists of strings.\n\nNote that this is a global collection of options. If you want to specify an\noption to be used only with a specific command and in a specific project,\nsee `ebal-project-option-alist` and corresponding setup instructions.\n\n----\n\n```\nebal-project-option-alist ⇒ nil\n```\n\nAlist that maps names of commands to their default options.\n\nNames of commands are symbols and options are lists of strings.\n\nThis variable represents user's preferences for current project. Value of\nthe variable is read from `\"*.ebal\"` file that may be present in project's\nroot directory (the same directory that contains `\"*.cabal\"` file).\n\nDon't set this variable manually, instead create `\"project-name.ebal\"` file\nand put desired value (a Lisp Object) into it unquoted.\n\n----\n\n```\nebal-sandboxing ⇒ ask\n```\n\nThis determines Ebal's policy towards sandboxing.\n\nThe following values are recognized (Cabal mode only):\n\n* `nil`—don't create sandboxes unless user explicitly runs command to create\n  one.\n\n* `ask`—ask if user wants to create a sandbox (so it's harder to forget to\n  create it), this is often preferable because most Haskell developers want\n  sandboxes everywhere nowadays (default).\n\n* `always`—create sandboxes silently when they are missing and they should\n  be created. With this option every your project is sandboxed without any\n  effort on your side.\n\nAll other values of this variable produce the same effect as `always`.\n\n----\n\n```\nebal-completing-read-function ⇒ ebal-built-in-completing-read\n```\n\nFunction to be called when requesting input from the user.\n\n----\n\n```\nebal-select-command-function ⇒ ebal-command-popup\n```\n\nFunction to call to select Ebal command.\n\nThis is what `ebal-execute` uses. Default is Ebal custom popup buffer, but\nyou can use IDO-powered variant if you like or plain\n`ebal-command-completing-read`.\n\nThe function is called with arguments like those that `completing-read`\ntakes.\n\n----\n\n```\nebal-popup-key-alist ⇒ nil\n```\n\nAlist that maps names of commands to keys used in Ebal popup.\n\nThis is used by `ebal-command-popup`.\n\n----\n\n```\nebal-before-init-hook ⇒ nil\n```\n\nHook to run before execution of `ebal-init` function.\n\n----\n\n```\nebal-after-init-hook ⇒ nil\n```\n\nHook to run after execution of `ebal-init` function.\n\n----\n\n```\nebal-before-command-hook ⇒ nil\n```\n\nHook to run before execution of particular command.\n\nName of the command is available in `ebal--actual-command`.\n\n----\n\n```\nebal-after-command-hook ⇒ nil\n```\n\nHook to run after execution of particular command.\n\nName of the command is available in `ebal--actual-command`.\n\n## Defining your own commands\n\nThis is somewhat advanced topic, but it's possible to define your own\ncommands. Use `ebal--define-command` to define new commands, see its\nassociated documentation in Emacs. Here is an example of calling `yesod\ndevel` with `stack`:\n\n```emacs-lisp\n(require 'ebal)\n\n(ebal--define-command yesod-devel ?y stack\n  (ebal--ensure-stack-init ebal--last-directory)\n  (ebal--perform-command \"exec\" \"--\" \"yesod\" \"devel\"))\n```\n\nThis is admittedly basic example, but it should be of some use. See how\nother commands are defined in source code for inspiration.\n\n## License\n\nCopyright © 2015–2018 Mark Karpov\n\nDistributed under GNU GPL, version 3.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkkrp%2Febal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrkkrp%2Febal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrkkrp%2Febal/lists"}