blob: 6ae23c5dc1f7f1a751907743fad18ff8321df3a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
;;; $DOOMDIR/+lang.el -*- lexical-binding: t; -*-
(load! "+eglot")
(load! "+flycheck")
(load! "+format")
;; functions
(defun my/hs-eval ()
(interactive)
(let* ((src (buffer-file-name))
(out (file-name-sans-extension src)))
(when (zerop (call-process-shell-command
(format "runghc %s" src) nil "*runghc-output*"))
(let ((buf (make-comint "hs-run" out)))
(display-buffer buf)))))
(add-hook 'haskell-mode-hook
(lambda ()
(local-set-key (kbd "<f5>") #'my/hs-eval)))
|