unisonweb/unison

Improve error message suggestions

Open

#713 opened on Aug 12, 2019

View on GitHub
 (1 comment) (2 reactions) (0 assignees)Haskell (304 forks)batch import
help wanted

Repository metrics

Stars
 (6,624 stars)
PR merge metrics
 (Avg merge 12d 19h) (6 merged PRs in 30d)

Description

Example 1

For this code, I'd hope to get a suggestion to use aaaaa instead of aaaaA.

use .base

aaaaa : Boolean
aaaaa = true

f : ()
f =
  if aaaaA then () else ()

But instead I get:

  I'm not sure what aaaaA means at line 8, columns 6-11

      8 |   if aaaaA then () else ()

  Whatever it is, it has a type that conforms to base.Boolean.

Example 2

Hoping for a suggestion to use Boolean:

use .base

x : Bool
x = true

Instead:

    ❓

    I couldn't resolve any of these symbols:

        3 | x : Bool

    Using these fully qualified names: Bool

Example 3

Hoping for a suggestion to use true:

use .base

x : Boolean
x = True

Instead:

  I'm not sure what True means at line 4, columns 5-9

      4 | x = True

  Whatever it is, it has a type that conforms to base.Boolean.

Contributor guide