Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Patch courtesy of Alex Ott

Ignore-this: e52b612e4c50a13aaff2216e261c0431
 - code for haskell-font-lock.el - adds more unicode symbols
 - code for inf-haskell.el fixes regex for inferior-haskell-type, so it
   will parse type declarations properly
 - code for haskell-mode.el adds ability to search function signatures at
   hayoo

darcs-hash:20091101163319-f57bf-3e1aceaa43782816017587c7b87a3edcc58d8669.gz
  • Loading branch information...
commit f846b9434c68f12b5589a24e79af5babed901678 1 parent 5d9d32b
@Baughn Baughn authored
Showing with 26 additions and 3 deletions.
  1. +9 −0 haskell-font-lock.el
  2. +13 −0 haskell-mode.el
  3. +4 −3 inf-haskell.el
View
9 haskell-font-lock.el
@@ -142,6 +142,15 @@ and `unicode'."
(cons "->" (decode-char 'ucs 8594))
(cons "<-" (decode-char 'ucs 8592))
(cons "=>" (decode-char 'ucs 8658))
+ (cons "()" (decode-char 'ucs #X2205))
+ (cons "==" (decode-char 'ucs #X2261))
+ (cons "/=" (decode-char 'ucs #X2262))
+ (cons ">=" (decode-char 'ucs #X2265))
+ (cons "<=" (decode-char 'ucs #X2264))
+ (cons "!!" (decode-char 'ucs #X203C))
+ (cons "&&" (decode-char 'ucs #X2227))
+ (cons "||" (decode-char 'ucs #X2228))
+ (cons "sqrt" (decode-char 'ucs #X221A))
(cons "~>" (decode-char 'ucs 8669)) ;; Omega language
;; (cons "~>" (decode-char 'ucs 8605)) ;; less desirable
(cons "-<" (decode-char 'ucs 8610)) ;; Paterson's arrow syntax
View
13 haskell-mode.el
@@ -500,6 +500,19 @@ If nil, use the Hoogle web-site."
(start-process "hoogle" (current-buffer) haskell-hoogle-command
query)))))
+;;;###autoload
+(defun haskell-hayoo (query)
+ "Do a Hayoo search for QUERY."
+ (interactive
+ (let ((def (haskell-ident-at-point)))
+ (if (and def (symbolp def)) (setq def (symbol-name def)))
+ (list (read-string (if def
+ (format "Hayoo query (default %s): " def)
+ "Hayoo query: ")
+ nil nil def))))
+ (browse-url (format "http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=%s" query)))
+
+
;; Provide ourselves:
(provide 'haskell-mode)
View
7 inf-haskell.el
@@ -422,10 +422,11 @@ The returned info is cached for reuse by `haskell-doc-mode'."
(save-excursion (goto-char parsing-end)
(line-beginning-position 2))
(point))))))
- (if (not (string-match (concat "\\`" (regexp-quote expr) "[ \t]+::[ \t]*")
+ (if (not (string-match (concat "^\\(" (regexp-quote expr) "[ \t\n]+::[ \t\n]*\\(.\\|\n\\)*\\)")
type))
(error "No type info: %s" type)
-
+ (progn
+ (setf type (match-string 1 type))
;; Cache for reuse by haskell-doc.
(when (and (boundp 'haskell-doc-mode) haskell-doc-mode
(boundp 'haskell-doc-user-defined-ids)
@@ -442,7 +443,7 @@ The returned info is cached for reuse by `haskell-doc-mode'."
(when insert-value
(beginning-of-line)
(insert type "\n"))
- type)))
+ type))))
;;;###autoload
(defun inferior-haskell-info (sym)
Please sign in to comment.
Something went wrong with that request. Please try again.