Package: haskell-mode Version: 2.1-1 Followup-For: Bug #410337 tags 410337 + patch thanks
The attached patch adds support for mdo to haskell-mode. - Josh Triplett -- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.20-rc6 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages haskell-mode depends on: ii emacs [emacsen] 21.4a+1-3 The GNU Emacs editor (metapackage) ii emacs-snapshot-gtk [emacsen 1:20070128-1 The GNU Emacs editor (with GTK+ 2. ii emacs21 [emacsen] 21.4a+1-3 The GNU Emacs editor haskell-mode recommends no packages. -- no debconf information
diff -Naur haskell-mode-2.1.orig/haskell-doc.el haskell-mode-2.1/haskell-doc.el --- haskell-mode-2.1.orig/haskell-doc.el 2007-02-09 13:33:03.000000000 -0800 +++ haskell-mode-2.1/haskell-doc.el 2007-02-09 13:32:08.000000000 -0800 @@ -480,6 +480,7 @@ '("infixr" . "infixr [digit] ops") '("instance" . "instance [context =>] qtycls inst [where { valdefs [;] }]") '("let" . "let { decl; ...; decl [;] } in exp") + '("mdo" . "mdo { stmts [;] } stmts -> exp [; stmts] | pat <- exp ; stmts | let decllist ; stmts") '("module" . "module modid [exports] where body") '("newtype" . "newtype [context =>] simpletype = con atype [deriving]") '("of" . "case exp of { alts [;] }") diff -Naur haskell-mode-2.1.orig/haskell-font-lock.el haskell-mode-2.1/haskell-font-lock.el --- haskell-mode-2.1.orig/haskell-font-lock.el 2005-11-06 17:38:48.000000000 -0800 +++ haskell-mode-2.1/haskell-font-lock.el 2007-02-09 13:29:55.000000000 -0800 @@ -268,9 +268,9 @@ ;; (regexp-opt ;; '("as" "case" "class" "data" "default" "deriving" "do" ;; "else" "hiding" "if" "import" "in" "infix" "infixl" - ;; "infixr" "instance" "let" "module" "newtype" "of" - ;; "qualified" "then" "type" "where" "_") t) - "\\(_\\|as\\|c\\(ase\\|lass\\)\\|d\\(ata\\|e\\(fault\\|riving\\)\\|o\\)\\|else\\|hiding\\|i\\(mport\\|n\\(fix[lr]?\\|stance\\)\\|[fn]\\)\\|let\\|module\\|newtype\\|of\\|qualified\\|t\\(hen\\|ype\\)\\|where\\)" + ;; "infixr" "instance" "let" "mdo" "module" "newtype" + ;; "of" "qualified" "then" "type" "where" "_") t) + "\\(_\\|as\\|c\\(ase\\|lass\\)\\|d\\(ata\\|e\\(fault\\|riving\\)\\|o\\)\\|else\\|hiding\\|i\\(mport\\|n\\(fix[lr]?\\|stance\\)\\|[fn]\\)\\|let\\|m\\(odule\\|do\\)\\|newtype\\|of\\|qualified\\|t\\(hen\\|ype\\)\\|where\\)" "\\b")) ;; This unreadable regexp matches strings and character diff -Naur haskell-mode-2.1.orig/haskell-indent.el haskell-mode-2.1/haskell-indent.el --- haskell-mode-2.1.orig/haskell-indent.el 2005-11-07 12:04:15.000000000 -0800 +++ haskell-mode-2.1/haskell-indent.el 2007-02-09 13:25:24.000000000 -0800 @@ -374,7 +374,7 @@ (nth 8 pps))))) (defvar haskell-indent-off-side-keywords-re - "\\<\\(do\\|let\\|of\\|where\\)\\>[ \t]*") + "\\<\\(do\\|let\\|mdo\\|of\\|where\\)\\>[ \t]*") (defun haskell-indent-type-at-point () "Return the type of the line (also puts information in `match-data')." @@ -1002,6 +1002,7 @@ '(("where" 2 0) ("of" 2) ("do" 2) + ("mdo" 2) ("in" 2 0) "if" "then"