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