Skip to content

forward-sexp works poorly with operator names #648

Closed
@ikirill

Description

@ikirill

In the following line

x Array.! y

place point before x and then use mark-sexp. The marked strings will be:

x
x Array.
x Array.! y

This is not correct behaviour for haskell-mode, because x Array. is not a meaningful haskell expression while x Array.! would be (in the sense of an operator slice, at least): this breaks navigation of haskell code by other emacs tools that rely on standard emacs functions such as forward-sexp.

As a possibility, haskell-mode could potentially provide its own forward-sexp-function that marks expressions suitable to haskell.

Also related is that haskell-ident-at-pos returns either Array, or Array., depending on where point is placed within Array.!, which is probably why documentation for Array.! is not displayed when point is on top of it. (The command given to ghci in process log is :info Array., which is wrong.) Ideally, after placing point on Array.!, eldoc-mode (or haskell-doc-mode) should show information about the operator Array.!.

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