Skip to content

Assertion failure in haskell-indent-in-comment #415

Closed
@ikirill

Description

@ikirill

With the following file:

{-# OPTIONS -w
    #-}

module Test where

-- {{{ A header
-- !

import Data.List

-- }}}

place point right after the exclamation mark and press enter with electric-indent-mode turned on. (With electric indent turned off, press enter, then indent with tab.)

I get:

Debugger entered--Lisp error: (cl-assertion-failed (<= start end))
  signal(cl-assertion-failed ((<= start end)))
  (or (<= start end) (signal (quote cl-assertion-failed) (list (quote (<= start end)))))
  haskell-indent-in-comment(60 37)
  haskell-indent-indentation-info(60)
  haskell-indent-virtual-indentation(60)
  haskell-indent-after-keyword-column(("where" 0 0) 60)
  haskell-indent-indentation-info()
  haskell-indent-cycle()
  indent-for-tab-command(nil)
  funcall-interactively(indent-for-tab-command nil)
  call-interactively(indent-for-tab-command nil nil)
  command-execute(indent-for-tab-command)

Maybe it should just return nil instead of raising an error?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions