[GHC] #13868: Improved help suggested in the error message about "import".

#13868: Improved help suggested in the error message about "import". -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Poor/confusing Unknown/Multiple | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- I know that improving error messages is a headache in Haskell. But we still need to point out the mistakes or the nonsense. Here are some examples of import test "module" at the beginning of the program (any). I randomly chose the "Data" module. Below each import, the response from GHC. And below, my opinion.\\ {{{ import Data.Aaa Failed to load interface for `Data.Aaa' Perhaps you meant Data.Data (from base-4.9.1.0) Data.Map (from containers-0.5.7.1) }}} No relationship.\\ {{{ import Data.Bbb Failed to load interface for `Data.Bbb' }}} Ok.\\ {{{ import Data.Ccc Failed to load interface for `Data.Ccc' }}} Ok.\\ {{{ import Data.Ddd Failed to load interface for `Data.Ddd' Perhaps you meant Data.Ord (from base-4.9.1.0) }}} No relationship.\\ {{{ import Data.Eee Failed to load interface for `Data.Eee' Perhaps you meant Data.Eq (from base-4.9.1.0) Data.Set (from containers-0.5.7.1) Data.Tree (from containers-0.5.7.1) }}} No relationship.\\ I stopped looking because I do not know how to correct it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13868 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13868: Improved help suggested in the error message about "import". -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): What would you like GHC to say in these cases? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13868#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13868: Improved help suggested in the error message about "import". -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by vanto): Well, look at this example.\\ {{{ import Data.Chat Failed to load interface for `Data.Chat' Perhaps you meant Data.Char (from base-4.9.1.0) Data.Char8 (from word8-0.1.2) }}} The response given by GHC is quite adequate. He answers what we expect from him. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13868#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13868: Improved help suggested in the error message about "import". -------------------------------------+------------------------------------- Reporter: vanto | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hsyl20): In the examples you give, there may be relationships according to the fuzzy search algorithm (https://en.wikipedia.org/wiki/Damerau–Levenshtein_distance) and the current thresholds (cf [[GhcFile(compiler/utils/Util.hs#L950)]]). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13868#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC