Skip to content

Indentation is broken #890

Closed
Closed
@ghost

Description

I have following code:

sumtorial :: Integer -> Integer
sumtorial 0 = 0
sumtorial n = n + sumtorial (n-1)

hailstone :: Integer -> Integer
hailstone n
  | mod n 2 == 0 = div n 2
  | otherwise    = 3*n + 1

sumPair :: (Int,Int) -> Int
sumPair (x,y) = x + y

I have in my ~/.emacs following line:
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

And now, when I use tab at line 7, the indentation of 2 spaces gets f*cked up to 4 spaces. When i press return at the end of line 8, im indented at the new line by 19 characters.

But now the funny thing is, when I start emacs with -q and do M x turn-on-haskell-indentation then, at least the problem in line 7, is away.

So how to fix my settings?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions