Permalink
Browse files

make `inferior-haskell-find-project-root' respect export lists

Ignore-this: 13944cebba542b12a6b02a7c8ef43c81

A "hierarchical module" (one or more dots in module name) with an
export list cannot be loaded (`C-c C-l') unless there is .cabal file
available.

That is because regexp current in `inferior-haskell-find-project-root'
does not match module headers with export lists. Like this one:

module Codec.Binary.MSCP (
    -- * Data structures
    FileHeader(..),
    CDR(..),

    -- * Parsing
    readFile
  ) where

This patch makes the regexp less strict.

darcs-hash:20091124214805-752c4-6c8171da309372c04a2f741ca19e2eae014fe30f.gz
  • Loading branch information...
1 parent 3e47ba4 commit 8bebada56b255851a3fc6264b30011a4af9ccc7c @vvv vvv committed Nov 24, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 inf-haskell.el
View
@@ -282,7 +282,7 @@ The process PROC should be associated to a comint buffer."
(goto-char (point-min))
(let ((case-fold-search nil))
(when (re-search-forward
- "^module[ \t]+\\([^- \t\n]+\\.[^- \t\n]+\\)[ \t]+where\\>" nil t)
+ "^module[ \t]+\\([^- \t\n]+\\.[^- \t\n]+\\)[ \t]+" nil t)
(let* ((dir default-directory)
(module (match-string 1))
(pos 0))

0 comments on commit 8bebada

Please sign in to comment.