Skip to content

' should not be a pair in haskell mode. #710

@colonelpanic8

Description

@colonelpanic8

Apostrophies are often used in identifiers in haskell to indicate that something is a modified version of another thing.

Smart parens has a bunch of annoying behavior with apostrophies in haskell mode

Here is an example:

module Main where

myFunction a = a + 1

myFunction' 1 = 1
myFunction' a = myFunction a + 1

test c d = myFunction' c + (myFunction' d)

main = return ()

Running sp-splice-sexp inside of the uncessary parentheses on the test line has very suprising behavior.

EDIT:

Just noticed that smartparens-haskell has

(sp-local-pair "'" nil :unless '(sp-point-after-word-p))

Which I suspect might be why this still occurs. What is the reasoning behind this piece of config?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions