purescript/purescript-docs-search

Improve output for data/newtype constructors on REPL interface

purefunctor opened this issue · 1 comments

Currently, the REPL interface only shows the names of constructors for data/newtype declarations like so:

Tuple

tuples                                   Data.Tuple
Additive

prelude                                  Data.Monoid.Additive

I think this can be improved by adding data constructor and newtype constructor prefixes. I'm also currently trying to integrate docs-search into Emacs and having prefixes like this would make it easier to write, considering the output format itself is already easy to parse given how the results are spaced.

data constructor Tuple :: a -> b -> Tuple a b

tuples                                   Data.Tuple
newtype constructor Additive :: a -> Additive a

prelude                                  Data.Monoid.Additive

Any thoughts? I can try working on this later this week as well. I have a working implementation at purefunctor/purescript-docs-search@1518f71

Hi, sorry for slow response,

I think this is definitely an improvement, could you please create a pull request?