FrigoEU / psc-ide-vim

Vim plugin for psc-ide
96 stars 36 forks source link

purs ide: no type information found for ... #147

Open srghma opened 5 years ago

srghma commented 5 years ago

Having

module Main where

import Prelude

import Effect (Effect)
import Effect.Console (log)

main :: Effect Unit
main = do
  let a = 1 -- can't get type of a
  log "hi" -- but can get type of log

Expected:

when my cursor at a variable and I do :Ptype - it should show type inferred of a

Actual:

I have NO way to see the inferred type of a

it shows purs ide: no type information found for a

logs show that it tries to find type definition of a in imported modules

purescript#ide#call: command: {"params": {"currentModule": "Main", "search": "a", "filters": [{"filter": "modules", "params": {"modules"
: ["Prelude", "Main"]}}]}, "command": "type"}

Proposal:

{
    start: { line: 5, character: 23 },
    end : { line 6, character : 0 }
}

N.B.

maybe someone knows other way to see derived type of a?

srghma commented 5 years ago

oops, I did a duplicate of my own issue https://github.com/FrigoEU/psc-ide-vim/issues/112