about summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-31T13·18+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-31T13·23+0100
commit13a81435c3e14f41f0e2a9586cd5a15e21c8fbba (patch)
tree526a6cb168f8ba7b98cf99271893d2177e00b408 /emacs
parentd3d94cbbac580907196907f85d14982c93966346 (diff)
Lint wpc-haskell.el
- add Version, URL, Package-Requires sections
- change haskell.el to wpc-haskell.el
- prefer `wpc-haskell-` prefix to `haskell/`
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/wpc/wpc-haskell.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-haskell.el b/emacs/.emacs.d/wpc/wpc-haskell.el
index f04562464584..00c22ca7364a 100644
--- a/emacs/.emacs.d/wpc/wpc-haskell.el
+++ b/emacs/.emacs.d/wpc/wpc-haskell.el
@@ -1,13 +1,15 @@
-;;; haskell.el --- My Haskell preferences -*- lexical-binding: t -*-
+;;; wpc-haskell.el --- My Haskell preferences -*- lexical-binding: t -*-
+
 ;; Author: William Carroll <wpcarro@gmail.com>
+;; Version: 0.0.1
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
+;; Package-Requires: ((emacs "24"))
 
 ;;; Commentary:
 ;; Hosts my Haskell development preferences
 
 ;;; Code:
 
-;; Haskell support
-
 ;; font-locking, glyph support, etc
 (use-package haskell-mode
   :config
@@ -22,7 +24,7 @@
   (add-hook 'haskell-mode-hook #'flycheck-mode))
 
 ;; Test toggling
-(defun haskell/module->test ()
+(defun wpc-haskell-module->test ()
   "Jump from a module to a test."
   (let ((filename (->> buffer-file-name
                        (s-replace "/src/" "/test/")
@@ -31,21 +33,20 @@
     (make-directory (f-dirname filename) t)
     (find-file filename)))
 
-(defun haskell/test->module ()
+(defun wpc-haskell-test->module ()
   "Jump from a test to a module."
   (let ((filename (->> buffer-file-name
                        (s-replace "/test/" "/src/")
-                       (s-replace "Test.hs" ".hs")
-                       )))
+                       (s-replace "Test.hs" ".hs"))))
     (make-directory (f-dirname filename) t)
     (find-file filename)))
 
-(defun haskell/test<->module ()
+(defun wpc-haskell-test<->module ()
   "Toggle between test and module in Haskell."
   (interactive)
   (if (s-contains? "/src/" buffer-file-name)
-      (haskell/module->test)
-    (haskell/test->module)))
+      (wpc-haskell-module->test)
+    (wpc-haskell-test->module)))
 
 (provide 'wpc-haskell)
 ;;; wpc-haskell.el ends here