diff --git a/haskell-align-imports.el b/haskell-align-imports.el index 7ae45ed8f..0be331334 100644 --- a/haskell-align-imports.el +++ b/haskell-align-imports.el @@ -222,7 +222,7 @@ "Are we after the imports list?" (save-excursion (goto-char (line-beginning-position)) - (not (not (search-forward-regexp "\\( = \\|\\\\| :: \\)" + (not (not (search-forward-regexp "\\( = \\|\\\\| :: \\| ∷ \\)" (line-end-position) t 1))))) (provide 'haskell-align-imports) diff --git a/haskell-font-lock.el b/haskell-font-lock.el index 340958bcb..97525b10d 100644 --- a/haskell-font-lock.el +++ b/haskell-font-lock.el @@ -274,7 +274,7 @@ Returns keywords suitable for `font-lock-keywords'." (concat "\\S_" ;; (regexp-opt '(".." "::" "=" "\\" "|" "<-" "->" ;; "@" "~" "=>") t) - "\\(->\\|\\.\\.\\|::\\|∷\\|<-\\|=>\\|[=@\\|~]\\)" + "\\(->\\|→\\|\\.\\.\\|::\\|∷\\|<-\\|←\\|=>\\|[=@\\|~]\\)" "\\S_")) ;; Reserved identifiers (reservedid diff --git a/haskell-indent.el b/haskell-indent.el index 34b90dbbe..5954cbc1d 100644 --- a/haskell-indent.el +++ b/haskell-indent.el @@ -396,7 +396,7 @@ Returns the location of the start of the comment, nil otherwise." ((looking-at "\\(\\([[:alpha:]]\\(\\sw\\|'\\)*\\)\\|_\\)[ \t\n]*") 'ident) ((looking-at "\\(|[^|]\\)[ \t\n]*") 'guard) - ((looking-at "\\(=[^>=]\\|::\\|->\\|<-\\)[ \t\n]*") 'rhs) + ((looking-at "\\(=[^>=]\\|::\\|∷\\|→\\|←\\|->\\|<-\\)[ \t\n]*") 'rhs) (t 'other))) (defvar haskell-indent-current-line-first-ident "" diff --git a/haskell-indentation.el b/haskell-indentation.el index 30cd024fe..f6358031a 100644 --- a/haskell-indentation.el +++ b/haskell-indentation.el @@ -1057,7 +1057,7 @@ Preserves indentation and removes extra whitespace" (match-string-no-properties 1)) ((looking-at "[][(){}[,;]") (match-string-no-properties 0)) - ((looking-at "\\(\\\\\\|->\\|<-\\|::\\|=\\||\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)") + ((looking-at "\\(\\\\\\|->\\|→\\|<-\\|←\\|::\\|∷\\|=\\||\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)") (match-string-no-properties 1)) ((looking-at "\\(→\\|←\\|∷\\)\\([^-:!#$%&*+./<=>?@\\\\^|~]\\|$\\)") (let ((tok (match-string-no-properties 1))) diff --git a/haskell-mode.el b/haskell-mode.el index 5a50f3d99..a536e49e5 100644 --- a/haskell-mode.el +++ b/haskell-mode.el @@ -137,6 +137,7 @@ (require 'haskell-string) (with-no-warnings (require 'cl)) + ;; FIXME: code-smell: too many forward decls for haskell-session are required here (defvar haskell-session) (declare-function haskell-process "haskell-process" ()) diff --git a/inf-haskell.el b/inf-haskell.el index 80dd83019..15e523756 100644 --- a/inf-haskell.el +++ b/inf-haskell.el @@ -497,7 +497,7 @@ The returned info is cached for reuse by `haskell-doc-mode'." (if (string-match "\\`\\s_+\\'" expr) (setq expr (concat "(" expr ")"))) (let ((type (inferior-haskell-get-result (concat ":type " expr)))) (if (not (string-match (concat "^\\(" (regexp-quote expr) - "[ \t\n]+::[ \t\n]*\\(.\\|\n\\)*\\)") + "[ \t\n]+\\(::\\|∷\\)[ \t\n]*\\(.\\|\n\\)*\\)") type)) (error "No type info: %s" type) (progn @@ -506,7 +506,7 @@ The returned info is cached for reuse by `haskell-doc-mode'." (when (and (boundp 'haskell-doc-mode) haskell-doc-mode (boundp 'haskell-doc-user-defined-ids) ;; Haskell-doc only works for idents, not arbitrary expr. - (string-match "\\`(?\\(\\s_+\\|\\(\\sw\\|\\s'\\)+\\)?[ \t]*::[ \t]*" + (string-match "\\`(?\\(\\s_+\\|\\(\\sw\\|\\s'\\)+\\)?[ \t]*\\(::\\|∷\\)[ \t]*" type)) (let ((sym (match-string 1 type))) (setq haskell-doc-user-defined-ids