Skip to content

Instantly share code, notes, and snippets.

@codygman
Last active May 13, 2021 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codygman/76c2e67d4a55559517e190e6e428f24b to your computer and use it in GitHub Desktop.
Save codygman/76c2e67d4a55559517e190e6e428f24b to your computer and use it in GitHub Desktop.
haskell-mode nix emacs issue

haskell-mode-minimal.el:

(require 'use-package)
(setq eval-expression-print-length 100)
(use-package haskell-interactive-mode)
(use-package haskell-mode
  :mode "\\.hs\\'"
  :hook
  (haskell-mode . interactive-haskell-mode)
  )

create empty file foo.hs.

run emacs with:

nix-shell --pure -I https://github.com/NixOS/nixpkgs/archive/3eac120c3d228289f218c2db971849c39202e7f4.tar.gz -p emacs emacsPackages.use-package emacsPackages.haskell-mode --run "emacs -Q --batch --load haskell-mode-minimal.el foo.hs"

error:

mode)
$ nix-shell --pure -I https://github.com/NixOS/nixpkgs/archive/3eac120c3d228289f218c2db971849c39202e7f4.tar.gz -p emacs emacsPackages.use-package emacsPackages.haskell-mode --run "emacs -Q --batch --load haskell-mode-minimal.el foo.hs"
File mode specification error: (error Autoloading file /nix/store/a989v8w40fbpf4zdg3mjk4ip74piark0-emacs-haskell-mode-20210407.214/share/emacs/site-lisp/elpa/haskell-mode-20210407.214/haskell-mode.elc failed to define function interactive-haskell-mode)
$ fd interactive /nix/store/a989v8w40fbpf4zdg3mjk4ip74piark0-emacs-haskell-mode-20210407.214
/nix/store/a989v8w40fbpf4zdg3mjk4ip74piark0-emacs-haskell-mode-20210407.214/share/emacs/site-lisp/elpa/haskell-mode-20210407.214/haskell-interactive-mode.el
/nix/store/a989v8w40fbpf4zdg3mjk4ip74piark0-emacs-haskell-mode-20210407.214/share/emacs/site-lisp/elpa/haskell-mode-20210407.214/haskell-interactive-mode.elc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment