Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A tool to automatically generate `.ghci` and `.stylish-haskell.yaml` file from `cabal` file.
Haskell
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.ghci
.gitignore
.stylish-haskell.yaml
LICENSE
README.md
Setup.hs
cabal2ghci.cabal
cabal2ghci.hs

README.md

cabal2ghci

This is the tool to automatically generate .ghci file and .stylish-haskell.yaml file from .cabal. It processes following things:

  • Language Pragmas
  • hs-src-dirs

Installation

$ cabal install cabal2ghci

Usage

$ cabal2ghci
$ cabal2ghci -c foo.cabal
$ cabal2ghci --nostylish

Integration with haskell-mode

(add-hook 'haskell-mode-hook 'cabal2ghci-haskell-hook)
(defun my-before-save-hook ()
  (ignore-errors (call-process "cabal2ghci")))

(defun cabal2ghci-haskell-hook ()
  (add-hook 'before-save-hook 'my-before-save-hook)
Something went wrong with that request. Please try again.