[GHC] #9177: Suggest Int when user uses int
GHC
ghc-devs at haskell.org
Fri Jun 6 14:12:58 UTC 2014
#9177: Suggest Int when user uses int
-------------------------------------+------------------------------------
Reporter: nomeata | Owner: nomeata
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture: Unknown/Multiple
Type of failure: None/Unknown | Difficulty: Unknown
Test Case: | Blocked By:
Blocking: | Related Tickets: #1388
-------------------------------------+------------------------------------
Comment (by goldfire):
Replying to [comment:3 nomeata]:
> I have two variants: One that suggests `Integer` when `integer` is
typed, and one that suggests even `Integer` if `integerr` is typed (using
the same edit distance metric stuff). I’ll push the first, followed by the
second, so that one can easily revert.
>
> Of course there is no limit on how smart the error message can be. In
`type Foo = eq`, one cannot mean `Eq` (as it is a class), but that is not
available on the level of `OccNames`. But I guess the suggestion is still
an improvement.
In case anyone is inspired to make this smarter, I'll note that `type Foo
= Eq` is perfectly reasonable, in the presence of !ConstraintKinds.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9177#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list