Skip to content

[purs ide] Hover doesn't show types for non-top-level identifiers #4595

@trajafri

Description

@trajafri

Description

IDE doesn't show type information for identifiers that aren't defined at the top level.

To Reproduce

Sample program:

module Main where

import Prelude

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

s0 :: String
s0 = ""

main :: Effect Unit
main =
  let s1 :: String
      s1 = ""
  in do
      let  s2 :: String
           s2 = ""
      log s0
      log s1
      log s2
      log s3
  where
    s3 :: String
    s3 = ""

Expected behavior

An identical Haskell program shows s{0,1,2,3} with type String:

Image Image

But, purescript IDE fails to fetch the type info for s{1,2,3} (status line at the bottom says No information available):

Image Image

Additional context

Originally experienced in IntelliJ, but also reproducible in neovim.

This also applies to function/lambda parameters. Figuring out the types of a lambda's parameters can be really useful.

PureScript version

0.15.16

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions