commercialhaskell / stack-ide

Stack-based JSON interface to ide-backend
98 stars 23 forks source link

stack-mode insert type has a type error #76

Closed lukehoersten closed 8 years ago

lukehoersten commented 8 years ago

When running stack-mode-type with a non-zero argument, a type error occurs:

insert: Wrong type argument: char-or-string-p, nil
wraithm commented 8 years ago

+1 I get exactly the same thing.

lukehoersten commented 8 years ago

I think I've figured some hints out here. This is happening when an empty string is returned on the JSON API from stack-ide process. So that's a problem with stack-ide but stack-mode should probably do something more elegant with the empty return than having a runtime type error.

lukehoersten commented 8 years ago

We may actually need a special case of insert type for top level functions. Right now it wraps the expression in (name ::) when really that doesn't work for top levels.

chrisdone commented 8 years ago

The response from stack-ide changed format.