Lint wpc-haskell.el
- add Version, URL, Package-Requires sections - change haskell.el to wpc-haskell.el - prefer `wpc-haskell-` prefix to `haskell/`
This commit is contained in:
		
							parent
							
								
									d3d94cbbac
								
							
						
					
					
						commit
						13a81435c3
					
				
					 1 changed files with 11 additions and 10 deletions
				
			
		|  | @ -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> | ;; Author: William Carroll <wpcarro@gmail.com> | ||||||
|  | ;; Version: 0.0.1 | ||||||
|  | ;; URL: https://git.wpcarro.dev/wpcarro/briefcase | ||||||
|  | ;; Package-Requires: ((emacs "24")) | ||||||
| 
 | 
 | ||||||
| ;;; Commentary: | ;;; Commentary: | ||||||
| ;; Hosts my Haskell development preferences | ;; Hosts my Haskell development preferences | ||||||
| 
 | 
 | ||||||
| ;;; Code: | ;;; Code: | ||||||
| 
 | 
 | ||||||
| ;; Haskell support |  | ||||||
| 
 |  | ||||||
| ;; font-locking, glyph support, etc | ;; font-locking, glyph support, etc | ||||||
| (use-package haskell-mode | (use-package haskell-mode | ||||||
|   :config |   :config | ||||||
|  | @ -22,7 +24,7 @@ | ||||||
|   (add-hook 'haskell-mode-hook #'flycheck-mode)) |   (add-hook 'haskell-mode-hook #'flycheck-mode)) | ||||||
| 
 | 
 | ||||||
| ;; Test toggling | ;; Test toggling | ||||||
| (defun haskell/module->test () | (defun wpc-haskell-module->test () | ||||||
|   "Jump from a module to a test." |   "Jump from a module to a test." | ||||||
|   (let ((filename (->> buffer-file-name |   (let ((filename (->> buffer-file-name | ||||||
|                        (s-replace "/src/" "/test/") |                        (s-replace "/src/" "/test/") | ||||||
|  | @ -31,21 +33,20 @@ | ||||||
|     (make-directory (f-dirname filename) t) |     (make-directory (f-dirname filename) t) | ||||||
|     (find-file filename))) |     (find-file filename))) | ||||||
| 
 | 
 | ||||||
| (defun haskell/test->module () | (defun wpc-haskell-test->module () | ||||||
|   "Jump from a test to a module." |   "Jump from a test to a module." | ||||||
|   (let ((filename (->> buffer-file-name |   (let ((filename (->> buffer-file-name | ||||||
|                        (s-replace "/test/" "/src/") |                        (s-replace "/test/" "/src/") | ||||||
|                        (s-replace "Test.hs" ".hs") |                        (s-replace "Test.hs" ".hs")))) | ||||||
|                        ))) |  | ||||||
|     (make-directory (f-dirname filename) t) |     (make-directory (f-dirname filename) t) | ||||||
|     (find-file filename))) |     (find-file filename))) | ||||||
| 
 | 
 | ||||||
| (defun haskell/test<->module () | (defun wpc-haskell-test<->module () | ||||||
|   "Toggle between test and module in Haskell." |   "Toggle between test and module in Haskell." | ||||||
|   (interactive) |   (interactive) | ||||||
|   (if (s-contains? "/src/" buffer-file-name) |   (if (s-contains? "/src/" buffer-file-name) | ||||||
|       (haskell/module->test) |       (wpc-haskell-module->test) | ||||||
|     (haskell/test->module))) |     (wpc-haskell-test->module))) | ||||||
| 
 | 
 | ||||||
| (provide 'wpc-haskell) | (provide 'wpc-haskell) | ||||||
| ;;; wpc-haskell.el ends here | ;;; wpc-haskell.el ends here | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue