Skip to content

haskell-decl-scan doesn't deal with TypeOperators #229

Open
@ivan-m

Description

@ivan-m

When you have a file with the following:

{-# LANGUAGE TypeOperators #-}

type x :^: y = y -> x

haskell-decl-scan will erroneously list this under Datatypes -> x.

I believe it's because this:

(if (looking-at "[ \t]*\\(\\sw+\\)")
              (progn
                (setq name (match-string-no-properties 1))
                (setq name-pos (match-beginning 1))
                (setq type 'datatype)))

just takes the first identifier listed there (without considering whether it's a valid name for a data type).

On the other hand, if we define the datatype as follows:

type (:^:) x y = y -> x

then haskell-decl-scan doesn't pick it up at all.

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