Skip to content

haskell-indentation-mode parse error on indenting import declaration #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ryantm opened this issue Dec 13, 2014 · 2 comments
Closed

haskell-indentation-mode parse error on indenting import declaration #397

ryantm opened this issue Dec 13, 2014 · 2 comments

Comments

@ryantm
Copy link
Contributor

ryantm commented Dec 13, 2014

When I use MELPA version 20141212.1131 of the haskell-mode, and a file containing:

module A where

import Control.Concurrent
  ( forkIO
, killThread)

and I put the point at the "k" in killThread and type tab, it prints "Parse error" in the minibuffer and it does not change the indentation.

@purcell
Copy link
Member

purcell commented Dec 13, 2014

Confirmed. More completely:

Debugger entered--Lisp error: (parse-error . "Illegal token: layout-next")
  signal(parse-error "Illegal token: layout-next")
  parse-error("Illegal token: %s" layout-next)
  haskell-indentation-with-starter((lambda nil (haskell-indentation-separated (function haskell-indentation-expression) (list "," "->") nil)) ")")
  haskell-indentation-list(haskell-indentation-expression ")" (list "," "->") nil)
  (lambda nil (haskell-indentation-list (function haskell-indentation-expression) ")" (quote (list "," "->")) nil))()
  byte-code("..." [current-token following-token current-indent haskell-indentation-expression-list parser haskell-indentation-layout-offset (value operator) haskell-indentation-read-next-token end-tokens "where" haskell-indentation-add-where-pre-indent haskell-indentation-expression-token haskell-indentation-add-indentation throw return nil assoc "let" haskell-indentation-add-layout-indent parse-end ("(" "[" "{" "do" "case")] 4)
  haskell-indentation-expression()

@gracjan
Copy link
Contributor

gracjan commented Mar 29, 2015

Unit test case in #562.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants