File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 2727; ;; Code:
2828
2929(require 'cl-lib )
30- (require 'haskell-mode )
30+ (require 'haskell-compat )
3131(require 'font-lock )
3232
3333(defcustom haskell-font-lock-symbols nil
Original file line number Diff line number Diff line change 140140(require 'haskell-sort-imports )
141141(require 'haskell-string )
142142(require 'haskell-indentation )
143+ (require 'haskell-font-lock )
143144
144145; ; All functions/variables start with `(literate-)haskell-'.
145146
Original file line number Diff line number Diff line change 77 (insert line)
88 (insert " \n " )))
99
10+ ; ; Emacs 24.3 has sql-mode that runs without a product and therefore
11+ ; ; without font lock initially and needs to be extra enabled
12+ (add-hook 'sql-mode-hook (lambda () (sql-set-product 'ansi )))
1013
1114(defun check-syntax-and-face-match-range (beg end syntax face )
1215 " Check if all charaters between positions BEG and END have
@@ -424,6 +427,26 @@ if all of its characters have syntax and face. See
424427 (" Cons_p" t haskell-constructor-face)
425428 (" Cons_x" t haskell-quasi-quote-face))))
426429
430+ (ert-deftest haskell-syntactic-test-quasiquoter-sql-1 ()
431+ " Embedded SQL statements"
432+ (check-properties
433+ '(" sql = [sql| SELECT title FROM books; |]" )
434+ '((" SELECT" t font-lock-keyword-face )
435+ (" title" t nil )
436+ (" FROM" t font-lock-keyword-face )
437+ (" books" t nil ))))
438+
439+ (ert-deftest haskell-syntactic-test-quasiquoter-sql-2 ()
440+ " Embedded SQL statements"
441+ :expected-result :failed
442+ ; ; for now we have this problem that connstructor faces are used,
443+ ; ; org-mode knows how to get around this problem
444+ (check-properties
445+ '(" sql = [sql| SELECT Title FROM Books; |]" )
446+ '((" Title" t nil )
447+ (" Books" t nil ))))
448+
449+
427450(ert-deftest haskell-syntactic-test-special-not-redefined ()
428451 " QuasiQuote should not conflict with TemplateHaskell"
429452 (check-properties
You can’t perform that action at this time.
0 commit comments