psc-ide-vim icon indicating copy to clipboard operation
psc-ide-vim copied to clipboard

purs ide: no type information found for ...

Open srghma opened this issue 6 years ago • 1 comments

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:

  • extend purs ide server so it derive type of range? something like language-server does (https://microsoft.github.io/language-server-protocol/specification)
{
    start: { line: 5, character: 23 },
    end : { line 6, character : 0 }
}

N.B.

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

srghma avatar Jun 06 '19 05:06 srghma

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

srghma avatar Jun 06 '19 05:06 srghma