Home > documentation, Emacs, Haskell, Linux > Haskell mode spews junk on first load

Haskell mode spews junk on first load

I’m using Haskell mode version 2.8.0 with Emacs 23.1.1 under Ubuntu 10.04.1 LTS. After loading a Haskell file, I would get the following garbage:

#[nil "\300C\207"
      [t]
      2]

Here’s what it looks like:

Acting on a tip from the ArchLinux community, I grep’d through all the Emacs Lisp files in the source distribution of Haskell mode 2.8.0 and found that the garbage in question is output by the following function in haskell-mode.el:

(eval-when-compile
  ;; Emacs 21 defines `values' as a (run-time) alias for list.                  
  ;; Don't maerge this with the pervious clause.                                
  (if (string-match "values"
                    (pp (byte-compile (lambda () (values t)))))
      (defsubst values (&rest values)
        values)))

The culprit is the line

(pp (byte-compile (lambda () (values t)))))

I commented out that whole function and the junk is no longer seen when I first load a Haskell file.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: