Skip to content

haskell-indentation's behaviour is slightly different from haskell-indent #208

Closed
@konn

Description

@konn

In the latest haskell-mode's manual,turn-on-haskell-indentation is described as follows:

Improved variation of turn-on-haskell-indent indentation mode. Rebinds RET and DEL, so that indentations can be set and deleted as if they were real tabs.

To me, haskell-indentation is more sensible about tab-width, so I prefer this indentation mode rather than haskell-indent.

But I found there are different behaviours other than RET and DEL (in haskell-mode-20131013, with Cocoa Emacs 2013-03-11)!

RET behaviour

If I use turn-on-haskell-indentation, delete key's behaviour disables Delete key's crucial behaviour.

Suppose I select (i.e. set region on) () in the below code and put the cursor right after (:

main = putStrLn ()
--              ~~^ cursor here

With turn-on-haskell-indent, If I press "Delete" Key, then () is deleted from source and I get the following:

main = putStrLn 

But, with haskell-indentation, I get the following:

main = putStrLn (

Only the character right before the cursor is deleted!

Function-name completion

In haskell-indent, it also completes the function name.

Suppose following situation:

fib :: Int -> Int
fib 0 = 1
--       ^ cursor here

When I hit C-j and TAB twice, haskell-indent completes the function name:

fib :: Int -> Int
fib 0 = 1
fib 

But with haskell-indentation, function name is not completed!

I think above two difference is inconvenient, so I want haskell-indentation behaves like haskell-indent in this two situations.

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